This workflow corresponds to n8n.io template #9058 — we link there as the canonical source.
This workflow follows the Form Trigger → OpenAI 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": "5MtO3uahWJoQ7FAC",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Generate and enrich a blog outline using GPT-4o & Tavily",
"tags": [],
"nodes": [
{
"id": "a115791a-30b2-47a0-85fb-d27e9d22811d",
"name": "Generate research questions",
"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": {
"name": "<your credential>"
}
},
"typeVersion": 1.8
},
{
"id": "f58f5390-254a-4dac-840b-89f7670cf632",
"name": "Split out list of questions into separate items",
"type": "n8n-nodes-base.splitOut",
"position": [
640,
112
],
"parameters": {
"options": {},
"fieldToSplitOut": "message.content.outline"
},
"typeVersion": 1
},
{
"id": "9ac43406-ca6c-45fb-8c69-49607d996ff9",
"name": "Answer research questions",
"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": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "f3cfa3ff-0d94-4032-87d1-62c5142560f8",
"name": "Add answers to 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": "Turn into one big item",
"type": "n8n-nodes-base.aggregate",
"position": [
1696,
112
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData",
"destinationFieldName": "outline"
},
"typeVersion": 1
},
{
"id": "dbcea747-de4e-4e34-bc70-ccc5d5c8b62f",
"name": "Convert JSON to 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": "Continue workflow",
"type": "n8n-nodes-base.noOp",
"position": [
2400,
112
],
"parameters": {},
"typeVersion": 1
},
{
"id": "968c5579-577a-4caa-a6f3-8eb1ca77cf41",
"name": "Enter keyword",
"type": "n8n-nodes-base.formTrigger",
"position": [
-64,
112
],
"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": "Sticky Note",
"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 \u2014 you can use a free account for testing\n3. Install the Tavily community node. If you don\u2019t 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\u2019t 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": "Sticky Note1",
"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": "Sticky Note2",
"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": "Sticky Note3",
"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": "Sticky Note4",
"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": "Sticky Note5",
"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": "Sticky Note6",
"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": "Sticky Note7",
"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": "Sticky Note8",
"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,
"settings": {
"executionOrder": "v1"
},
"versionId": "cdd1fb90-3e24-4da3-bf02-561833fc6ecb",
"connections": {
"Enter keyword": {
"main": [
[
{
"node": "Generate research questions",
"type": "main",
"index": 0
}
]
]
},
"Turn into one big item": {
"main": [
[
{
"node": "Convert JSON to markdown",
"type": "main",
"index": 0
}
]
]
},
"Add answers to sections": {
"main": [
[
{
"node": "Turn into one big item",
"type": "main",
"index": 0
}
]
]
},
"Convert JSON to markdown": {
"main": [
[
{
"node": "Continue workflow",
"type": "main",
"index": 0
}
]
]
},
"Answer research questions": {
"main": [
[
{
"node": "Add answers to sections",
"type": "main",
"index": 0
}
]
]
},
"Generate research questions": {
"main": [
[
{
"node": "Split out list of questions into separate items",
"type": "main",
"index": 0
}
]
]
},
"Split out list of questions into separate items": {
"main": [
[
{
"node": "Answer research questions",
"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.
openAiApitavilyApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Turn 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,…
Source: https://n8n.io/workflows/9058/ — 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.
Deep Multiline Icebreaker automates high-quality, research-led outreach. Feed it a list of leads (emails + websites) and a short product brief via the built-in form; the workflow scrapes each company'
Submit one or more Apple Podcast episode URLs via the built-in n8n form The workflow queries the iTunes API to retrieve each podcast's public RSS feed, then parses the XML to locate the matching episo
Marketing agencies, digital agencies, and freelancers who need to streamline their client onboarding process and create consistent, professional documentation for new clients. Perfect for teams handli
Clone_Viral_TikToks_with_AI_Avatars___Auto_Post_to_9_Platforms_using_Perplexity___Blotato. Uses httpRequest, telegramTrigger, openAi, googleSheets. Event-driven trigger; 42 nodes.
1-Clone_Viral_TikToks_with_AI_Avatars___Auto_Post_to_9_Platforms_using_Perplexity___Blotato. Uses httpRequest, telegramTrigger, openAi, googleSheets. Event-driven trigger; 42 nodes.