This workflow corresponds to n8n.io template #7365 — 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 →
{
"id": "bHudG0m9SkFKGeOr",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "TEMPLATE - Create Synthetic Content by Prospect ID",
"tags": [],
"nodes": [
{
"id": "7d58f0c9-4cae-4a2f-a79d-40a07fb833f7",
"name": "Company domain is required",
"type": "n8n-nodes-base.if",
"position": [
0,
128
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "dd68db10-3c91-4f3c-ab79-b07da7724d71",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ !!$json.domain }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "25625218-1a3c-4420-b065-c72c97181e3f",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-432,
-208
],
"parameters": {
"width": 576,
"height": 544,
"content": "## Step 1: start with a domain name\nYou can define your trigger however you like. There's only one requirement: this workflow NEEDS a domain name. As the use case we demonstrate in this template is all about creating human-readable information about companies, we've chosen to start with a company profile.\n\nYou can adjust these settings in this section.\n\n**Important:** as nodes are referenced in the upcoming code node, you need to replace these references when making changes."
},
"typeVersion": 1
},
{
"id": "fa8ba78d-7915-48ae-a2fc-5806334520a9",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
160,
-208
],
"parameters": {
"color": 5,
"width": 848,
"height": 544,
"content": "## Step 2: Get live web content\nWe use 2 different services to retrieve live content from the web:\n1. RAG Domain - Retrieves content from the company's website. Service by [Bedrijfsdata.nl Developer Platform](https://developers.bedrijfsdata.nl).\n2. RAG Search - Retrieves search engine results. Service by [Bedrijfsdata.nl Developer Platform](https://developers.bedrijfsdata.nl).\n\n\nFor \"simple\" use cases like the one demonstrated in this template, we filter out 90% of the content collected. For more complex cases, you'll need to make adjustments in the \"Prepare content to feed to LLM\"-node (and in the prompt later on).\n\n**Important 1:** the more content you provide to the LLM, the more complex your use cases can be. It also increases token usage.\n\n**Important 2:** RAG may fail when the website you want to retrieve content from isn't SEO friendly. **ALWAYS** check if required content is available before executing the LLM-node."
},
"typeVersion": 1
},
{
"id": "c373d300-3602-44e9-9e63-2b0961b53693",
"name": "Get rag search",
"type": "@bedrijfsdatanl/n8n-nodes-bedrijfsdata.bedrijfsdata",
"onError": "continueRegularOutput",
"position": [
432,
128
],
"parameters": {
"q": "={{ $('Company domain is required').item.json.name }} {{ $('Company domain is required').item.json.domain }}",
"resource": "rag",
"operation": "get_search",
"outputOptions": {},
"searchOptions": {
"limit": 10
},
"requestOptions": {}
},
"credentials": {
"bedrijfsdataApi": {
"name": "<your credential>"
}
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "d9081d3f-c30f-4af2-8a92-62bfcaed9c04",
"name": "Content available to proceed?",
"type": "n8n-nodes-base.if",
"position": [
848,
128
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "cbbacb9d-e3c0-4568-83f3-9538ed6847f1",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ !!$json.website_content || !!$json.search_content }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "f811b1f5-fe19-4c71-a69c-bc4172c7e26a",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1024,
-208
],
"parameters": {
"color": 4,
"width": 656,
"height": 544,
"content": "## Step 3: Create synthetic content\nPrompt is set up in such a way it doesn't need changing for simple use cases. You can simply define the content you need in the **Structured Output Parser**, as demonstrated in this template.\n\nFor more complex use cases, you'll need to adjust both the prompt and the output parser.\n\n**Important:** always set a token limit and monitor your token usage during development to avoid unpleasant surprises.\n\n**Important 2:** the RAG approach has allowed us to generate amazing results with very cheap models, such as gpt-3.5-turbo. Try it!"
},
"typeVersion": 1
},
{
"id": "156ce48a-0360-4d38-9b0b-219f4623d5fc",
"name": "Basic LLM Chain",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"onError": "continueErrorOutput",
"position": [
1088,
64
],
"parameters": {
"text": "=Company name:\n{{ $json.basic_information.name }}\n\nCompany SBI:\n{{ $json.basic_information.sbi }}\n\nCompany location:\n{{ $json.basic_information.city }} ({{ $json.basic_information.country_code }})\n\nIndustry on Google:\n{{ $json.basic_information.google_industry || '-' }}\n\nDescription(s):\n{{ $json.website_content.descriptions || \"-\" }}\n\nAbout:\n{{ $json.website_content.about || \"-\" }}\n\nMost important website snippets:\n{{ $json.website_content.website || \"-\" }}\n\nSearch engine result snippets:\n{{ $json.search_content || \"-\" }}",
"batching": {},
"messages": {
"messageValues": [
{
"message": "You assist data engineers in creating parts of company profiles. These profiles are used by people in various professions to assist them in their daily tasks. Stakeholders will define the insights they require. The data engineers will provide you with data and content they've gathered from various online sources. You will combine your general knowledge with the provided input to generate insights. As the input you'll get from the data engineers will not cover all inquiries, you're going to have to read between the lines without making things up. \n\nAdditional requirements:\n- Always output textual values in Dutch (NL)\n- Always adhere to JSON structure that's provided"
}
]
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.7
},
{
"id": "dabfc9cb-cb90-4629-9fe0-8fd28e3ed021",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1088,
208
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {
"maxTokens": 4000
}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "b7cbf5a5-9e46-4a0f-aeb6-77a18c1ebea3",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1232,
192
],
"parameters": {
"jsonSchemaExample": "{\n\t\"company_description\": \"1-2 paragraph description of the company that will be used as input to create target audience selections in the Bedrijfsdata.nl API\",\n \t\"products_and_services\": \"1-2 paragraph highly descriptive description of products and/or services the company offers\",\n \"target_audience\": \"1-2 paragraph highly specific description of the company's target audience. Explicitly mention \\\"required characteristics\\\" of potential customers if applicable, such as company size, location, industry, usage of specific software/platforms.\"\n}"
},
"typeVersion": 1.3
},
{
"id": "849e3f18-1ad5-4182-8105-14a842b5e065",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1696,
-208
],
"parameters": {
"color": 7,
"width": 304,
"height": 544,
"content": "## Step 4: Use your synthetic content\nCongratulations, your synthetic content is ready! You can use it however you like, like:\n\n- Add it to your CRM to improve your sales workflow\n- Telegram it to yourself for manual evaluation\n- Process it to automatically qualify prospects\n- Etc..."
},
"typeVersion": 1
},
{
"id": "85c0d25c-20a1-4f13-bf7e-3536cf924007",
"name": "Get prospect",
"type": "@bedrijfsdatanl/n8n-nodes-prospectpro.prospectpro",
"position": [
-192,
128
],
"parameters": {
"id": "={{ $json.id }}",
"operation": "get",
"requestOptions": {}
},
"credentials": {
"prospectproApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "9410d8c1-04d4-4edd-9939-244eff998702",
"name": "Get RAG domain",
"type": "@bedrijfsdatanl/n8n-nodes-bedrijfsdata.bedrijfsdata",
"position": [
224,
128
],
"parameters": {
"domain": "={{ $json.domain }}",
"resource": "rag",
"operation": "get_domain",
"requestOptions": {}
},
"credentials": {
"bedrijfsdataApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "6fb71974-42bf-4238-a56a-2856238d4501",
"name": "When Executed by Another Workflow",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
-384,
128
],
"parameters": {
"workflowInputs": {
"values": [
{
"name": "id"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "e40ac3bb-9eea-4665-80fc-0d5760f44d7f",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1360,
-208
],
"parameters": {
"width": 816,
"height": 1808,
"content": "# Create Synthetic Content on Demand\nThis workflow utilizes Web RAG & LLM to create synthetic content. It's up to you to determine what (type of) content you want to make: this workflow helps you obtain live website content and feed it into an LLM of your choosing. Simply modify the prompt and use the data and/or content the LLM generates however you like.\n\n**Important:** This workflow **only requires a domain name**. You can remove the \"Get Company\"-node and replace it with another source. Or you could just have the domain name provided by another workflow (this principle is shown in the trigger, just replace \"id\" with \"domain\").\n\n### What can you create?\nOver hundreds of thousands of executions, this workflow has proven itself to be a highly reliable source of custom data-points and content. Here are a couple of things we've already asked it to do:\n\n- Create a company summary (included in this template)\n- Create a high-level overview of products/services a company offers (included in this template)\n- Create a detailed description of a company's target audience (included in this template)\n- Create a personalized sales pitch for a company\n- Determine whether a company is b2b, b2c or a combination of these\n- Determine whether a company matches a specific target audience or niche\n- Determine whether a company is a family business (or not)\n- Determine whether a company is a SaaS company\n\n\nWe've also used this same structure to complete more complex tasks, like creating a **business model canvas**. Tasks like these require modification of the RAG data consumed by the LLM, as well as less-generic prompting.\n\nThe principles used in this template can also be used to generate **images** or **videos**, but we've not yet implemented such a use case at scale. Please share your results with us on [LinkedIn](https://www.linkedin.com/company/bedrijfsdata-nl/) if you decide to do so:).\n\n### Important links\nBedrijfsdata.nl Developers Platform: https://developers.bedrijfsdata.nl\nBedrijfsdata.nl API docs: https://www.bedrijfsdata.nl\n\n## Example 1: Summary (included)\n\n\n## Example 2: Business Analysis\n"
},
"typeVersion": 1
},
{
"id": "8b314b1a-e28a-4c56-8ab5-2c3c2634b1c4",
"name": "Prepare content to feed to LLM",
"type": "n8n-nodes-base.code",
"position": [
640,
128
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "const prospect = $('Get prospect').item.json;\n\nconst website_rag_node = $('Get RAG domain');\nconst website_rag = website_rag_node?.item?.json?.error ? null : website_rag_node?.item?.json;\n\nconst search_rag_node = $('Get rag search');\nconst search_rag = search_rag_node?.item?.json?.error ? null : search_rag_node?.item?.json;\n\nconst basic_information = {\n name: website_rag?.home_company || prospect.name,\n city: prospect.city,\n country_code: prospect.country_code,\n domain: prospect.domain,\n sbi: prospect.sbi,\n ...(!!prospect.google_industry && { google_industry: prospect.google_industry })\n};\n\nconst website_content = !website_rag ? null : {\n keywords: website_rag.texts.profiles_keywords,\n descriptions: website_rag.texts.profiles_descriptions,\n about: website_rag.texts.about_metaarticle_sum,\n website: website_rag.texts.all_metaarticle_sum\n}\n\nconst search_content = !search_rag ? null : {\n ...(!!search_rag.results.length && {\n results: search_rag.results.filter(result => !!result.snippets && !!result.description).map((result) => {\n return {\n url: result.url,\n description: result.description,\n snippets: result.snippets\n }\n })\n })\n}\n\nreturn {\n basic_information,\n ...(!!website_content && { website_content }),\n ...(!!search_content && { search_content })\n};"
},
"typeVersion": 2
},
{
"id": "79229da2-1a5a-4427-b739-05826e336dfd",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-432,
352
],
"parameters": {
"color": 3,
"width": 2432,
"height": 208,
"content": "## Error handling\nPlease always handle potential errors properly.\n\n**For example**: log in Google Sheet, send Slack/Telegram/email notification."
},
"typeVersion": 1
},
{
"id": "83101d3f-3f3b-4edd-b5fc-95b389a081bf",
"name": "Error type 1: invalid input",
"type": "n8n-nodes-base.noOp",
"position": [
224,
400
],
"parameters": {},
"typeVersion": 1
},
{
"id": "0498edc1-6e5a-47b6-b050-41138f203ff8",
"name": "Error type 2: RAG error",
"type": "n8n-nodes-base.noOp",
"position": [
1072,
400
],
"parameters": {},
"typeVersion": 1
},
{
"id": "ed60e3b7-2cc4-4a94-b38a-46f34835e9f0",
"name": "Error type 3: LLM error",
"type": "n8n-nodes-base.noOp",
"position": [
1440,
400
],
"parameters": {},
"typeVersion": 1
},
{
"id": "41fba73c-5941-43ff-b90a-3b5f91b33121",
"name": "Update company description",
"type": "n8n-nodes-base.hubspot",
"onError": "continueErrorOutput",
"position": [
1792,
128
],
"parameters": {
"resource": "company",
"companyId": {
"__rl": true,
"mode": "id",
"value": "={{ $('When Executed by Another Workflow').item.json.id }}"
},
"operation": "update",
"updateFields": {
"description": "={{ $json.output.company_description }}"
},
"authentication": "oAuth2"
},
"credentials": {
"hubspotOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "26521172-67ac-4338-bb19-6565e228ad22",
"name": "Error type 4: Hubspot error",
"type": "n8n-nodes-base.noOp",
"position": [
1808,
400
],
"parameters": {},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "c79882b7-a8c3-481a-a51b-e160b93d5b47",
"connections": {
"Get prospect": {
"main": [
[
{
"node": "Company domain is required",
"type": "main",
"index": 0
}
]
]
},
"Get RAG domain": {
"main": [
[
{
"node": "Get rag search",
"type": "main",
"index": 0
}
]
]
},
"Get rag search": {
"main": [
[
{
"node": "Prepare content to feed to LLM",
"type": "main",
"index": 0
}
]
]
},
"Basic LLM Chain": {
"main": [
[
{
"node": "Update company description",
"type": "main",
"index": 0
}
],
[
{
"node": "Error type 3: LLM error",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Basic LLM Chain",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Company domain is required": {
"main": [
[
{
"node": "Get RAG domain",
"type": "main",
"index": 0
}
],
[
{
"node": "Error type 1: invalid input",
"type": "main",
"index": 0
}
]
]
},
"Update company description": {
"main": [
[],
[
{
"node": "Error type 4: Hubspot error",
"type": "main",
"index": 0
}
]
]
},
"Content available to proceed?": {
"main": [
[
{
"node": "Basic LLM Chain",
"type": "main",
"index": 0
}
],
[
{
"node": "Error type 2: RAG error",
"type": "main",
"index": 0
}
]
]
},
"Prepare content to feed to LLM": {
"main": [
[
{
"node": "Content available to proceed?",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Get prospect",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
bedrijfsdataApihubspotOAuth2ApiopenAiApiprospectproApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
Source: https://n8n.io/workflows/7365/ — 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.
This template qualifies and segments B2B prospects in ProspectPro using live web data and AI. It retrieves website content and search snippets, processes them with an LLM, and updates the prospect rec
Turns a plain name + email into a fully-enriched HubSpot contact by matching the person in Apollo, pulling their latest LinkedIn activity, summarising the findings with GPT-4o, and upserting the clean
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.