Skip to content

Every 5 minutes

Post new order emails to your fulfilment team

Every order confirmation email becomes a Slack post with the order number, items and customer.

Runs
Every 5 minutes
Apps
Gmail, Slack
AI
Not needed
Access
Gmail gmail.readonly; Slack chat:write

Send this to your assistant

Create a ClickRuntime automation: every 5 minutes, check Gmail for new order confirmation emails and post the order number, items and customer name to #fulfilment.

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

An online store that receives order confirmations by email depends on someone in fulfilment watching a shared mailbox. During a sale the messages arrive in bursts, they are mixed with supplier mail and returns, and an order for a rush shipment can sit unseen for two hours. The packing team ends up asking each other what came in, and customers who paid for express delivery wait for a dispatch that did not start on time.

Every 5 minutes Gmail is searched for new order emails. The order number, items, quantity and shipping details are parsed out of each, and a tidy message is posted to the fulfilment channel in Slack, so the packing team sees every order in the place where they already coordinate.

It suits small ecommerce teams, marketplace sellers who get order mail from several platforms and warehouses staffed by a few people.

What you get out of it

  • Orders start getting packed sooner

    A message in the fulfilment channel within minutes of the email means picking begins right away, which matters most for express shipping and for items that sell out quickly. Customers notice when parcels leave the same day.

  • Everyone sees the same list of orders

    Putting orders in a shared channel replaces one person's inbox with a visible queue, so anyone on the team can pick up the next order and nobody packs the same one twice.

  • Parsed fields save re-reading emails

    Order number, items and address show in a clean layout, so the packer does not scroll through a long marketing-style confirmation to find the three lines they need. Small time savings repeat across every single order of the day.

  • A timeline for disputes

    If a customer claims an order was never seen, the channel history shows when it arrived and who acknowledged it, which settles the question without digging in the mailbox. Sorting out who is right takes seconds instead of an afternoon.

  • Busy days stay manageable

    During a sale hundreds of emails can arrive, and a steady feed of structured posts is much easier to work through than a flooded inbox with unread counts climbing. Staff stay calm because the work arrives in an orderly stream.

How it works

What happens, step by step

  1. Every 5 minutes, ClickRuntime checks Gmail for order confirmation emails with "Order #" in the subject, skipping any it has already posted.

  2. It reads the order number, customer name and items from each email.

  3. A message appears in your #fulfilment Slack channel with the order number, customer and each item and quantity.

Before it runs live

  • Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)

What you get

RunsEvery 5 minutes
Post new order emails to your fulfilment teamtoday, 9:00Succeeded
Slack · #fulfilment📦 Order #1042 for Casey Morgan • 2 × Acme Ceramic Mug • 1 × Northwind Tea Sampler

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 Gmail 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.
store_order_emails_to_slack.pyexample
import re
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, state, notify, report_fetched

@on_trigger
def run(event):
    gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    seen = set(state.get("seen") or [])
    msgs = gmail.users().messages().list(userId="me", q='subject:"Order #" newer_than:1d', maxResults=25).execute().get("messages", [])
    new = [m for m in msgs if m["id"] not in seen]
    report_fetched(len(new))
    if not new:
        return {"new": 0}
    for m in new:
        msg = gmail.users().messages().get(userId="me", id=m["id"], format="metadata", metadataHeaders=["Subject"]).execute()
        subject, snippet = msg["payload"]["headers"][0]["value"], msg["snippet"]
        number = (re.search(r"#(\d+)", subject) or [None, "?"])[1]
        customer = (re.search(r"(?:Customer|Ship to|Name):\s*([A-Z][\w'-]+(?: [A-Z][\w'-]+)*)", snippet) or [None, "unknown"])[1]
        items = re.findall(r"(\d+)\s*[x×]\s*([^,.\n]+)", snippet)
        notify.slack(f"📦 Order #{number} for {customer}\n" + "\n".join(f"• {q} × {n.strip()}" for q, n in items),
                     channel="#fulfilment")
    state.set("seen", [m["id"] for m in msgs])
    return {"orders": len(new)}

FAQ

Common questions

How does it find order emails among other mail?
It searches Gmail using a query you define, such as a sender like orders@yourstore.com or a subject starting with New order. Only matches are posted, so supplier mail and newsletters never reach the channel.
What if my order emails have different layouts?
Parsing works best with a consistent layout. If you receive orders from several platforms, each can have its own pattern. Tell your AI assistant about each source and approve the combined version before it goes live.
Does it mark the emails as read or move them?
No. Emails stay in your inbox exactly as they arrived. Each order is remembered so it is posted only once, but nothing in Gmail is changed unless you ask for a label to be applied.
What permissions does it need?
Gmail gmail.readonly; Slack 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 order emails to your fulfilment team” from your assistant

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