Every 5 minutes
Post new and changed sheet rows to Discord
Whenever a row in your sheet is added or changed, a formatted message appears in your Discord channel.
- Runs
- Every 5 minutes
- Apps
- Discord, Google Sheets
- AI
- Not needed
- Access
- Sheets read; Discord send messages
Send this to your assistant
Create a ClickRuntime automation: every 5 minutes, post any new or changed rows from my Requests sheet to #requests on Discord.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A community team collects feature requests and event sign-ups in a Google Sheet, but the conversation happens on Discord. Moderators only see a new request when someone thinks to open the sheet, and changes such as a status moving to done go unnoticed.
Posting each new or edited row into a Discord channel brings the sheet to where people already are, so requests are discussed while they are fresh.
What you get out of it
The sheet comes to the conversation
New requests appear in Discord without anyone opening the sheet. Discussion starts in the channel where the community already talks.
Changes are visible too
Edits to an existing row, like a status update, are posted as well. People following a request see its progress without asking.
Only real changes are posted
Rows that have not changed since the last check are skipped. The channel shows activity, not a repeat of the whole sheet.
Readable messages
Each row is posted with its column names as labels. That is much easier to scan than a pasted line of cells.
How it works
What happens, step by step
Every 5 minutes, ClickRuntime reads the rows of your Requests sheet.
It compares each row with what it saw last time, to find rows that are new or changed.
Rows that have not changed are skipped.
Each new or changed row is posted to your Discord channel as a formatted message.
Before it runs live
- Connect Discord
- Connect your Google Sheets account and pick the spreadsheets it may use
What you get
Build your own
Need it to work differently?
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 Slack
- Combine it with other Discord and Google Sheets steps into one automation
Under the hood
The code that runs this automation
import hashlib, json
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, state, report_fetched
SHEET_ID = "your-spreadsheet-id"
CHANNEL_ID = "your-discord-channel-id"
@on_trigger
def run(event):
sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
rows = sheets.spreadsheets().values().get(spreadsheetId=SHEET_ID, range="Requests!A1:Z").execute().get("values", [])
head, hashes = rows[0], state.get("hashes") or {}
changed = []
for r in rows[1:]:
if not r:
continue
h = hashlib.sha1(json.dumps(r).encode()).hexdigest()
if hashes.get(r[0]) != h:
changed.append((r, r[0] in hashes))
hashes[r[0]] = h
report_fetched(len(changed))
if not changed:
return {"summary": "Nothing new"}
bot = {"Authorization": f"Bot {credentials.secret('DISCORD_BOT_TOKEN')}"}
for r, updated in changed:
fields = [{"name": k, "value": v or "-", "inline": True} for k, v in zip(head, r)]
http.post(f"https://discord.com/api/v10/channels/{CHANNEL_ID}/messages", headers=bot,
json={"embeds": [{"title": ("Updated: " if updated else "New: ") + r[0], "fields": fields[:25]}]})
state.set("hashes", hashes)
return {"summary": f"{len(changed)} rows posted"}FAQ
Common questions
How does it tell a changed row from a new one?
What if I sort or reorder the sheet?
Can I post to more than one Discord channel?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Create a Discord channel for each new project in your sheet
Add a project row to your sheet and a Discord channel is created, its members are tagged in a welcome message, and the channel ID is saved back.
See how it worksModerate a Discord channel against rules in a Google Sheet
New messages in your channel are checked against your rules sheet, and any that break a rule are logged and flagged to your moderators.
See how it worksExport Discord members with a role to Google Sheets
A sheet listing every member of your Discord server who has a chosen role, refreshed each day.
See how it worksKeep exploring
Set up “Post new and changed sheet rows to Discord” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.