Skip to main content

Enrich HubSpot contacts with LinkedIn profiles using SerpAPI, Google Docs and AI

Workflow preview

Workflow preview
100%
Enrich HubSpot contacts with LinkedIn profiles using SerpAPI, Google Docs and AI preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

HubSpot Lead Refinement How it works Triggers: HubSpot Trigger: Fires when contacts are created/updated. Manual Trigger: Run on demand for testing or batch checks. Get Recently Created/Updated C...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.agent, n8n-nodes-base.hubspot, @n8n/n8n-nodes-langchain.toolserpapi, n8n-nodes-base.hubspottrigger, n8n-nodes-base.manualtrigger, n8n-nodes-base.code, n8n-nodes-base.googledocstool, n8n-nodes-base.set

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Enrich HubSpot contacts with LinkedIn profiles using SerpAPI, Google Docs and AI
Workflow name
Enrich HubSpot contacts with LinkedIn profiles using SerpAPI, Google Docs and AI

HubSpot Lead Refinement

🚀 How it works

Triggers:

  • HubSpot Trigger: Fires when contacts are created/updated.
  • Manual Trigger: Run on demand for testing or batch checks.
  • Get Recently Created/Updated Contacts: Pulls fresh contacts from HubSpot.
  • Edit Fields (Set): Maps key fields (First Name, Last Name, Email) for the Agent.

AI Agent:

  • First reads your Google Doc (via the Google Docs tool) to learn the research steps and output format.
  • Then uses SerpAPI (Google engine) to locate the contact’s likely LinkedIn profile and produce a concise result.
  • Code – Remove Think Part: Cleans the model output (removes hidden “think” blocks / formatting) so only the final answer remains.
  • HubSpot Update: Writes the cleaned LinkedIn URL to the contact (via email match).

🔑 Required Credentials:

  • HubSpot App Token (Private App) — for Get/Update contact nodes.
  • HubSpot Developer OAuth (optional) — if you use the HubSpot * Trigger node for event-based runs.
  • Google Service Account — for the Google Docs tool (share your * playbook doc with this service account).
  • OpenRouter — for the OpenRouter Chat Model used by the AI Agent.
  • SerpAPI — for targeted Google searches from within the Agent.

🛠️ Setup Instructions

HubSpot

  • Create a Private App and copy the Access Token.
  • Add or confirm the contact property linkedinUrl (Text).
  • Plug the token into the HubSpot nodes.
  • If using HubSpot Trigger, connect your Developer OAuth app and subscribe to contact create/update events.

Google Docs (Living Instructions)

➡️ Sample configuration doc file

  • Copy the sample doc file and modify to your need.
  • Share the doc with your Google Service Account (Viewer is fine).
  • In the Read Google Docs node, paste the Document URL.

OpenRouter & SerpAPI

  • Add your OpenRouter key to the OpenRouter Chat Model credential.
  • Add your SerpAPI key to the SerpAPI tool node.
  • (Optional) In your Google Doc or Agent prompt, set sensible defaults for SerpAPI (engine=google, hl=en, gl=us, num=5, max 1–2 searches).

What you get

  • Auto-enriched contacts with a LinkedIn URL and profile insights (clean, validated output).
  • A research process you can change anytime by editing the Google Doc—no workflow changes needed.
  • Tight, low-noise searches via SerpAPI to keep costs down.

And that’s it—publish and let the Agent enrich new leads automatically while you refine the rules in your doc. It allows handing off to a team who wouldn't necessarily tweak the automation nodes.

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 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 2 - HubSpot

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

Block 3 - SerpAPI

Type / Role
@n8n/n8n-nodes-langchain.toolSerpApi - toolSerpApi
Config choices
Version 1

Block 4 - Get recently created/updated contacts

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

Block 5 - HubSpot Trigger

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

Block 6 - When clicking ‘Execute workflow’

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

Block 7 - Code - Remove Think part

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

Block 8 - Read Google Docs

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

Block 9 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - OpenRouter Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 11 - Sticky Note

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

Block 12 - Sticky Note1

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

Block 13 - Sticky Note2

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

Block 14 - Sticky Note3

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

Block 15 - Sticky Note4

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

Block 16 - Sticky Note5

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

3. Summary Table

Workflow Enrich HubSpot contacts with LinkedIn profiles using SerpAPI, Google Docs and AI
Complexity advanced
Nodes 16
Categories Lead Generation, AI Chatbot
Author Axiomlab.dev
Published 09 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8434/8434.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 Enrich HubSpot contacts with LinkedIn profiles using SerpAPI, Google Docs and AI do?

HubSpot Lead Refinement How it works Triggers: HubSpot Trigger: Fires when contacts are created/updated. Manual Trigger: Run on demand for testing or batch checks. Get Recently Created/Updated C...

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, AI Chatbot use case.