How to Automate Stripe Payment → HubSpot Deal Won + Onboarding Emails with n8n
Every time a Stripe payment goes through, your team has two jobs to do manually: update the CRM and send onboarding emails. If your ops are tight, someone remembers. If they're not, the deal sits open
Every time a Stripe payment goes through, your team has two jobs to do manually: update the CRM and send onboarding emails. If your ops are tight, someone remembers. If they're not, the deal sits open in HubSpot for days and the customer gets silence instead of a welcome sequence. This article shows you exactly how to wire Stripe, HubSpot, and n8n so that a confirmed payment triggers both actions in under two seconds — no human in the loop.
Why Manual Post-Payment Processes Break at Scale
The moment a customer pays, you have a narrow window to deliver a great first impression and keep your pipeline clean. Most teams handle this with a checklist, a Slack message, or a Zapier zap they set up two years ago and haven't touched since. The problems are predictable.
CRM hygiene degrades fast. Sales reps forget to move deals to "Won" because they're already working the next prospect. Finance sees revenue in Stripe that doesn't match closed deals in HubSpot. Onboarding emails go out late, out of order, or not at all when whoever owns the sequence is on vacation. As volume grows, the gap between what Stripe knows and what HubSpot reflects turns into a source of truth problem that slows down every revenue conversation.
The fix isn't discipline — it's automation. A workflow that listens for payment_intent.succeeded in Stripe and fires off HubSpot and email updates in the same trigger cycle removes the human dependency entirely.
The Architecture: What n8n Does Here
The workflow has four stages, each handled by a specific n8n node:
- Trigger — Stripe Trigger node listens for
payment_intent.succeededevents via webhook - Lookup — HubSpot node searches for the deal associated with the customer email from Stripe
- Update — HubSpot node moves the deal stage to "Closed Won" and stamps the amount
- Email sequence — Two Send Email nodes fire in sequence: immediate welcome + Day 1 onboarding
n8n runs this on your own infrastructure, which means no per-task pricing, full control over the data, and the ability to add conditional logic without upgrading a plan. The workflow executes in milliseconds. From Stripe confirmation to HubSpot update to first email: under three seconds.
Step-by-Step Setup in n8n
Step 1 — Stripe Trigger Node
Add a Stripe Trigger node and set the event to payment_intent.succeeded. In your Stripe Dashboard, go to Developers → Webhooks → Add endpoint, paste the webhook URL n8n gives you, and select the same event. Enable test mode first and use Stripe's "Send test webhook" button to validate the connection before going live.
The payload from this event includes customer_email, amount, currency, and metadata. If you store the HubSpot deal ID or contact ID in Stripe's metadata at checkout creation, you can skip the lookup step entirely and go direct to update.
Step 2 — Find the HubSpot Deal
Add a HubSpot node, set the resource to Contact and the operation to Get All. Filter by email using the customer_email field from the Stripe payload: {{ $json.data.object.receipt_email }} or {{ $json.data.object.customer_details.email }} depending on your Stripe setup.
Once you have the contact, add a second HubSpot node to search for associated deals. Use the contact ID from the previous step with Deal → Get All filtered by contact association. Add a filter for deal stage not equal to "closedwon" to avoid double-processing renewals or retries.
Step 3 — Update Deal to Closed Won
Add a HubSpot node, resource Deal, operation Update. Pass the deal ID from Step 2. Set these properties:
dealstage→closedwon(use your pipeline's internal stage ID if it differs)amount→{{ $json.data.object.amount / 100 }}(Stripe stores amounts in cents)closedate→{{ $now.toMillis() }}
If you want to add a note to the deal timeline, add a fourth HubSpot node with resource Note and attach it to the deal ID. This gives your sales team full context directly in HubSpot without digging through Stripe.
Step 4 — Send the Welcome Email
Add an Email (SMTP) or Gmail node — whichever matches your sending setup. Set the To field to {{ $('Stripe Trigger').item.json.data.object.receipt_email }}. Write a direct welcome email: confirm the purchase, tell them exactly what happens next, include login credentials or access links if applicable. Keep it under 200 words. Customers who just paid want confirmation and next steps, not paragraphs.
Step 5 — Schedule and Send the Day 1 Email
Add a Wait node after the first email and set it to resume after 20–24 hours. Follow it with a second email node for your Day 1 onboarding message — this is where you deliver the first real value: a quick-start guide, a setup checklist, or a link to your onboarding call scheduler. The Wait node in n8n pauses execution without blocking other workflows and resumes automatically, so no cron job or queue setup is needed.
If you want a longer sequence — Day 3, Day 7 — add more Wait + Email pairs in the same workflow. n8n handles execution state for you.
Key Benefits for Technical Founders and Ops Teams
Zero lag between payment and CRM update. The moment Stripe confirms, HubSpot reflects it. Your sales team sees accurate pipeline in real time without manual entry. Revenue reports match Stripe automatically.
Consistent onboarding regardless of team availability. The first email goes out in seconds, not hours. The second email goes out the next day, not when someone remembers. Customer experience doesn't depend on who's on shift.
Full audit trail. n8n logs every execution. HubSpot gets a deal note. You can see exactly when the automation ran, what data it processed, and whether anything failed — without touching Stripe or asking the sales team.
Self-hosted, no per-task fees. If you're processing 500 payments a month, a Zapier equivalent workflow would cost you north of $50/month just for the automation layer. On n8n self-hosted, you pay for the server — and you're probably already running it for other workflows.
Common Pitfalls and How to Avoid Them
Duplicate executions on retries. Stripe retries failed webhooks. If your n8n workflow fails halfway and Stripe retries, you could end up with two "Closed Won" updates or two welcome emails. Add an IF node after the HubSpot deal lookup: check if dealstage is already closedwon before proceeding. If it is, route the execution to a No Operation node and stop. This makes your workflow idempotent.
Wrong email field from Stripe. Stripe's payment_intent.succeeded payload structure varies depending on whether you use Checkout, Payment Links, or the API directly. Test with a real payload and inspect the actual JSON in n8n's execution output before hardcoding the field path. Common fields: data.object.receipt_email, data.object.customer_details.email, data.object.billing_details.email.
No match in HubSpot. If the customer email from Stripe doesn't exist as a HubSpot contact, the lookup returns empty and the workflow fails silently. Add error handling: after the HubSpot contact search, add an IF node to check if the result is empty. If it is, create the contact first, then create and close the deal. This makes the workflow robust for new customers who weren't in your CRM pre-purchase.
HubSpot pipeline stage ID mismatch. "Closed Won" in HubSpot is a stage within a specific pipeline. The internal ID is not closedwon for every account — it depends on your pipeline configuration. Go to HubSpot → Settings → Deals → Pipelines, inspect your pipeline stages, and copy the exact stage ID. Using the wrong ID will silently move the deal to the wrong stage.
Wait node behavior on n8n restarts. If your n8n instance restarts while a Wait node is paused, the execution resumes after restart. This is expected behavior and works reliably — but if you're running n8n on a server that restarts frequently, verify the Day 1 email still goes out by checking execution logs the day after a test payment.
Scaling the Workflow
Once the core workflow is running, two extensions add significant value with minimal effort. First, add a Slack or Teams node to post a "New payment — deal closed" notification to your sales channel. This gives the team visibility without requiring them to live in HubSpot. Second, add a conditional branch for payment amount: if the payment is above a threshold (e.g., $500+), assign the deal to a specific sales rep for a personal follow-up call. n8n's IF node handles this cleanly — one branch updates HubSpot with an owner assignment and creates a follow-up task, the other proceeds with the standard sequence.
For teams processing international payments, add a currency normalization step before writing the deal amount to HubSpot. Stripe returns amounts in the payment currency; HubSpot deals typically use your reporting currency. A Function node with a simple conversion table handles this without an external API call.
Ja construimos isso pra voce
Nao comece do zero. O Stripe Payment → HubSpot Deal Won + Onboarding Emails e um workflow n8n pronto para instalar — conecta suas ferramentas em minutos, sem codigo.
Instalar por $49 →