Modèle - Créer du contenu synthétique par ID de prospect
Ceci est unLead Generation, Multimodal AIworkflow d'automatisation du domainecontenant 21 nœuds.Utilise principalement des nœuds comme If, Code, Hubspot, ChainLlm, LmChatOpenAi. Utiliser Bedrijfsdata Web RAG et OpenAI pour générer une description d'entreprise structurée
- •Clé API HubSpot
- •Clé API OpenAI
Nœuds utilisés (21)
Catégorie
{
"id": "bHudG0m9SkFKGeOr",
"meta": {
"instanceId": "04f23e4c433f478fbd7cc8c4ceff447b7061f1e9f3641a5ebf456657ac823807",
"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": "Note adhésive",
"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": "Note adhésive1",
"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": {
"id": "G5an8JqsPZzMrxn7",
"name": "Main (ProspectPro account)"
}
},
"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": "Note adhésive2",
"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 Chaîne",
"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": "Modèle de chat OpenAI",
"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": {
"id": "EqrM5wAZrhmSzbIH",
"name": "OpenAi account"
}
},
"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": "Note adhésive3",
"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": {
"id": "wzKM5qJt7DZvsWOD",
"name": "Bedrijfsdata.nl - XXX003"
}
},
"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": {
"id": "G5an8JqsPZzMrxn7",
"name": "Main (ProspectPro account)"
}
},
"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": "Note adhésive4",
"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": "Note adhésive7",
"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": {
"id": "8J6vWIspjToV6Qwv",
"name": "HubSpot account 2"
}
},
"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,
"pinData": {
"When Executed by Another Workflow": [
{
"json": {
"id": "893958080000"
}
}
]
},
"settings": {
"executionOrder": "v1"
},
"versionId": "c79882b7-a8c3-481a-a51b-e160b93d5b47",
"connections": {
"85c0d25c-20a1-4f13-bf7e-3536cf924007": {
"main": [
[
{
"node": "7d58f0c9-4cae-4a2f-a79d-40a07fb833f7",
"type": "main",
"index": 0
}
]
]
},
"9410d8c1-04d4-4edd-9939-244eff998702": {
"main": [
[
{
"node": "c373d300-3602-44e9-9e63-2b0961b53693",
"type": "main",
"index": 0
}
]
]
},
"c373d300-3602-44e9-9e63-2b0961b53693": {
"main": [
[
{
"node": "8b314b1a-e28a-4c56-8ab5-2c3c2634b1c4",
"type": "main",
"index": 0
}
]
]
},
"Basic LLM Chain": {
"main": [
[
{
"node": "41fba73c-5941-43ff-b90a-3b5f91b33121",
"type": "main",
"index": 0
}
],
[
{
"node": "ed60e3b7-2cc4-4a94-b38a-46f34835e9f0",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"b7cbf5a5-9e46-4a0f-aeb6-77a18c1ebea3": {
"ai_outputParser": [
[
{
"node": "Basic LLM Chain",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"7d58f0c9-4cae-4a2f-a79d-40a07fb833f7": {
"main": [
[
{
"node": "9410d8c1-04d4-4edd-9939-244eff998702",
"type": "main",
"index": 0
}
],
[
{
"node": "83101d3f-3f3b-4edd-b5fc-95b389a081bf",
"type": "main",
"index": 0
}
]
]
},
"41fba73c-5941-43ff-b90a-3b5f91b33121": {
"main": [
[],
[
{
"node": "26521172-67ac-4338-bb19-6565e228ad22",
"type": "main",
"index": 0
}
]
]
},
"d9081d3f-c30f-4af2-8a92-62bfcaed9c04": {
"main": [
[
{
"node": "Basic LLM Chain",
"type": "main",
"index": 0
}
],
[
{
"node": "0498edc1-6e5a-47b6-b050-41138f203ff8",
"type": "main",
"index": 0
}
]
]
},
"8b314b1a-e28a-4c56-8ab5-2c3c2634b1c4": {
"main": [
[
{
"node": "d9081d3f-c30f-4af2-8a92-62bfcaed9c04",
"type": "main",
"index": 0
}
]
]
},
"6fb71974-42bf-4238-a56a-2856238d4501": {
"main": [
[
{
"node": "85c0d25c-20a1-4f13-bf7e-3536cf924007",
"type": "main",
"index": 0
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Avancé - Génération de leads, IA Multimodale
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
Olivier
@olivier-nlPartager ce workflow