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.
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
When a contact is added to Xero, Xero lets ClickRuntime know straight away.
ClickRuntime looks up the contact's name and email address.
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
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 Xero steps into one automation
Under the hood
The code that runs this automation
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?
Will importing a spreadsheet of contacts flood Slack?
What contact details are included in the message?
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
Post each new Xero invoice to Slack
Whenever a sales invoice is created, Slack shows the contact, total and due date.
See how it worksKnow when a Xero invoice is paid
A Slack message as soon as an invoice turns to paid, sent once per invoice.
See how it worksRaise a draft Xero invoice when a deal closes
A won deal elsewhere creates a draft invoice for the right contact, and Slack gets a link to review it.
See how it worksKeep exploring
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.