The moment it happens
Log new Stripe invoices in HubSpot and Slack
Each new Stripe invoice updates the customer's company in HubSpot and is posted in your finance channel.
- Runs
- The moment it happens
- Apps
- HubSpot, Slack
- AI
- Not needed
- Access
- HubSpot companies read+write; Slack chat:write
Send this to your assistant
Create a ClickRuntime automation: when Stripe creates an invoice, update the customer's HubSpot company with the amount and date, and post it in #finance.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
An account manager is about to call a customer about a renewal, opens HubSpot, and has no idea the customer was invoiced last week for an upgrade. Billing lives in Stripe, relationships live in HubSpot, and finance hears about invoices only when they check the dashboard.
Copying invoice amounts into the CRM as they are created keeps sales and account managers informed, and a post in #finance gives the finance team a running feed of what was billed. Subscription businesses use it so everyone who talks to customers sees the same billing picture.
What you get out of it
Sales sees billing in the CRM
The latest invoice amount and date sit on the company record, so nobody walks into a call unaware of a recent charge or upgrade.
Finance sees invoices as they happen
A message in #finance for each invoice gives a live view of billing without opening Stripe.
No manual copying
Nobody has to export invoices and paste totals into HubSpot. The records stay current without anyone remembering to update them.
Better renewal and upsell conversations
Knowing what a customer pays and when they were last billed helps account managers time renewals and spot accounts that are growing.
How it works
What happens, step by step
ClickRuntime starts as soon as Stripe reports that a new invoice was created.
It ignores any notice it has already handled, so a repeated delivery is not posted twice.
It finds the customer's company in HubSpot and updates it with the invoice amount and date.
A short message with the customer, amount and link is posted in your #finance Slack channel.
Before it runs live
- Connect HubSpot
- Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
- 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 Google Sheets
- Combine it with other HubSpot and Slack steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_event, credentials, http, notify, state
@on_event
def handle(event):
if state.get(f"done:{event.event_id}"):
return {"skipped": "duplicate"}
inv = event.json["data"]["object"]
company_id = (inv.get("metadata") or {}).get("hubspot_company_id")
amount = inv["amount_due"] / 100
if company_id:
http.patch(f"https://api.hubapi.com/crm/v3/objects/companies/{company_id}",
headers={"Authorization": f"Bearer {credentials.secret('HUBSPOT_API_KEY')}"},
json={"properties": {"last_invoice_amount": amount, "last_invoice_date": inv["created"] * 1000}})
notify.slack(f"Invoice {inv.get('number') or inv['id']}: {inv.get('customer_name') or inv.get('customer_email')} "
f"{amount:,.2f} {inv['currency'].upper()} {inv.get('hosted_invoice_url') or ''}", channel="#finance")
state.set(f"done:{event.event_id}", True)
return {"invoice": inv["id"], "hubspot_updated": bool(company_id)}FAQ
Common questions
How does it find the right HubSpot company?
Which invoice details are saved?
What if an invoice is created by mistake and voided?
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
Log sales call summaries on the HubSpot contact and in Slack
After each sales call, a summary with next steps is added to the contact in HubSpot and shared in #sales.
See how it worksCheck new HubSpot contacts and companies for bad data
New contacts with broken emails and new companies with dead websites are flagged in Slack before anyone works them.
See how it worksPost new HubSpot deals and stage changes in Slack
Your sales channel hears about every new deal and every stage move, with amount and owner.
See how it worksKeep exploring
Set up “Log new Stripe invoices in HubSpot and Slack” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.