This workflow corresponds to n8n.io template #3345 — we link there as the canonical source.
This workflow follows the Chainllm → Execute Workflow Trigger recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"nodes": [
{
"id": "0c71b4d0-6242-4aa0-abde-57b7961b19dd",
"name": "When clicking \u2018Test workflow\u2019",
"type": "n8n-nodes-base.manualTrigger",
"position": [
0,
-220
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a87bafb7-fe4d-4125-91f0-d9cb07271d37",
"name": "If connected",
"type": "n8n-nodes-base.if",
"position": [
4620,
-620
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "78b4685c-1cfb-4801-a671-8fe035138ed3",
"name": "If not message sent",
"type": "n8n-nodes-base.if",
"position": [
4840,
-720
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "1f61c7ce-f4be-44c8-8e0b-41a55301b4af",
"name": "If not invite sent",
"type": "n8n-nodes-base.if",
"position": [
4840,
-420
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "57aaf87f-6d84-40e5-9d99-94c67f6dbc40",
"name": "Update message sent",
"type": "n8n-nodes-base.googleSheets",
"position": [
5280,
-545
],
"parameters": {},
"typeVersion": 4.5
},
{
"id": "8ff459a0-9023-4e73-b82e-79925bf1304e",
"name": "Update invite sent",
"type": "n8n-nodes-base.googleSheets",
"position": [
5280,
-245
],
"parameters": {},
"typeVersion": 4.5
},
{
"id": "be8df92c-6072-457b-bb9c-a37fa806e46a",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
0,
-420
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "94fdb018-6bcd-4bd1-ad64-c540bffaa635",
"name": "Update is relation",
"type": "n8n-nodes-base.googleSheets",
"position": [
5060,
-620
],
"parameters": {},
"typeVersion": 4.5
},
{
"id": "18889bd9-6746-4c0f-a01b-3a6c24556420",
"name": "If relation?",
"type": "n8n-nodes-base.if",
"position": [
4180,
-620
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "b797df08-23ff-474c-a850-40cf19f33a52",
"name": "Generate email",
"type": "n8n-nodes-base.executeWorkflow",
"notes": "Calling subworkflow (see under)",
"onError": "continueRegularOutput",
"position": [
3740,
-620
],
"parameters": {},
"notesInFlow": true,
"typeVersion": 1.2
},
{
"id": "c1db5f92-e443-47fd-bc13-9c9c94defa2f",
"name": "Search for user profile",
"type": "n8n-nodes-base.httpRequest",
"notes": "Search by Name and company",
"position": [
880,
-620
],
"parameters": {},
"executeOnce": false,
"notesInFlow": true,
"typeVersion": 4.2,
"alwaysOutputData": false
},
{
"id": "c7baf889-8002-4f34-bb13-814544bd3382",
"name": "Get profile posts",
"type": "n8n-nodes-base.httpRequest",
"position": [
1320,
-420
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 4.2,
"alwaysOutputData": true
},
{
"id": "6856b9b2-263e-4542-b57f-bae59d8eb279",
"name": "Split Out",
"type": "n8n-nodes-base.splitOut",
"position": [
1540,
-420
],
"parameters": {},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "b70be38f-ab85-4386-94de-8be19f430f30",
"name": "Limit",
"type": "n8n-nodes-base.limit",
"position": [
1980,
-420
],
"parameters": {},
"typeVersion": 1
},
{
"id": "2037083b-65ff-423e-add9-82631ab8c4e1",
"name": "Aggregate",
"type": "n8n-nodes-base.aggregate",
"position": [
2160,
-420
],
"parameters": {},
"typeVersion": 1
},
{
"id": "bcca8db0-ecaf-43be-819f-85a5b3161a4e",
"name": "Get company posts",
"type": "n8n-nodes-base.httpRequest",
"position": [
2640,
-420
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 4.2,
"alwaysOutputData": true
},
{
"id": "1e92021e-af03-4cb4-a542-843ce287c066",
"name": "Split Out1",
"type": "n8n-nodes-base.splitOut",
"position": [
2860,
-420
],
"parameters": {},
"typeVersion": 1
},
{
"id": "27b9b333-f2d8-4b73-8ab9-17f2e47f319c",
"name": "Limit1",
"type": "n8n-nodes-base.limit",
"position": [
3300,
-420
],
"parameters": {},
"typeVersion": 1
},
{
"id": "40535e7e-aa33-4c23-92e8-2ba996b0cb7d",
"name": "Aggregate1",
"type": "n8n-nodes-base.aggregate",
"position": [
3520,
-420
],
"parameters": {},
"typeVersion": 1
},
{
"id": "fd2ff6c9-31cf-45e8-b598-8005c459e83f",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
840,
-820
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "e67ec580-0a55-49d4-9252-69fc92bf2eae",
"name": "Set your data here",
"type": "n8n-nodes-base.set",
"position": [
220,
-270
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "7df4051a-72fb-460b-92fa-39a2bd4cdbdc",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-90,
-1060
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "0f8f39ec-0885-46de-80db-3b95fb4dfce5",
"name": "If username is empty",
"type": "n8n-nodes-base.if",
"position": [
1100,
-620
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "52114828-975f-4e52-bb9e-f2defa063bec",
"name": "If company ID is empty",
"type": "n8n-nodes-base.if",
"position": [
2420,
-620
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "95981f8d-fcd8-4494-a5ce-85977f323222",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
2380,
-820
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "ea632274-5035-47bf-beee-05860cdf86e4",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
240,
500
],
"parameters": {},
"typeVersion": 1
},
{
"id": "1ef7ef7b-e7d7-4aaf-b70f-fdbddba806ad",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
360,
500
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "be4e2a75-7b5d-447e-9f0f-aeb75d57cc33",
"name": "Generate Subject and cover letter based on match",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
200,
280
],
"parameters": {},
"typeVersion": 1.5
},
{
"id": "80b3d58d-2d4e-4bff-b4d4-7483a7395c1b",
"name": "When Executed by Another Workflow",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
-20,
280
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "d84a32f0-e326-496f-a688-8ecd5757cb42",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-80,
-40
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "52d25040-1923-448f-b576-67b67b73e162",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
180,
140
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "aed8cbe1-b382-4fed-858e-147ba7bc8fe0",
"name": "Set response to 0 - 2",
"type": "n8n-nodes-base.set",
"position": [
3520,
-720
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "32bd210f-6366-4fda-92c9-8e5f2497c009",
"name": "Set response to 0 - 1",
"type": "n8n-nodes-base.set",
"position": [
2180,
-740
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "01468467-9d2b-4eb3-a93a-a25c95ccafd2",
"name": "Fetch Data",
"type": "n8n-nodes-base.googleSheets",
"position": [
440,
-270
],
"parameters": {},
"typeVersion": 4.5
},
{
"id": "27758dfa-11d2-45e2-88bc-0563a2ac36fa",
"name": "Update data",
"type": "n8n-nodes-base.googleSheets",
"position": [
3960,
-620
],
"parameters": {},
"typeVersion": 4.5
},
{
"id": "6f8bf3c8-5cbd-4eee-a4b6-4bf808453554",
"name": "Set is_connection",
"type": "n8n-nodes-base.set",
"position": [
4400,
-720
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "21189e0e-fbc2-4e2f-86f0-dfe6cc53f33d",
"name": "Is it a connection?",
"type": "n8n-nodes-browserflow.browserflow",
"position": [
4400,
-420
],
"parameters": {},
"typeVersion": 1
},
{
"id": "0e555129-caa2-42aa-bc04-67ef467e0e1a",
"name": "Send message with LinkedIn",
"type": "n8n-nodes-browserflow.browserflow",
"position": [
5060,
-820
],
"parameters": {},
"typeVersion": 1
},
{
"id": "6a31ff75-767f-44f1-a1d6-f36ee4b42e98",
"name": "Send connection request",
"type": "n8n-nodes-browserflow.browserflow",
"position": [
5060,
-420
],
"parameters": {},
"typeVersion": 1
},
{
"id": "5a5f1e4c-8ba4-4a3a-ae2a-cbba705358af",
"name": "Next item",
"type": "n8n-nodes-base.splitInBatches",
"position": [
660,
-270
],
"parameters": {},
"typeVersion": 3
},
{
"id": "5f5d0d99-f5db-4b5d-bc04-7d3fd7143293",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
3690,
-1020
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "9b52eef3-6b9e-4a8f-93fb-02b68d9ae2cd",
"name": "Sort",
"type": "n8n-nodes-base.sort",
"position": [
3080,
-420
],
"parameters": {},
"typeVersion": 1
},
{
"id": "fd218308-e57d-42ef-905b-c0a900dd179f",
"name": "Sort1",
"type": "n8n-nodes-base.sort",
"position": [
1760,
-420
],
"parameters": {},
"typeVersion": 1
},
{
"id": "82c8aba2-9a19-4715-8b42-212ac6a9d41d",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
680,
-1060
],
"parameters": {
"content": ""
},
"typeVersion": 1
}
],
"connections": {
"Sort": {
"main": [
[
{
"node": "Limit1",
"type": "main",
"index": 0
}
]
]
},
"Limit": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Sort1": {
"main": [
[
{
"node": "Limit",
"type": "main",
"index": 0
}
]
]
},
"Limit1": {
"main": [
[
{
"node": "Aggregate1",
"type": "main",
"index": 0
}
]
]
},
"Aggregate": {
"main": [
[
{
"node": "If company ID is empty",
"type": "main",
"index": 0
}
]
]
},
"Next item": {
"main": [
[],
[
{
"node": "Search for user profile",
"type": "main",
"index": 0
}
]
]
},
"Split Out": {
"main": [
[
{
"node": "Sort1",
"type": "main",
"index": 0
}
]
]
},
"Aggregate1": {
"main": [
[
{
"node": "Generate email",
"type": "main",
"index": 0
}
]
]
},
"Fetch Data": {
"main": [
[
{
"node": "Next item",
"type": "main",
"index": 0
}
]
]
},
"Split Out1": {
"main": [
[
{
"node": "Sort",
"type": "main",
"index": 0
}
]
]
},
"Update data": {
"main": [
[
{
"node": "If relation?",
"type": "main",
"index": 0
}
]
]
},
"If connected": {
"main": [
[
{
"node": "If not message sent",
"type": "main",
"index": 0
}
],
[
{
"node": "If not invite sent",
"type": "main",
"index": 0
}
]
]
},
"If relation?": {
"main": [
[
{
"node": "Set is_connection",
"type": "main",
"index": 0
}
],
[
{
"node": "Is it a connection?",
"type": "main",
"index": 0
}
]
]
},
"Generate email": {
"main": [
[
{
"node": "Update data",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Set your data here",
"type": "main",
"index": 0
}
]
]
},
"Get company posts": {
"main": [
[
{
"node": "Split Out1",
"type": "main",
"index": 0
}
]
]
},
"Get profile posts": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Generate Subject and cover letter based on match",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Set is_connection": {
"main": [
[
{
"node": "If connected",
"type": "main",
"index": 0
}
]
]
},
"If not invite sent": {
"main": [
[
{
"node": "Send connection request",
"type": "main",
"index": 0
}
]
]
},
"Set your data here": {
"main": [
[
{
"node": "Fetch Data",
"type": "main",
"index": 0
}
]
]
},
"Update invite sent": {
"main": [
[
{
"node": "Next item",
"type": "main",
"index": 0
}
]
]
},
"Update is relation": {
"main": [
[]
]
},
"If not message sent": {
"main": [
[
{
"node": "Send message with LinkedIn",
"type": "main",
"index": 0
}
],
[
{
"node": "Update is relation",
"type": "main",
"index": 0
}
]
]
},
"Is it a connection?": {
"main": [
[
{
"node": "If connected",
"type": "main",
"index": 0
}
]
]
},
"Update message sent": {
"main": [
[
{
"node": "Next item",
"type": "main",
"index": 0
}
]
]
},
"If username is empty": {
"main": [
[
{
"node": "Set response to 0 - 1",
"type": "main",
"index": 0
}
],
[
{
"node": "Get profile posts",
"type": "main",
"index": 0
}
]
]
},
"Set response to 0 - 1": {
"main": [
[
{
"node": "If company ID is empty",
"type": "main",
"index": 0
}
]
]
},
"Set response to 0 - 2": {
"main": [
[
{
"node": "Generate email",
"type": "main",
"index": 0
}
]
]
},
"If company ID is empty": {
"main": [
[
{
"node": "Set response to 0 - 2",
"type": "main",
"index": 0
}
],
[
{
"node": "Get company posts",
"type": "main",
"index": 0
}
]
]
},
"Search for user profile": {
"main": [
[
{
"node": "If username is empty",
"type": "main",
"index": 0
}
]
]
},
"Send connection request": {
"main": [
[
{
"node": "Update invite sent",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Generate Subject and cover letter based on match",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Send message with LinkedIn": {
"main": [
[
{
"node": "Update message sent",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Generate Subject and cover letter based on match",
"type": "main",
"index": 0
}
]
]
},
"When clicking \u2018Test workflow\u2019": {
"main": [
[
{
"node": "Set your data here",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Disclaimer: As this workflow uses a Community node, it is available only to self-hosted installation of n8n
Source: https://n8n.io/workflows/3345/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
AI Blog Publisher – Automated Blog Content Workflow This workflow is designed for individuals and teams who regularly publish content on their blog and want to automate the entire process from start t
This template attempts to replicate OpenAI's DeepResearch feature which, at time of writing, is only available to their pro subscribers.
The best content automation template in the market is now even better—with “deep research” on time-sensitive topics\! Unlike most n8n content automation templates that are mainly for “demo purposes,”
Typeform IA - YT. Uses typeformTrigger, agent, lmChatOpenAi, toolWorkflow. Event-driven trigger; 75 nodes.
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.