Skip to content

The moment it happens

Hear when a contact is added to Xero

A Slack message whenever a new customer or supplier appears in Xero.

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

Send this to your assistant

Create a ClickRuntime automation: when a new contact is created in Xero, post their name and email to #accounts 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

New contacts in Xero appear from many directions: an invoice for a new customer, a supplier bill from a vendor nobody mentioned, an import by the bookkeeper or a link from another system. Without a heads-up, duplicates build up, an unauthorised vendor sneaks into accounts payable and the sales team never learns that a prospect they were working has become a customer.

When Xero creates a contact, it sends an event. The automation fetches the contact's details and posts a message to Slack with the name and key details, so the right people know that a new customer or supplier is now in your books.

Finance managers who want to keep supplier lists clean, and sales leads who track conversion from lead to customer, benefit most. Finance and sales each hear about additions without having to ask the other.

What you get out of it

  • Duplicates are caught early

    Seeing a new contact the moment it is created lets someone notice that Acme Ltd already exists as Acme Limited and merge it before invoices split across both. One short message now can save an hour of untangling two records later.

  • Unexpected suppliers get questioned

    A new vendor appearing without warning is a classic first step in invoice fraud, and a message gives finance a chance to check it was authorised. That gives the person who approves payments a chance to verify the vendor before money moves.

  • Sales sees prospects convert

    When a lead becomes a customer, the account manager finds out as soon as Xero has the record, rather than weeks later when the first invoice is overdue. That helps revenue reporting and makes handoffs from sales to account management smoother.

  • Onboarding tasks start sooner

    A new customer record can prompt a welcome email, credit check or contract filing straight away, which makes the first experience with your company smoother. A good first impression often depends on how quickly someone responds to a new account.

  • Your contact list stays under control

    Watching additions as they happen keeps the list tidy, which makes statements, reports and customer-level analysis more accurate as the business grows. Clean data underneath makes every report you run more reliable.

How it works

What happens, step by step

  1. When a contact is added to Xero, Xero lets ClickRuntime know straight away.

  2. ClickRuntime looks up the contact's name and email address.

  3. It posts the new customer or supplier 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
Hear when a contact is added to Xerojust nowSucceeded
Slack · #accountsNew Xero contact: Northwind Traders (billing@northwind.example)

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_contact_notification.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"] == "CONTACT" and e["eventType"] == "CREATE":
            c = http.get(f"{API}/Contacts/{e['resourceId']}", headers=headers).json()["Contacts"][0]
            notify.slack(f"New Xero contact: {c['Name']} ({c.get('EmailAddress') or 'no email'})", channel="#accounts")
    return {"ok": True}

FAQ

Common questions

Does it distinguish customers from suppliers?
The message can show whether the contact is flagged as a customer, a supplier or both, using the fields Xero returns. That helps finance and sales each focus on the new records that matter to them.
Will importing a spreadsheet of contacts flood Slack?
A large import creates many contacts, and each could send its own message. If you import in bulk, tell your AI assistant to pause it first, or set it to group a batch into one summary message.
What contact details are included in the message?
It can include the name, email address, phone and the contact type, depending on what has been filled in. Bank details and other sensitive fields are not needed for the alert and are left out of the Slack post.
What permissions does it need?
accounting.contacts.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 “Hear when a contact is added to Xero” from your assistant

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