Générer et enrichir un plan de blog avec GPT-4o et Tavily
Ceci est unContent Creation, Multimodal AIworkflow d'automatisation du domainecontenant 17 nœuds.Utilise principalement des nœuds comme Set, Code, SplitOut, Aggregate, FormTrigger. Créer un plan de blog factuel avec GPT-4o et des données de recherche Tavily
- •Clé API OpenAI
Nœuds utilisés (17)
Catégorie
{
"id": "5MtO3uahWJoQ7FAC",
"meta": {
"instanceId": "b597f3db206729fea79938d01afc341ae2811ad29d941b24c1597c0110c58f12",
"templateCredsSetupCompleted": true
},
"name": "Generate and enrich a blog outline using GPT-4o & Tavily",
"tags": [],
"nodes": [
{
"id": "a115791a-30b2-47a0-85fb-d27e9d22811d",
"name": "Générer des questions de recherche",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
224,
112
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "GPT-4O"
},
"options": {},
"messages": {
"values": [
{
"content": "=Create an outline and research questions for this keyword: {{ $json.Keyword }}\n"
},
{
"role": "system",
"content": "=You're acting as a research assistant. your job is to take the keyword and come up with 5 to 6 research questions that will be used later down thee line to find information. Output the questions in the following JSON format.\n\n+++JSON+++\n{\n \"outline\": [\n {\n \"section\": \"<section headline>\"\n \"question\": \"<question related to section topic>\"\n },\n {\n \"section\": \"<section headline>\"\n \"question\": \"<question related to section topic>\"\n },\n{\n \"section\": \"<section headline>\"\n \"question\": \"<question related to section topic>\"\n },\n ...continue for each section...\n ]\n}\n+++END JSON+++\n"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "R5mcnwXQyAqWYNFn",
"name": "OpenAi account - SOAX"
}
},
"typeVersion": 1.8
},
{
"id": "f58f5390-254a-4dac-840b-89f7670cf632",
"name": "Séparer la liste de questions en éléments individuels",
"type": "n8n-nodes-base.splitOut",
"position": [
640,
112
],
"parameters": {
"options": {},
"fieldToSplitOut": "message.content.outline"
},
"typeVersion": 1
},
{
"id": "9ac43406-ca6c-45fb-8c69-49607d996ff9",
"name": "Répondre aux questions de recherche",
"type": "@tavily/n8n-nodes-tavily.tavily",
"position": [
992,
112
],
"parameters": {
"query": "={{ $json.question }}",
"options": {
"topic": "general",
"search_depth": "advanced",
"include_answer": "advanced",
"include_domains": []
}
},
"credentials": {
"tavilyApi": {
"id": "qsfFofW0fRkxeCXW",
"name": "Tavily - Personal"
}
},
"typeVersion": 1
},
{
"id": "f3cfa3ff-0d94-4032-87d1-62c5142560f8",
"name": "Ajouter les réponses aux sections",
"type": "n8n-nodes-base.set",
"position": [
1344,
112
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "f0d21628-de35-4fbb-aa23-4bbad7635d4a",
"name": "section_title",
"type": "string",
"value": "={{ $('Split out list of questions into separate items').item.json.section }}"
},
{
"id": "01691bba-98ef-4c60-b69b-a7004e0203f3",
"name": "section_question",
"type": "string",
"value": "={{ $('Split out list of questions into separate items').item.json.question }}"
},
{
"id": "40576892-a95c-4859-8913-3ae1f2a96c55",
"name": "answer",
"type": "string",
"value": "={{ $json.answer }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "ed044b17-d4d5-485d-ba70-da2de93dbd05",
"name": "Transformer en un seul élément global",
"type": "n8n-nodes-base.aggregate",
"position": [
1696,
112
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData",
"destinationFieldName": "outline"
},
"typeVersion": 1
},
{
"id": "dbcea747-de4e-4e34-bc70-ccc5d5c8b62f",
"name": "Convertir JSON en markdown",
"type": "n8n-nodes-base.code",
"position": [
2064,
112
],
"parameters": {
"jsCode": "// n8n Code node (JavaScript)\n\n// Input: JSON array in items[0].json\n// Example: your provided JSON pasted into items[0].json.sections\n// Output: single Markdown string in items[0].json.markdown\n\nconst sections = $input.first().json.outline; \n\nfunction toMarkdown(data) {\n return data.map(section => {\n return `## ${section.section_title}\\n\\n**${section.section_question}**\\n\\n${section.answer}\\n`;\n }).join(\"\\n\");\n}\n\nreturn [\n {\n json: {\n markdown: toMarkdown(sections)\n }\n }\n];\n"
},
"typeVersion": 2
},
{
"id": "4ee2689e-c092-4e2e-8797-e566fff3dbb3",
"name": "Continuer le workflow",
"type": "n8n-nodes-base.noOp",
"position": [
2400,
112
],
"parameters": {},
"typeVersion": 1
},
{
"id": "968c5579-577a-4caa-a6f3-8eb1ca77cf41",
"name": "Saisir le mot-clé",
"type": "n8n-nodes-base.formTrigger",
"position": [
-64,
112
],
"webhookId": "85ff78f8-1b0c-4443-b0e0-a26f54ddb5e1",
"parameters": {
"options": {},
"formTitle": "Outline generator",
"formFields": {
"values": [
{
"fieldLabel": "Keyword",
"placeholder": "What's the keyword you're going for?",
"requiredField": true
}
]
},
"formDescription": "This workflows generates an outline and gets up to date information from Tavily"
},
"typeVersion": 2.3
},
{
"id": "c7ed6f1b-9f5f-41a8-91c2-4332bb43da92",
"name": "Note adhésive",
"type": "n8n-nodes-base.stickyNote",
"position": [
-768,
-272
],
"parameters": {
"color": 7,
"width": 560,
"height": 1200,
"content": "## Overview\n\nTurn your keyword research into a clear, fact-based content outline with this workflow. It splits your keyword into 5-6 subtopics, makes research questions for those subtopics, and uses Tavily to pull answers from real search results. This way your outline is based on real data, not just AI training data, so you can create accurate and reliable content.\n\n## How it works\n\n- Enter a keyword in the form to start the workflow\n- The OpenAI node splits the keyword into 5-6 research subtopics and makes a research question for each one. These questions will be used to enrich the outline later on\n- We split the research questions into separate items so we can process them one by one\n- Each research question is sent to Tavily. Tavily searches the web for answers and returns a short summary\n- Next, we add the answers to our JSON sections\n- We take all the separate items and join them into one list again\n- The JSON outline is converted into Markdown using a code node. The code takes the JSON headers, turns them into Markdown headings (level 2), and puts the answers underneath\n\n## Setup steps\n\n1. Get an [OpenAI API](https://openai.com/api/) key and set up your credentials inside n8n\n2. Sign up for a [Tavily](https://www.tavily.com/) account and get an API key — you can use a free account for testing\n3. Install the Tavily community node. If you don’t want to use a community node, you can call Tavily directly using an HTTP node. Check their [API reference](https://docs.tavily.com/documentation/api-reference/endpoint/search) for what endpoints to call\n4. Run the workflow and enter the keyword you want to target in the form\n5. Adjust the workflow to decide what to do with the Markdown outline\n\n## Requirements\n\n- An [OpenAI API](https://openai.com/api/) key\n- A [Tavily](https://www.tavily.com/) account\n- The Tavily community node installed\n- *(Optional)* If you don’t want to use the Tavily community node, use a regular HTTP node and call the API directly. Check their [API reference](https://docs.tavily.com/documentation/api-reference/endpoint/search) for what endpoints to call\n\n## Workflow customizations\n\n- Instead of using a form to enter your keyword, you can keep all your research in a Google Doc and go through it row by row\n- You can add another AI node at the end to turn the outline into a full article\n- You can put the outline in a Google Doc and send it to a writer using the Google Docs node and the Gmail node"
},
"typeVersion": 1
},
{
"id": "6966d96b-038f-46a7-8fa9-72cf25741652",
"name": "Note adhésive1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-176,
-272
],
"parameters": {
"color": 7,
"width": 320,
"height": 624,
"content": "## Enter keyword\nEnter your main topic into the form. The AI will split it up into 5-6 different subtopics"
},
"typeVersion": 1
},
{
"id": "6990c008-60ab-446f-882e-5fc3dc56139b",
"name": "Note adhésive2",
"type": "n8n-nodes-base.stickyNote",
"position": [
176,
-272
],
"parameters": {
"color": 7,
"width": 320,
"height": 624,
"content": "## Create subtopics and generate research questions\nThis AI node takes the keyword and turns it into 5-6 subtopics. For each subtopic, it generates a research question. These questions will be used to enrich the outline later down the line"
},
"typeVersion": 1
},
{
"id": "afc0bc15-c62a-45ae-8f56-950bc57cc896",
"name": "Note adhésive3",
"type": "n8n-nodes-base.stickyNote",
"position": [
528,
-272
],
"parameters": {
"color": 7,
"width": 320,
"height": 624,
"content": "## Split out questions\nIn this node we split all the research questions into separate items so we can research them\n"
},
"typeVersion": 1
},
{
"id": "066148b2-78dd-4266-bf3f-390ed88dfcc5",
"name": "Note adhésive4",
"type": "n8n-nodes-base.stickyNote",
"position": [
880,
-272
],
"parameters": {
"color": 7,
"width": 320,
"height": 624,
"content": "## Get answers to research questions using Tavily API\nSearch for the research question using Tavily API. This will research our question using up to date search results and synthesize an answer for each research question\n\n:warning: Note :warning:\nThis workflow uses the Tavily community node. You can get the same results by using a HTTP node and calling the Tavily API that way. The community node just makes it slightly easier"
},
"typeVersion": 1
},
{
"id": "afcb6f03-8c62-459c-87b1-7e961178df97",
"name": "Note adhésive5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1232,
-272
],
"parameters": {
"color": 7,
"width": 320,
"height": 624,
"content": "## Add answers to JSON\nAdd our answers to our JSON section outline. Now we have a section title, a main question, and an answer."
},
"typeVersion": 1
},
{
"id": "e3a36778-7206-411e-a80a-d0c5030df51d",
"name": "Note adhésive6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1584,
-272
],
"parameters": {
"color": 7,
"width": 320,
"height": 624,
"content": "## Turn into one list\ncombine all the different sections into one big list again."
},
"typeVersion": 1
},
{
"id": "0b16e614-f068-474f-9ac3-d00fc5c77f8f",
"name": "Note adhésive7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1936,
-272
],
"parameters": {
"color": 7,
"width": 320,
"height": 624,
"content": "## Convert JSON into markdown\nIn this node we take our JSON outline and turn it into a markdown outline. We convert the section titles into headings and add the answer we just researched. We don't really need the questions anymore since the LLMs will use the answers as a guide during writing"
},
"typeVersion": 1
},
{
"id": "ffd676c9-072e-4c67-bc87-7bf484031a2c",
"name": "Note adhésive8",
"type": "n8n-nodes-base.stickyNote",
"position": [
2288,
-272
],
"parameters": {
"color": 7,
"width": 320,
"height": 624,
"content": "## Continue with the workflow\nAdd another AI node to turn the outline into an article or write it to a Google doc and give it to a writer. You now have an outline that is enriched with accurate data instead of relying on the LLMs own training data "
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "cdd1fb90-3e24-4da3-bf02-561833fc6ecb",
"connections": {
"968c5579-577a-4caa-a6f3-8eb1ca77cf41": {
"main": [
[
{
"node": "a115791a-30b2-47a0-85fb-d27e9d22811d",
"type": "main",
"index": 0
}
]
]
},
"ed044b17-d4d5-485d-ba70-da2de93dbd05": {
"main": [
[
{
"node": "dbcea747-de4e-4e34-bc70-ccc5d5c8b62f",
"type": "main",
"index": 0
}
]
]
},
"f3cfa3ff-0d94-4032-87d1-62c5142560f8": {
"main": [
[
{
"node": "ed044b17-d4d5-485d-ba70-da2de93dbd05",
"type": "main",
"index": 0
}
]
]
},
"dbcea747-de4e-4e34-bc70-ccc5d5c8b62f": {
"main": [
[
{
"node": "4ee2689e-c092-4e2e-8797-e566fff3dbb3",
"type": "main",
"index": 0
}
]
]
},
"9ac43406-ca6c-45fb-8c69-49607d996ff9": {
"main": [
[
{
"node": "f3cfa3ff-0d94-4032-87d1-62c5142560f8",
"type": "main",
"index": 0
}
]
]
},
"a115791a-30b2-47a0-85fb-d27e9d22811d": {
"main": [
[
{
"node": "f58f5390-254a-4dac-840b-89f7670cf632",
"type": "main",
"index": 0
}
]
]
},
"f58f5390-254a-4dac-840b-89f7670cf632": {
"main": [
[
{
"node": "9ac43406-ca6c-45fb-8c69-49607d996ff9",
"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é - Création de contenu, 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
Robin Geuens
@robingeuensHi, I'm Robin. I'm a veteran marketer of 7 years and love automation. If you have any questions about automation feel free to reach out to me on LinkedIn: https://www.linkedin.com/in/rgeuens/
Partager ce workflow