# Enrich Salesforce accounts with LinkedIn: n8n workflow template

> Started by an event in a connected app, and works across Salesforce. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/enrich-salesforce-accounts-with-linkedin (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Lead generation](https://millionrounds.com/workflows?category=Lead+generation#library)

# Enrich Salesforce accounts with LinkedIn

Started by an event in a connected app, and works across Salesforce. It hands the judgement calls to OpenAI. 28 steps, 2 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fenrich-salesforce-accounts-with-linkedin)

**28 steps** Large: read it before trusting it with anything live

**2** Branches: places the flow splits

**1** Loop or waits

**1** Service it connects to

## The flow

Starts it 1 Model 1 Logic 21 Service 5

The steps in the order they run, from what starts it.

- 1 **SF: On Account Created** Salesforce trigger *Starts it*
- 2 **SF: Get Account** Salesforce *Service*
- 3 **Init Crawl Params** Set *Logic*
- 4 **Prep LinkedIn Search Inputs** Set *Logic*
- 5 **Init Globals** Code *Logic*
- 6 **IF LInkedin URL Missing?** If *Logic*
- 7 **Seed Root Crawl Item** Merge *Logic*
- 8 **DDG Search (LinkedIn)** Http Request *Service*
- 9 **Use Provided URL (Fallback)** Code *Logic*
- 10 **Fetch HTML Page** Http Request *Service*
- 11 **Parse LinkedIn URL** Code *Logic*
- 12 **Merge LinkedIn URL Branches** Merge *Logic*
- 13 **Attach URL/Depth to HTML** Code *Logic*
- 14 **Fetch LinkedIn HTML1** Http Request *Service*
- 15 **Extract Body & Links** Html *Logic*
- 16 **Extract LinkedIn Body** Html *Logic*
- 17 **Queue & Dedup Links** Code *Logic*
- 18 **Parse LinkedIn Company Info** Code *Logic*
- 19 **IF Crawl Depth OK?** If *Logic*
- 20 **Merge Web Pages + LinkedIn JSON** Merge *Logic*
- 21 **Requeue Link Item** Code *Logic*
- 22 **Store Page Data** Set *Logic*
- 23 **Combine & Chunk for LLM** Code *Logic*
- 24 **Loop Links (Batches)** Split In Batches *Logic*
- 25 **Collect Pages & Emit When Done** Code *Logic*
- 26 **Build LLM Prompt** Code *Logic*
- 27 **OpenAI: Generate Insights** Open Ai *Model*
- 28 **Salesforce** Salesforce *Service*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 28, with 2 branches, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Salesforce
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Salesforce account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 28 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 28 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fenrich-salesforce-accounts-with-linkedin)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Salesforce](https://millionrounds.com/workflows?service=Salesforce#library)

## Workflows like it

Also lead generation, with the same services where possible, closest in size first.

- [**Qualify leads with Salesforce and Explorium** 22 steps · calls a model · Salesforce](https://millionrounds.com/workflow/qualify-leads-with-salesforce-and-explorium)
- [**CallForge - 03 - Gong transcript processor** 18 steps · Salesforce](https://millionrounds.com/workflow/callforge-03-gong-transcript-processor)
- [**Balance VIP outreach with Salesforce and Slack** 17 steps · calls a model · Salesforce, Slack](https://millionrounds.com/workflow/balance-vip-outreach-with-salesforce-and-slack)
- [**Sync Salesforce leads and opportunities to PostgreSQL** 17 steps · Postgres, Salesforce](https://millionrounds.com/workflow/sync-salesforce-leads-and-opportunities-to-postgresql)
- [**Qualify & route leads across channels with OpenAI and Slack** 16 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/qualify-and-route-leads-across-channels-with-openai-and-slac)
- [**Sync Salesforce MQL lead journey timelines with Factors.AI** 16 steps · Salesforce](https://millionrounds.com/workflow/sync-salesforce-mql-lead-journey-timelines-with-factors-ai)
