What this workflow does
This n8n workflow listens for successful Stripe invoice payments automatically.
It finds related HubSpot deals using Purchase Order numbers.
Then it updates those deals as paid.
Finally, it sends Slack messages to notify the team.
This fixes slow manual work and prevents errors in payment tracking.
Your team sees payments in real-time without extra effort.
Tools and Services Used
- Stripe API: For listening to invoice payment events.
- HubSpot API: Searching and updating deals by PO number.
- Slack API: Sending channel notifications about payments.
- n8n platform: Orchestrates automation flow between services.
Inputs, Processing Steps, and Outputs
Inputs
- Stripe invoice payment event data via webhook.
- PO number in invoice custom fields.
- HubSpot deals accessible via API.
Processing Steps
- Trigger on Stripe
invoice.payment_succeededevent. - Check if PO number exists in invoice data.
- If no PO number, send Slack alert about missing data.
- If PO number present, search HubSpot deals for matching PO.
- If no deal found, send Slack alert about missing deal.
- If deal found, update deal property to “Paid” in HubSpot.
- Send Slack notification confirming payment processed.
Outputs
- HubSpot deals marked paid automatically.
- Slack messages to accounts team with payment status.
Beginner step-by-step: How to use this workflow in n8n production
Import Workflow
- Click the Download button on this page to get the workflow file.
- Open n8n editor.
- Use the menu “Import from File” to add the workflow.
Set Credentials
- Add API credentials for Stripe, HubSpot, and Slack nodes.
- Check all node connections use these credentials.
Update Variables
- Update IDs, Slack channel names, emails, or any folder paths if needed.
Test Workflow
- Trigger the workflow manually with a test Stripe payment event.
- Check Slack messages and deal updates for correctness.
Activate for Production
- Toggle the workflow active switch in n8n.
- Monitor workflow logs for errors during live runs.
If choosing to host n8n yourself instead of using the cloud, you can check self-host n8n for more info.
Step-by-step Workflow Breakdown
Step 1: Stripe Trigger Node
This node listens for completed invoice payments.
You must select event invoice.payment_succeeded and add Stripe API Key.
Step 2: Check PO Number Present
An If node looks if the PO number field is empty or missing.
This determines the workflow path.
Step 3: Slack Alert If No PO
If no PO number, send Slack message alerting missing information.
You include payment details like amount and customer name.
Step 4: Search HubSpot Deal
Use HubSpot node to search deals by the PO number from Stripe data.
This finds the payment’s corresponding deal.
Step 5: Check HubSpot Deal Found
Another If node checks if search returned a deal or not.
It guides whether to update or send an alert.
Step 6: Slack Alert If No Deal
If deal missing, send Slack notification with payment and PO details.
This flags payments needing manual review.
Step 7: Update HubSpot Deal
On deal found, update the custom paid property to “Yes” in HubSpot.
Use the deal ID from search result.
Step 8: Slack Confirmation
Finally, send Slack message confirming payment processed.
Include detailed info like transaction ID and customer.
Common Problems and Fixes
Problem: Workflow does not trigger on Stripe payment
Check Stripe webhook setup matches n8n Stripe Trigger node URL.
Re-register webhook in Stripe Dashboard if needed.
Problem: HubSpot deal not found
Verify the HubSpot property name for PO matches exactly.
Confirm if PO numbers in deals and Stripe are the same format.
Problem: Slack messages miss payment details
Make sure JSON paths in Slack node message fields point to proper Stripe data.
Use the expression editor to set correct paths.
Customization Ideas
- Change Slack channel in any Slack node to notify other teams.
- Add more HubSpot deal properties to update, like payment date.
- Insert an If node to filter payments by currency before updating.
- Add clickable links in Slack messages pointing to HubSpot deal or Stripe invoice.
- Add Email nodes to send parallel alerts besides Slack notifications.
Summary of Benefits
✓ Saves hours of manual payment tracking work weekly.
✓ Reduces errors in updating payment and deal status.
✓ Provides instant team alerts about payments missing info or deals.
✓ Gives real-time visibility into paid invoices in HubSpot.
→ Automates syncing Stripe payments with CRM and team messaging.
