Skip to content

The moment it happens

Post each new Xero invoice to Slack

Whenever a sales invoice is created, Slack shows the contact, total and due date.

Runs
The moment it happens
Apps
Xero
AI
Not needed
Access
accounting.transactions.read

Send this to your assistant

Create a ClickRuntime automation: when a new sales invoice is created in Xero, post the contact, total and due date to #sales in Slack.

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

Finance teams often work in a different place from the people who sell. A sales invoice is raised in Xero for a customer, the account manager is not told, and a week later the customer calls to ask when the invoice is arriving. Or an invoice goes out with the wrong amount and nobody notices until it is chased as overdue.

When a new invoice is created in Xero, a webhook arrives. The automation first verifies the request signature to confirm it really came from Xero, then fetches the invoice and posts a Slack message with the customer, number, amount and due date, so people see sales billing as it happens.

It suits companies where finance, account management and leadership want a shared view of billing without logging into Xero.

What you get out of it

  • Account managers know an invoice went out

    A customer calling about billing no longer catches the account manager off guard, because they saw the invoice posted in Slack when it was raised. That avoids the awkward moment of a customer knowing more about their invoice than you do.

  • Errors are spotted quickly

    A wrong amount or a customer name typo is noticed by someone scanning the channel on the day the invoice is created, long before it becomes a dispute. Catching a mistake before the customer sees it protects both the relationship and cash flow.

  • Only genuine events are processed

    Checking the signature on each request means a forged call to the trigger link cannot make your Slack channel show invoices that do not exist. That protects the channel from fake data and keeps trust in what it shows.

  • Leadership sees revenue as it is billed

    A running feed of invoices gives owners a sense of billing pace through the month without needing a report or a finance meeting. It is a lighter way to follow revenue than waiting for the month-end report.

  • Faster follow-up on large invoices

    A big invoice posted to a channel can prompt a call to the customer to confirm receipt and ask about the expected payment date. That personal touch often speeds up payment and strengthens the customer relationship.

How it works

What happens, step by step

  1. When a sales invoice is created in Xero, Xero lets ClickRuntime know straight away.

  2. ClickRuntime checks the message really came from your Xero account, then looks up the full invoice.

  3. It posts the invoice number, contact, total, currency and due date to your Slack channel.

Before it runs live

  • Connect Xero
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Post each new Xero invoice to Slackjust nowSucceeded
Slack · #salesNew invoice INV-0431 for Northwind Traders: 4,800.00 USD, due 2026-11-18

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 Xero 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.
new_sales_invoice_alert.pyexample
from clickruntime import on_event, credentials, http, notify, verify

API = "https://api.xero.com/api.xro/2.0"

def xero_headers():
    token = credentials.connection("xero", "work")
    tenant = http.get("https://api.xero.com/connections", headers={"Authorization": f"Bearer {token}"}).json()[0]["tenantId"]
    return {"Authorization": f"Bearer {token}", "xero-tenant-id": tenant, "Accept": "application/json"}

@on_event
def handle(event):
    if not verify.generic_hmac_sha256(event.body, event.header("x-xero-signature"), credentials.secret("XERO_WEBHOOK_KEY"), encoding="base64"):
        return {"ok": False}
    headers = xero_headers()
    for e in event.json.get("events", []):
        if e["eventCategory"] != "INVOICE" or e["eventType"] != "CREATE":
            continue
        inv = http.get(f"{API}/Invoices/{e['resourceId']}", headers=headers).json()["Invoices"][0]
        if inv["Type"] == "ACCREC":
            notify.slack(f"New invoice {inv['InvoiceNumber']} for {inv['Contact']['Name']}: "
                         f"{inv['Total']:,.2f} {inv['CurrencyCode']}, due {inv['DueDateString'][:10]}", channel="#sales")
    return {"ok": True}

FAQ

Common questions

Does it alert for bills as well as sales invoices?
The alert is aimed at sales invoices, which Xero calls ACCREC. Supplier bills, which are ACCPAY, can be added or sent to a separate channel if you want one feed for money in and another for money out.
What does the signature check protect against?
Xero signs each webhook with a key, and the automation compares it before doing anything. A request without a valid signature is rejected, so nobody can spoof invoices into your channel by guessing the trigger link.
Are draft invoices announced too?
Xero sends events for invoice changes, and the automation can limit alerts to invoices that are authorised or sent. If you prefer to see drafts too, your AI assistant can include them so finance sees work in progress.
What permissions does it need?
accounting.transactions.read. 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 “Post each new Xero invoice to Slack” from your assistant

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