Skip to content

Every 5 minutes

Post new comments on Google Drive files to Slack

New comments and replies on Google Docs, Sheets and Slides in a Drive folder are posted to a Slack channel every 5 minutes with the quoted text and a link.

Runs
Every 5 minutes
Apps
Google Drive, Slack
AI
Not needed
Access
drive.readonly; chat:write

Send this to your assistant

Create a ClickRuntime automation: every 5 minutes, post new comments and replies on files in my Drive folder "Client deliverables" to #reviews with the author, the file name, the quoted text and a link.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

Feedback on documents lives in Google comments, but the people who need to act on it live in Slack. Drive's comment emails go to the file owner and whoever was mentioned, so the rest of the team only sees feedback when they open the file.

This automation checks a folder every 5 minutes, finds files that changed, reads comments and replies added since the last run and posts each one to a Slack channel with the commenter, the file, the text being discussed and a link straight to the document.

Agencies use it to see client feedback on deliverables as it comes in, and content teams use it to follow review rounds on drafts without opening each doc.

What you get out of it

  • Feedback where the team is

    Comments reach the whole channel, not only the file owner's inbox.

  • Context included

    The quoted text the comment is attached to is shown, so the message makes sense without opening the file.

  • Replies and resolutions too

    Follow-up replies and "resolved" actions are posted, showing when a point is closed.

  • Only changed files are read

    Files untouched since the last check are skipped, which keeps each run quick.

  • Any Google file type

    Comments on Docs, Sheets, Slides and PDFs in Drive all appear.

How it works

What happens, step by step

  1. Every 5 minutes the automation lists files in the folder that changed since the last check.

  2. For each one it reads comments and replies added since then.

  3. Each new comment is posted to Slack with who wrote it, the file, the text it was attached to and a link.

  4. Resolved comments are shown as resolved, so the channel shows progress too.

Before it runs live

  • Connect Google Drive
  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)

What you get

RunsEvery 5 minutes
Post new comments on Google Drive files to Slacktoday, 9:00Succeeded
#reviews · Slack💬 Priya Shah on *Homepage copy v4* (Google Docs) > "Start your free trial" Can we say "Start free" here? Matches the button. https://docs.google.com/document/d/…

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Google Sheets
  • Combine it with other Google Drive and Slack steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
post_new_comments_on_google_drive_files_to_slack.pyexample
from clickruntime import on_trigger, credentials, http, state, notify
import datetime

FOLDER_ID = "1AbCdEfDeliverablesId"
CHANNEL = "#reviews"

def drive(path, **params):
    resp = http.get(f"https://www.googleapis.com/drive/v3{path}", params=params,
                    headers={"Authorization": f"Bearer {credentials.connection('google', 'work')}"})
    resp.raise_for_status()
    return resp.json()

@on_trigger
def run(event):
    now = datetime.datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S.000Z")
    since = state.get("since")
    state.set("since", now)
    if since is None:
        return {"baseline": now}
    files = drive("/files", q=f"'{FOLDER_ID}' in parents and trashed = false and modifiedTime > '{since}'",
                  fields="files(id,name,webViewLink)", pageSize=100)["files"]
    posted = 0
    for f in files:
        comments = drive(f"/files/{f['id']}/comments", startModifiedTime=since, pageSize=100,
                         fields="comments(content,createdTime,resolved,author(displayName),quotedFileContent,replies(content,createdTime,action,author(displayName)))")["comments"]
        for c in comments:
            quote = (c.get("quotedFileContent") or {}).get("value")
            q = f"> {quote[:200]}\n" if quote else ""
            if c["createdTime"] > since:
                notify.slack(f"💬 {c['author']['displayName']} on *{f['name']}*\n{q}{c['content'][:1500]}\n{f['webViewLink']}", channel=CHANNEL)
                posted += 1
            for r in c.get("replies", []):
                if r["createdTime"] > since:
                    text = "marked this resolved" if r.get("action") == "resolve" else r["content"][:1500]
                    notify.slack(f"↳ {r['author']['displayName']} on *{f['name']}*: {text}\n{f['webViewLink']}", channel=CHANNEL)
                    posted += 1
    return {"posted": posted}

FAQ

Common questions

Do people need to @mention someone for it to show up?
No. Every new comment and reply on files in the folder is posted, mentioned or not.
Are comments in subfolders included?
Not in this version, which checks files directly in the folder. Ask your assistant to walk subfolders too if your deliverables are nested.
Can it post into a channel per client?
Yes. Give a mapping of folder IDs to Slack channels and each folder's comments go to its own channel.
What permissions does it need?
drive.readonly; chat:write. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Post new comments on Google Drive files to Slack” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.