Add active Direct Debit payers to HubSpot automatically
When a customer's Direct Debit goes live in GoCardless, their details flow straight into HubSpot so sales and finance always know who is paying you.
When a GoCardless Direct Debit mandate becomes active, sync that customer into HubSpot so sales and finance always know who is paying us. Trigger this workflow on the GoCardless mandate active webhook event. An active mandate is the reliable signal that a new payer has finished onboarding, and GoCardless does not emit a customer created event, so mandate active is the correct proxy.
1. Read the mandate from the webhook payload. GoCardless stores links between resources in a links object rather than flat foreign-key fields, so resolve the customer id from the mandate's links.customer value before fetching anything.
2. Fetch the full customer record from GoCardless with Get Customer using that customer id. Read the email, first name (given_name), last name (family_name), and company name from the returned customer.
3. Look for an existing HubSpot contact that matches the customer's email using Search Contacts, filtering on the email property. Match on email so a customer setting up a new mandate updates their existing contact instead of creating a duplicate.
4. If no contact matches, create one in HubSpot with Create Contact, mapping email, first name, last name, and company. If a contact already matches the email, update that contact with Update Contact by its contact id instead of creating a new one.
5. On both the create and the update, set the contact's lifecycle stage (for example, Customer) and a custom contact property that flags an active Direct Debit along with the mandate reference. Store the mandate id or reference as the property value so finance can trace which mandate is paying, and the CRM shows payment status at a glance.
This is a deterministic field mapping and an email-based upsert with no judgement, so build it as code. The custom Direct Debit flag lives on a custom contact property in HubSpot, so make sure that property exists before the workflow writes to it.
Additional information
What does this prompt do?
- Watches GoCardless for the moment a customer's Direct Debit mandate becomes active.
- Looks up that customer's full details and finds or creates their contact record in HubSpot.
- Matches on email address, so a returning customer is updated instead of duplicated.
- Flags the contact as an active Direct Debit payer with the mandate reference and sets their lifecycle stage, so payment status is visible at a glance.
What do I need to use this?
- A GoCardless account that collects Direct Debit payments.
- A HubSpot account where you manage contacts.
- A custom contact property in HubSpot to hold the Direct Debit status and mandate reference (a quick one-time setup).
How can I customize it?
- Choose which HubSpot lifecycle stage to set when a mandate goes active, for example Customer.
- Decide which contact fields to map across, such as company name or phone number.
- Rename the custom property that flags an active Direct Debit to match your own CRM naming.
Frequently asked questions
Will this create duplicate contacts?
Why does it trigger on an active mandate instead of a new customer?
What details get copied into HubSpot?
Does this work with HubSpot Free?
How quickly does the contact appear in HubSpot?
Related templates
Never lose track of who is paying you.
Turn every new Direct Debit into an up-to-date HubSpot contact, automatically.