The moment it happens
Log every shop order in a sheet and post it to Discord
Each new order from your shop is added to your Orders sheet and announced in your Discord channel.
- Runs
- The moment it happens
- Apps
- Discord, Google Sheets
- AI
- Not needed
- Access
- Sheets edit; Discord send
Send this to your assistant
Create a ClickRuntime automation: when my WooCommerce store sends an order webhook, add the order to my Orders sheet (updating the row if it already exists) and post a summary to #orders on Discord.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small online shop run by three people keeps its numbers in a Google Sheet for bookkeeping and stock planning, and the team talks in Discord. Orders are exported from the shop admin every few days and pasted into the sheet, which means the figures are always out of date and the team rarely knows when a big order has come in.
This automation adds each order to the sheet the moment it is placed and posts a short summary in Discord. The sheet is always current, and everyone sees sales as they happen.
What you get out of it
A sheet that is always up to date
Orders are added within seconds, so totals, stock plans and reports use real figures. No more weekly export and paste.
The team sees sales as they happen
A message in Discord for each order keeps everyone aware of what is selling. Large or unusual orders are noticed right away.
One row per order
If the shop sends the same order again, for example after a status change, the existing row is updated rather than duplicated. Your totals stay correct.
Works alongside your shop admin
Nothing changes in how you run the shop. The store simply sends each order to a link, and the rest happens on its own.
How it works
What happens, step by step
When a customer places an order, your shop sends it to ClickRuntime straight away.
The order number is checked against orders already logged.
New orders are added as a row in your Orders sheet, and known orders have their row updated.
A short summary with the order number, items and total is posted to your #orders Discord channel.
Before it runs live
- Connect Discord
- Connect your Google Sheets account and pick the spreadsheets it may use
- Paste your automation's link into the other app's webhook settings
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
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, http, state
SHEET_ID = "your-spreadsheet-id"
CHANNEL_ID = "your-discord-channel-id"
@on_event
def handle(event):
o = event.json or {}
oid = str(o.get("id", ""))
if not oid:
return {"skipped": True}
name = f"{o.get('billing', {}).get('first_name', '')} {o.get('billing', {}).get('last_name', '')}".strip()
items = ", ".join(f"{i.get('quantity')}x {i.get('name')}" for i in o.get("line_items", []))
row = [oid, o.get("date_created", ""), name, items, o.get("total", ""), o.get("status", "")]
sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
rows = state.get("rows") or {}
if oid in rows:
sheets.spreadsheets().values().update(spreadsheetId=SHEET_ID, range=f"Orders!A{rows[oid]}:F{rows[oid]}",
valueInputOption="USER_ENTERED", body={"values": [row]}).execute()
return {"updated": oid}
res = sheets.spreadsheets().values().append(spreadsheetId=SHEET_ID, range="Orders!A:F", valueInputOption="USER_ENTERED",
body={"values": [row]}).execute()
rows[oid] = int(res["updates"]["updatedRange"].split("!A")[1].split(":")[0])
state.set("rows", rows)
http.post(f"https://discord.com/api/v10/channels/{CHANNEL_ID}/messages",
headers={"Authorization": f"Bot {credentials.secret('DISCORD_BOT_TOKEN')}"},
json={"content": f"New order #{oid}: {items} - {o.get('total', '')} {o.get('currency', '')}"[:2000]})
return {"added": oid}FAQ
Common questions
Does it work with Shopify as well as WooCommerce?
Which order details go into the sheet?
What happens when an order is refunded or updated?
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
Log form leads to a Google Sheet and announce them in Discord
Each lead from your website form is added to your Leads sheet and posted in your Discord #leads channel within seconds.
See how it worksPost 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.
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 “Log every shop order in a sheet and post it to Discord” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.