Skip to content

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.

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

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

  1. When a customer places an order, your shop sends it to ClickRuntime straight away.

  2. The order number is checked against orders already logged.

  3. New orders are added as a row in your Orders sheet, and known orders have their row updated.

  4. 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

RunsThe moment it happens
Log every shop order in a sheet and post it to Discordjust nowSucceeded
Discord · #ordersNew order #4821: 2x Linen tote, 1x Ceramic mug - 64.00 EUR

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 Slack
  • Combine it with other Discord and Google Sheets 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.
log_store_orders_to_a_sheet_with_a_discord_alert.pyexample
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?
Yes. Both can send an order to a web address when one is created. The fields differ slightly, so the columns are matched to whichever shop you use.
Which order details go into the sheet?
Typically order number, date, customer name, items, total and status. You can choose the columns, and leave out personal details you do not want in a sheet.
What happens when an order is refunded or updated?
If your shop sends updates, the row for that order number is updated with the new status, so refunds show up in the sheet rather than as a second row.
What permissions does it need?
Sheets edit; Discord send. 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 for each event the app sends.
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 “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.