Manage B2B referral leads with Gmail, Slack, HubSpot, and Google Sheets

Go to Workflow
0 views
Built by Avkash Kakdiya Avkash Kakdiya
Created on June 03, 2026

Description

Quick overview
This workflow receives B2B referral submissions via a webhook, validates the payload, emails the referrer and referred lead via Gmail, alerts the sales team in Slack, deduplicates and creates records in HubSpot, waits 3 days to send a follow-up if needed, and logs outcomes to Google Sheets.

How it works
Receives a referral submission via a POST webhook and validates that required fields (referrer and lead name/email) are present.
Returns an immediate JSON response indicating success or a 400 validation error listing missing fields.
Structures the referral data into a consistent format (referrer details, lead details, notes, timestamp, and a generated referral ID).
Sends a thank-you email to the referrer via Gmail and posts the referral details to the sales team in Slack.
Searches HubSpot for an existing contact and, if none is found, creates a new HubSpot contact and a new deal in the default pipeline.
Sends an intro/nurture email to the referred lead via Gmail, waits 3 days, checks Gmail for a reply from the lead, and sends an automated follow-up email if no reply is found.
Appends the referral record and follow-up outcome to a Google Sheets “Referrals” worksheet, and posts an alert to a Slack error channel if the final Slack step encounters an issue.

Setup
Configure the source form/website to send a POST request to the workflow webhook URL (path: /referral-submission).
Add Gmail credentials for sending the referrer thank-you, lead nurture email, and optional follow-up, and ensure the sending mailbox can search replies.
Add Slack OAuth2 credentials and set the target channels in the Slack nodes (sales alerts and the error channel).
Add HubSpot credentials and confirm the contact search and deal creation map to your desired properties and pipeline (currently set to the default pipeline).
Add Google Sheets credentials and replace the document ID with your spreadsheet ID, ensuring a sheet named “Referrals” exists with matching columns.

Nodes Used (5)

Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
Google Sheets
n8n-nodes-base.googleSheets
HubSpot
n8n-nodes-base.hubspot
Slack
n8n-nodes-base.slack