AutomationFlowsAI & RAG › AI-Powered Blog Post Generator

AI-Powered Blog Post Generator

Original n8n title: Blog Post

Blog Post. Uses toolHttpRequest, lmChatOpenRouter, agent, httpRequest. Event-driven trigger; 20 nodes.

Event trigger★★★★☆ complexityAI-powered20 nodesTool Http RequestOpenRouter ChatAgentHTTP RequestExecute Workflow TriggerGoogle SheetsOutput Parser StructuredTelegram
AI & RAG Trigger: Event Nodes: 20 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Agent → 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 →

Download .json
{
  "name": "Blog Post",
  "nodes": [
    {
      "parameters": {
        "toolDescription": "Use this tool to search the web. ",
        "method": "POST",
        "url": "https://api.tavily.com/search",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\n  \"query\": \"{searchTerm}\",\n  \"topic\": \"general\",\n  \"search_depth\": \"advanced\",\n  \"chunks_per_source\": 3,\n  \"max_results\": 1,\n  \"time_range\": null,\n  \"days\": 7,\n  \"include_answer\": true,\n  \"include_raw_content\": false,\n  \"include_images\": false,\n  \"include_image_descriptions\": false,\n  \"include_domains\": [],\n  \"exclude_domains\": []\n}",
        "placeholderDefinitions": {
          "values": [
            {
              "name": "searchTerm",
              "description": "What the user is searching for. "
            }
          ]
        }
      },
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "typeVersion": 1.1,
      "position": [
        380,
        380
      ],
      "id": "4b900d3c-a528-42e1-846b-db18a2bdcfd2",
      "name": "Tavily",
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "openai/gpt-4.1",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        520,
        380
      ],
      "id": "426d20a4-3c14-4487-99e4-1342763123a8",
      "name": "GPT_4.1",
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Blog Post: \n{{ $json.output }}",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "=# Overview\nYou are an AI agent that transforms blog posts into visual prompt descriptions for generating graphic marketing materials. These visuals are designed to be paired with the post, helping communicate the message in a visually engaging, brand-aligned way.\n\n## Objective:\n- Read and analyze the given blog post.\n- Identify the main message, insight, or takeaway from the post.\n- Create a clear and compelling graphic prompt that can be used with a text-to-image generator.\n- The result should be a marketing-style graphic \u2014 not a literal scene or hyperrealistic photo \u2014 that:\n1) Visually supports or illustrates the key idea of the post\n2) Looks appropriate for use in a professional LinkedIn feed\n3) Feels polished, modern, and engaging\n\n## Output Instructions:\n- Output two fields: \n1) title (2-4 words) \n2) prompt\n- Output only the final image prompt. Do not output quotation marks.\n- Do not repeat or rephrase the blog post.\n- Do not add any explanations or extra content \u2014 just the image prompt.\n- Never leave things blank like \"Header area reserved for customizable callout text\"\n- Output numeric stats when available in the original post\n\n## Style Guidelines:\n- Think like a brand designer or marketing creative.\n- Visuals may include: text, charts, icons, abstract shapes, overlays, modern illustrations, motion-like effects, bold typography elements (described, not rendered), or metaphorical concepts.\n- You can mention layout suggestions (e.g., \"split screen design,\" \"header with bold title and subtle background illustration\").\n- Assume the output will be generated using AI image tools \u2014 your prompt should guide those tools effectively.\n\n## Example Prompt Format:\nA modern flat-style graphic showing a human brain connected to mechanical gears, representing the fusion of AI and automation. Minimalist background, soft gradients, clean sans-serif text placement space at the top.\n\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.9,
      "position": [
        800,
        100
      ],
      "id": "833f887c-e8b4-43bb-bfdc-ffbea4007979",
      "name": "Image Prompt Agent"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.openai.com/v1/images/generations",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "model",
              "value": "gpt-image-1"
            },
            {
              "name": "prompt",
              "value": "={{ $json.output.prompt.replace(/\"/g, '') }}"
            },
            {
              "name": "size",
              "value": "1024x1024"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1240,
        100
      ],
      "id": "f3a96a29-2bb6-4dcf-914f-212c497171e5",
      "name": "Generate Image",
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "toBinary",
        "sourceProperty": "data[0].b64_json",
        "options": {}
      },
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        1440,
        100
      ],
      "id": "f67fd348-eb31-4cb1-a946-a9039f35463f",
      "name": "Convert to Binary"
    },
    {
      "parameters": {
        "content": "# Content Generation",
        "height": 260,
        "width": 380
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        300,
        0
      ],
      "id": "bd4e0200-b8ac-4d18-88c7-cb976177105f",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "# Generate Image\n",
        "height": 260,
        "width": 460,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1160,
        0
      ],
      "id": "bf1eb372-bb3a-4dcf-872e-9543be91d31e",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "# Image Prompt\n",
        "height": 260,
        "width": 440,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        700,
        0
      ],
      "id": "55890bc5-0c72-4e3a-90f5-839e111804e0",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "content": "## Tool & Model",
        "height": 240,
        "width": 380,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        300,
        280
      ],
      "id": "74c20cea-8d35-4199-9aad-217526c56c6e",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "blogTopic"
            },
            {
              "name": "targetAudience"
            },
            {
              "name": "chatID"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        100,
        100
      ],
      "id": "86843413-5339-4f30-bb06-c4b690dd3d32",
      "name": "When Executed by Another Workflow"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Topic of Blog: {{ $json.blogTopic }}\n\nTarget Audience: {{ $json.targetAudience }}",
        "options": {
          "systemMessage": "=# Overview\nYou are an AI agent specialized in creating professional, educational, and engaging blog articles based on any topic provided by the user.\n\n## Objectives:\nAlways begin by conducting a real-time search using the Tavily tool to gather the most accurate, up-to-date information on the topic. The blog article should be written to appeal to the provided target audience.\n\nBased on your research, generate a well-structured blog post that:\n- Starts with an engaging and informative introduction that sets up the importance of the topic\n- Maintains a professional, clear, and easy-to-read tone\n- Is educational, insightful, and provides depth\n- Uses headers, subheaders, and paragraphs to create good readability\n- Incorporates real data, examples, or case studies, properly attributing sources (e.g., \u201caccording to [source]\u201d)\n- Light on emojis (use only if highly relevant and minimal)\n- Includes a natural conclusion that summarizes key takeaways\n- (Optional but encouraged) Suggests next steps for the reader, such as related articles, resources, or actionable advice\n\n## Output Instructions:\n- Your ONLY output should be the final blog article text.\n- Do not include explanations, notes, or anything beyond the blog content itself.\n\n## Example Workflow:\n1) Receive a topic (e.g., \u201cThe ROI of warehouse automation\u201d)\n2) Use Tavily to search and gather recent information, studies, or examples\n3) Draft a blog post using that research\n4) Format it with an engaging intro, structured sections, source citations, and a natural conclusion"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.9,
      "position": [
        360,
        100
      ],
      "id": "a47f2235-1f20-440d-bb90-a8770d67eaa5",
      "name": "Blog Post Agent"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1JqOTd49heNBdmrf5hSwxI66X724tspAmSjzWoA6-EU0",
          "mode": "list",
          "cachedResultName": "Marketing Team Log",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1JqOTd49heNBdmrf5hSwxI66X724tspAmSjzWoA6-EU0/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1JqOTd49heNBdmrf5hSwxI66X724tspAmSjzWoA6-EU0/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Request": "={{ $('When Executed by Another Workflow').item.json.blogTopic }} for {{ $('When Executed by Another Workflow').item.json.targetAudience }}",
            "ID": "={{ $json.id }}",
            "Link": "={{ $json.webViewLink }}",
            "Post": "={{ $('Blog Post Agent').item.json.output }}",
            "Title": "={{ $('Image Prompt Agent').item.json.output.title }}",
            "Type": "Post"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Title",
              "displayName": "Title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Type",
              "displayName": "Type",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Request",
              "displayName": "Request",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "ID",
              "displayName": "ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Link",
              "displayName": "Link",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Post",
              "displayName": "Post",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        2000,
        260
      ],
      "id": "7a5cef97-9f6d-4800-b397-c2b3b4f0f894",
      "name": "Image Log",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsonSchemaExample": "{\n  \"title\": \"<2-4 word creative title for the image>\",\n  \"prompt\": \"<full detailed image generation prompt>\"\n}\n"
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.2,
      "position": [
        900,
        380
      ],
      "id": "dcf4a7a2-a31a-4caa-9617-1ed4c8f5e50f",
      "name": "Image & Title"
    },
    {
      "parameters": {
        "content": "## Structured Output",
        "height": 240,
        "width": 320,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        780,
        280
      ],
      "id": "b914f287-3d56-4b94-a825-d15a05599fc2",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "chatId": "={{ $('When Executed by Another Workflow').item.json.chatID }}",
        "text": "={{ $('Blog Post Agent').item.json.output }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        2000,
        -40
      ],
      "id": "06389e5f-df04-4fd6-b151-6f2cf2eb2b17",
      "name": "Send Blog",
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "sendPhoto",
        "chatId": "={{ $('When Executed by Another Workflow').item.json.chatID }}",
        "binaryData": true,
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        1780,
        -40
      ],
      "id": "4ee71bc9-7e75-49d3-a606-efdedd63746b",
      "name": "Send Photo",
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "# Trigger\n",
        "height": 260,
        "width": 260,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        20,
        0
      ],
      "id": "ae777be8-b6fc-4ac4-af53-6bc018846e7a",
      "name": "Sticky Note5",
      "disabled": true
    },
    {
      "parameters": {
        "content": "# Write to Drive & Sheets",
        "height": 240,
        "width": 540,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1660,
        180
      ],
      "id": "b7b032a1-f7cf-40e2-a116-8252e2c49eed",
      "name": "Sticky Note6"
    },
    {
      "parameters": {
        "content": "# Send Content",
        "height": 240,
        "width": 540,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1660,
        -120
      ],
      "id": "1e47b7e3-cc51-4efa-b2ba-f67eed783a3b",
      "name": "Sticky Note7"
    },
    {
      "parameters": {
        "name": "={{ $('Image Prompt Agent').item.json.output.title }}.png",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "__rl": true,
          "value": "1TgQu-5hlOzO1X28TMMzLxfhunhPSUIqy",
          "mode": "list",
          "cachedResultName": "AI Image Generation",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1TgQu-5hlOzO1X28TMMzLxfhunhPSUIqy"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        1780,
        260
      ],
      "id": "d56bcc31-e5e4-43d7-81db-58dcd3f789f3",
      "name": "Upload",
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Tavily": {
      "ai_tool": [
        [
          {
            "node": "Blog Post Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "GPT_4.1": {
      "ai_languageModel": [
        [
          {
            "node": "Blog Post Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Image Prompt Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Image Prompt Agent": {
      "main": [
        [
          {
            "node": "Generate Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Image": {
      "main": [
        [
          {
            "node": "Convert to Binary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Blog Post Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Blog Post Agent": {
      "main": [
        [
          {
            "node": "Image Prompt Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to Binary": {
      "main": [
        [
          {
            "node": "Send Photo",
            "type": "main",
            "index": 0
          },
          {
            "node": "Upload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image & Title": {
      "ai_outputParser": [
        [
          {
            "node": "Image Prompt Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Send Photo": {
      "main": [
        [
          {
            "node": "Send Blog",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload": {
      "main": [
        [
          {
            "node": "Image Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "fb91ddf9-2176-4974-9a52-e5352665f2b2",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "sS2JMp5z7YiqtJpa",
  "tags": []
}

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.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

How this works

Create compelling blog posts effortlessly with AI assistance, saving hours of research and writing while ensuring high-quality, original content tailored to your voice. This workflow suits content creators, marketers, and small business owners who need to produce regular posts without a full writing team. It begins with the Image Prompt Agent, which crafts engaging visuals to complement your text, integrating seamlessly with OpenRouter for AI generation and Google Sheets for easy data handling.

Use this workflow when you have a topic idea and want automated drafting plus visuals for platforms like WordPress or Medium, especially for SEO-optimised articles. Avoid it for highly technical or regulated content requiring human expertise, or if you prefer manual control over every detail. Common variations include swapping OpenRouter for another LLM like Claude, or adding social media posting nodes for direct publishing.

About this workflow

Blog Post. Uses toolHttpRequest, lmChatOpenRouter, agent, httpRequest. Event-driven trigger; 20 nodes.

Source: https://github.com/Zie619/n8n-workflows — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Generate AI viral videos with NanoBanana & VEO3, shared on socials via Blotato 2. Uses @blotato/n8n-nodes-blotato, googleSheets, lmChatOpenAi, toolThink. Event-driven trigger; 94 nodes.

@Blotato/N8N Nodes Blotato, Google Sheets, OpenAI Chat +9
AI & RAG

Arvifund - Supabase. Uses httpRequest, telegram, googleSheets, telegramTrigger. Event-driven trigger; 90 nodes.

HTTP Request, Telegram, Google Sheets +8
AI & RAG

Arvifund - Supabase (Fixed v2). Uses httpRequest, telegram, googleSheets, telegramTrigger. Event-driven trigger; 90 nodes.

HTTP Request, Telegram, Google Sheets +9
AI & RAG

Arvifund - Supabase (Fixed v4). Uses httpRequest, telegram, googleSheets, telegramTrigger. Event-driven trigger; 90 nodes.

HTTP Request, Telegram, Google Sheets +9
AI & RAG

Arvifund - Supabase (Fixed v3). Uses httpRequest, telegram, googleSheets, telegramTrigger. Event-driven trigger; 90 nodes.

HTTP Request, Telegram, Google Sheets +9