You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Google docs has a way to assign comments to specific people which leads to action items floating around and it makes me sad that people try to assign stuff to me.
Mostly, because there is no great overview to see which documents have assigned actions and how many there are. The only thing you can do is go to https://docs.google.com/document/u/0/?tgif=d and scrape it like so
// loop through list of docsfor(letdocofdocument.querySelectorAll(".docs-homescreen-list-item-title")){// find those that have an action item countfor(letneedsFollowUpofdoc.querySelectorAll(".docsshared-action-items-badge-count")){letdocTitle=doc.title;letamnt=needsFollowUp.textContent;leturl="";//FIXME}}```
The text was updated successfully, but these errors were encountered:
The markup is a bit horrible to navigate and I'm somewhat fearful that it might change, but here's how to get the action items with document name + type (sheet, doc, presentation etc.)
let files = $$(".a-u-xb-j.a-Wa-ka")
for (let file of files) {
// image is slides/sheets/doc logo and has an alt tag
let typeImg = file.querySelector("img.a-Ua-c");
// strip off "Google" from "Google Slides" (and docs, sheets etc.)
let type = "Unknown";
if (typeImg) {
type = typeImg.alt.indexOf("Google") == 0 ? typeImg.alt.slice(7) : "Unknown";
}
let title = file.querySelector(".l-u-V[aria-label]").getAttribute("aria-label");
let actions = file.querySelector("div.ocLVN-Y-Sn-og-yc").innerText;
console.log({actions, type, title});
}```
Google docs has a way to assign comments to specific people which leads to action items floating around and it makes me sad that people try to assign stuff to me.
Mostly, because there is no great overview to see which documents have assigned actions and how many there are. The only thing you can do is go to https://docs.google.com/document/u/0/?tgif=d and scrape it like so
The text was updated successfully, but these errors were encountered: