n8n

How to Sync Stripe to HubSpot Spend Data?

Keep your CRM aligned with real payments from Stripe. The flow adds each contact total spend into a single field in HubSpot, so teams can segment by revenue and target the right buyers. It suits marketing and growth teams that want clear spend data inside the contact record.

On a set schedule, it pulls all Stripe charges, ignores any charge without a linked customer, and avoids extra API calls by removing duplicate customers. It then gets each customer from Stripe, merges charge and customer data, and sums the captured amounts per contact email. A field check step reads your HubSpot properties and creates the contact field if it does not exist. Finally, it updates HubSpot contacts by email with the total spend value. There is also a branch to see charges without a customer and a separate aggregation for debugging totals.

Setup is simple. Connect Stripe and HubSpot, then review the Configure node to set the contactPropertyId, the display label, and the checkFields flag. Expect faster reporting and cleaner segments, as you move from manual exports to a daily sync that runs in minutes. Use it to power revenue based lists, lifecycle campaigns, and upsell targeting.

What are the key features?

  • Scheduled run that fetches all Stripe charges once per day or at your chosen time
  • Filter that continues only when a charge has a linked customer
  • Duplicate removal to limit repeated Stripe customer lookups and save API calls
  • Stripe customer fetch that enriches charges with customer details
  • Merge step that combines charge and customer data for each record
  • Code step that sums amount captured per contact email and outputs totals
  • HubSpot field check that reads properties and creates the contact field if needed
  • HubSpot update that writes the total spend into the selected contact property using email as the match
  • Debug branch to review charges without a customer and a separate total aggregation for testing
  • Config node to control property id, label, and whether to run field checks

What are the benefits?

  • Reduce manual export and import from 2 hours to 5 minutes per day
  • Streamline revenue to CRM sync by 90 percent with a daily schedule
  • Improve data accuracy by matching contacts on email and creating the needed field automatically
  • Handle thousands of charges without extra API calls by removing duplicate customers
  • Connect Stripe payments and HubSpot contacts for clear revenue segments

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Stripe and HubSpot. See the Tools Required section above for links to create accounts with these services.
  3. Open the Get all charges node and the Get customer node. In the Credential to connect with dropdown, click Create new credential. Follow the on screen steps and paste your Stripe secret key from the Stripe Dashboard under Developers > API keys. Save the credential with a clear name.
  4. Open the Create or update customer node and the HubSpot HTTP Request nodes. In the Credential to connect with dropdown, click Create new credential for HubSpot OAuth2. Follow the on screen login, and grant access to Contacts and Properties permissions. Save the credential with a clear name.
  5. Open the Configure node. Set contactPropertyId to the internal name you want in HubSpot, set contactPropertyLabelName to the display label, and keep checkFields set to true for the first run so the field can be created.
  6. Review the Schedule Trigger. Adjust the time and frequency to match your reporting needs, or keep the default daily run.
  7. Run a test in the editor. Execute the workflow once and watch the If field exists and Create field nodes to confirm the HubSpot property is found or created.
  8. In HubSpot, go to Settings > Properties > Contacts and confirm your contact property exists with the correct internal name.
  9. Open a known contact in HubSpot that matches a Stripe customer email. Confirm the total spend field updates after the run. Note that values are in cents unless you change the code step.
  10. After the first successful run, set checkFields to false in the Configure node to reduce HubSpot API calls. If no contacts update, check the Do nothing branch output for charges without customers and verify Stripe customers have valid emails.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

HubSpot

Sign up

Free: $0 / mo; API access included (private app or OAuth). Limits on Free: 250,000 API calls/day and 100 requests per 10 seconds per private app.

Stripe

Sign up

Pay-as-you-go: $0 / mo; 2.9% + $0.30 per successful domestic card transaction (US).

Credits:
David Sha

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.