DEV Community

Softomate solutions
Softomate solutions

Posted on

Building a client onboarding automation for a UK professional services firm: n8n workflow walkthrough with HubSpot, DocuSign, and Google Drive

This is a full technical walkthrough of the client onboarding automation we built for a London financial consultancy. The workflow saves 22 hours per week and runs completely without human input once a deal is won in HubSpot.

TRIGGER: DEAL MOVED TO WON IN HUBSPOT

The workflow triggers on the HubSpot Deal Stage Changed webhook. In HubSpot, go to Settings, Integrations, Private Apps, create a new private app with these scopes: crm.objects.deals.read, crm.objects.contacts.read, crm.objects.companies.read. Copy the access token.

In n8n, add a HubSpot Trigger node. Set it to Deal Stage Changed. Add a Filter node after it: only continue if dealstage equals closedwon.

DATA COLLECTION STEP

Add a HubSpot node in Get mode. Get the Deal by ID using the deal ID from the trigger payload. Then get the associated Contact using the associations.contacts.results[0].id from the deal response. Then get the associated Company.

You now have all the data needed for the rest of the workflow: client name, company name, email, deal value, service type, start date.

STEP 1: GENERATE THE PROPOSAL PDF

Add an HTTP Request node. POST to your PDF generation API (we use PDFMonkey but pdf.co and DocRaptor work similarly). In the body, map the fields from the HubSpot data to your template variables. The response includes a download URL for the generated PDF.

STEP 2: SEND DOCUSIGN ENVELOPE

Add an HTTP Request node. POST to the DocuSign eSignature API endpoint. In the envelope definition, embed the PDF URL from step 1. Set the signer email and name from the HubSpot contact data. Set the signing tab positions to match your contract signature fields. DocuSign returns an envelopeId in the response. Store this using the Set node for later reference.

STEP 3: CREATE GOOGLE DRIVE FOLDER STRUCTURE

Add a Google Drive node. Create a folder named after the company under your Clients parent folder. Then create seven subfolders inside it: Contracts, Proposals, Onboarding, Meeting Notes, Deliverables, Invoices, Correspondence.

Map the main folder ID from the Google Drive response to a Set node field. You will use this URL in the HubSpot note later.

STEP 4: SEND CALENDLY INVITATION

Use Calendly API to create a one-off event type for the onboarding call. POST to the Calendly single-use scheduling link endpoint with the client email pre-filled. Send the scheduling URL to the client via HubSpot Engagement API as a task with a note.

STEP 5: CREATE XERO INVOICE

Add an HTTP Request node. POST to the Xero Invoices API. Map deal value to InvoiceAmount. Set DueDate to 30 days from today using n8n date expression. Set ContactID to the Xero contact matching the company (requires a pre-lookup step using the Xero Contacts GET endpoint filtered by company name).

STEP 6: UPDATE HUBSPOT WITH ALL REFERENCES

Create a HubSpot note on the deal with: Google Drive folder link, DocuSign envelope ID, Calendly scheduling link, Xero invoice number. Set deal property Onboarding Status to In Progress.

ERROR HANDLING

Add an Error Trigger workflow. If any step in the main workflow fails, post a Slack message to a dedicated channel with: company name, step that failed, error message, deal URL. This gives a human a five-minute window to intervene before the client notices anything went wrong.

Full business process automation service: softomatesolutions.com/business-process-automation-london/

Top comments (0)