Skip to main content

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

Workflow preview

Workflow preview
100%
Manage B2B referral leads with Gmail, Slack, HubSpot, and Google Sheets preview
Open on n8n.io

1. Workflow Overview

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 an...

Best for

  • Lead Generation automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.webhook, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-base.respondtowebhook, n8n-nodes-base.gmail, n8n-nodes-base.slack, n8n-nodes-base.hubspot

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Avkash Kakdiya.

Original n8n.io source

1.1 Workflow description

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

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

  1. Receives a referral submission via a POST webhook and validates that required fields (referrer and lead name/email) are present.
  2. Returns an immediate JSON response indicating success or a 400 validation error listing missing fields.
  3. Structures the referral data into a consistent format (referrer details, lead details, notes, timestamp, and a generated referral ID).
  4. Sends a thank-you email to the referrer via Gmail and posts the referral details to the sales team in Slack.
  5. Searches HubSpot for an existing contact and, if none is found, creates a new HubSpot contact and a new deal in the default pipeline.
  6. 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.
  7. 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

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

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note Main

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Note Step1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note Step2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note Step3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note Step4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Sticky Note Step5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Referral Form Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 8 - Validate Required Fields

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Is Valid Submission?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 10 - Respond — Validation Error

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1

Block 11 - Respond — Success

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1

Block 12 - Extract Referral Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Thank You Email to Referrer

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2

Block 14 - Slack Alert — Sales Team

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2

Block 15 - Check Lead in HubSpot

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2

Block 16 - Is New Lead?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 17 - Create HubSpot Contact

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2

Block 18 - Create HubSpot Deal

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2

Block 19 - Send Nurture Email to Lead

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2

Block 20 - Wait 3 Days

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1

Block 21 - Check for Lead Reply

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2

Block 22 - Did Lead Reply?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 23 - Send Follow-Up Email

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2

Block 24 - Log Referral to Google Sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Manage B2B referral leads with Gmail, Slack, HubSpot, and Google Sheets
Complexity advanced
Nodes 25
Categories Lead Generation
Author Avkash Kakdiya
Published 03 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16078/16078.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Manage B2B referral leads with Gmail, Slack, HubSpot, and Google Sheets do?

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 an...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Generation use case.