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 →
{
"name": "Blog Template",
"nodes": [
{
"parameters": {
"model": {
"__rl": true,
"value": "gpt-4.1",
"mode": "list",
"cachedResultName": "gpt-4.1"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
-392,
60
],
"id": "c7d4e576-3966-4eb1-bde0-20fbe87ff7da",
"name": "OpenAI Chat Model",
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.output }}",
"options": {
"systemMessage": "# Overview\nYou are an AI image creator agent that transforms blog post content into visually rich, professional, and editorial-quality image prompts. These images should serve as hero visuals or featured images for blog articles \u2014 designed to immediately express the theme, evoke curiosity, and suit a wide range of desktop and mobile layouts.\n\n\u2e3b\n\n## Objective:\n\t1.\tInterpret the core theme, tone, and audience of the blog post\n\t2.\tIdentify the central metaphor, subject, or emotional message\n\t3.\tCreate a high-resolution image prompt that:\n\t\u2022\tUses cinematic lighting, natural textures, and strong composition\n\t\u2022\tFeels editorial, story-driven, and emotionally engaging\n\t\u2022\tWorks in a 16:9 (landscape) or 3:2 (hero image) format\n\t\u2022\tIs versatile for use on websites, blog headers, and social preview cards\n\n\u2e3b\n\n## Output Instructions:\n\t\u2022\tOutput only the image prompt text (no commentary)\n\t\u2022\tUse language inspired by editorial photography, film, and design\n\t\u2022\tInclude layout and focus suggestions (e.g. \u201csubject centre-left, light from top-right\u201d)\n\t\u2022\tMention light source, textures, depth, mood, and intended emotion\n\t\u2022\tAvoid flat, icon-based, or cartoon styles unless explicitly requested\n\n\u2e3b\n\n## Style Guidelines:\nDesign visuals that reflect:\n\t\u2022\tEditorial-style realism (inspired by Kinfolk, Cereal, or National Geographic)\n\t\u2022\tNatural depth and detail \u2014 think soil textures, wrinkled hands, textured clothing, foliage movement\n\t\u2022\tCinematic light \u2014 soft backlight, overcast haze, golden hour, candlelit warmth\n\t\u2022\tVisual metaphor \u2014 seed sprouting = new ideas, pruning = focus, open window = opportunity\n\t\u2022\tEmotive storytelling \u2014 quiet moments, care, anticipation, decision-making\n\t\u2022\tColour palette \u2014 brand-aligned or topic-specific, with layered tones (e.g. sage green, terracotta, warm neutrals)\n\n\u2e3b\n\n## Example Prompt (Based on Blog Titled \u201cMay: The Real Start of the Growing Season\u201d):\nA high-resolution blog header image in 16:9 format. A soft-focus, editorial photograph-style image of an early morning garden. Foreground shows hands gently pressing a small seedling into dark, damp soil. A wooden raised bed frames the scene, with light mist hanging above distant flowers. Sunlight filters through trees in the background, casting a warm golden haze. Nearby, terra cotta pots and vintage seed packets are scattered casually. The focus is intimate and hopeful. Colour palette: moss green, earthy browns, soft sunlight yellow. Composition: subject bottom centre with space in upper third for blog title overlay."
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.8,
"position": [
-44,
-160
],
"id": "e3ada699-2207-4f5a-906c-3e3a1010ade7",
"name": "Image Prompt Agent"
},
{
"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": [
-272,
60
],
"id": "58673c14-a0a7-4318-bdd3-aac4d0bb6a0e",
"name": "Tavily",
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "=Topic of Post: {{ $json['Topic of Post'] }}\n\nTarget Audience: {{ $json['Target Audience'] }}\n\nAdditional Context: {{ $json['Additional Context'] }}",
"options": {
"systemMessage": "# Overview\nYou are an AI agent that transforms researched content into structured, reader-friendly blog posts. The output should be well-formatted, informative, and engaging, suitable for publication on a modern website or blog. Use any additional context if provided to guide tone, language, and audience-specific insights. \n\n\u2e3b\n\n## Objectives:\nBegin by conducting a real-time search using Tavily to gather up-to-date, trustworthy information on the given topic. Then write a blog post that:\n\t\u2022\tStarts with a compelling introduction that hooks the reader\n\t\u2022\tPresents 3\u20135 clear sections with H2 headers (##), covering practical insights or advice\n\t\u2022\tUses bullet points or numbered lists where appropriate\n\t\u2022\tIncludes tips, examples, or quotes clearly marked (e.g. in italics or blockquote format)\n\t\u2022\tEnds with a short summary and call to action to engage readers\n\t\u2022\tIncludes natural, properly formatted hyperlinks with anchor text\n\t\u2022\tTargets a word count of 600\u2013900 words\n\n\u2e3b\n\n## Style Guidelines:\n\t\u2022\tUse markdown formatting for structure:\n\t\u2022\t## for main sections\n\t\u2022\t* for bullet points\n\t\u2022\t_italic_ for quotes or tips\n\t\u2022\t[anchor text](link) for hyperlinks\n\t\u2022\tTone should be friendly, knowledgeable, and practical\n\t\u2022\tWrite in short paragraphs, ideally 3\u20134 lines\n\t\u2022\tAvoid double asterisks unless needed for bolding key terms\n\n\u2e3b\n\n## Output Instructions:\n\t\u2022\tOutput only the blog post content \u2014 no setup or commentary\n\t\u2022\tEnsure correct line breaks between paragraphs and list items\n\t\u2022\tDo not include metadata, headings like \u201cTitle:\u201d or \u201cAuthor:\u201d\n\n\u2e3b\n\n## Example Workflow:\n\t1.\tReceive a topic (e.g. \u201cMay garden jobs\u201d)\n\t2.\tUse Tavily to research relevant seasonal advice\n\t3.\tCreate an engaging title and intro\n\t4.\tStructure content into logical, easy-to-read sections using markdown\n\t5.\tInclude tips and sources naturally\n\t6.\tWrap up with a summary and CTA\n"
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.8,
"position": [
-420,
-160
],
"id": "b9f4256b-97d5-4e71-b59c-f303d4777904",
"name": "Blog Post Agent"
},
{
"parameters": {
"workflowInputs": {
"values": [
{
"name": "Topic of Post"
},
{
"name": "Target Audience"
},
{
"name": "Email"
},
{
"name": "Folder Name"
},
{
"name": "Additional Context"
}
]
}
},
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
-640,
-160
],
"id": "4b5cc499-8625-424b-8f5a-f8983093fd30",
"name": "When Executed by Another Workflow"
},
{
"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 }}"
},
{
"name": "size",
"value": "1024x1024"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
332,
-160
],
"id": "a0c0741c-5601-46b7-bb42-ac3253a42e28",
"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": [
552,
-160
],
"id": "e029b1ce-9b55-4ca1-b611-beb8760878e1",
"name": "Convert to Binary"
},
{
"parameters": {
"name": "Blog Image",
"driveId": {
"__rl": true,
"value": "My Drive",
"mode": "list",
"cachedResultName": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive"
},
"folderId": {
"__rl": true,
"value": "={{ $('When Executed by Another Workflow').item.json['Folder Name'] }}",
"mode": "id"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
772,
-160
],
"id": "2ffe514f-c5bc-4f01-a660-1c6ec140d7e1",
"name": "Upload Image",
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "81949d4a-b601-45d8-baee-49287ce38b4c",
"name": "Platform",
"value": "Instagram",
"type": "string"
},
{
"id": "d5b78358-7da5-4d77-b5ee-c37eddce15d9",
"name": "Generated Text",
"value": "={{ $('Blog Post Agent').item.json.output }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
992,
-160
],
"id": "d0c0176c-e110-4924-b072-a863515ea472",
"name": "Output to Manager Agent"
}
],
"connections": {
"OpenAI Chat Model": {
"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
}
]
]
},
"Tavily": {
"ai_tool": [
[
{
"node": "Blog Post Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Blog Post Agent": {
"main": [
[
{
"node": "Image Prompt Agent",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Blog Post Agent",
"type": "main",
"index": 0
}
]
]
},
"Generate Image": {
"main": [
[
{
"node": "Convert to Binary",
"type": "main",
"index": 0
}
]
]
},
"Convert to Binary": {
"main": [
[
{
"node": "Upload Image",
"type": "main",
"index": 0
}
]
]
},
"Upload Image": {
"main": [
[
{
"node": "Output to Manager Agent",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "80be7c62-37cb-4719-8ca4-0cad09bd0295",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "7VRdkQcTFB8e98KK",
"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.
googleDriveOAuth2ApihttpHeaderAuthopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Blog Template. Uses lmChatOpenAi, agent, toolHttpRequest, executeWorkflowTrigger. Event-driven trigger; 9 nodes.
Source: https://github.com/women-in-ai-ireland/march-2025-group-1/blob/deeb7e3b9b2e55efba8524e0a0f38aae22803448/Workflows/blog_post.json — 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 workflow is designed for marketers, content creators, agencies, and solo founders who want to publish long‑form posts with visuals on autopilot using n8n and AI agents.
Automated Research Report Generation with OpenAI, Wikipedia, Google Search, and Gmail/Telegram. Uses lmChatOpenAi, memoryBufferWindow, toolHttpRequest, agent. Event-driven trigger; 26 nodes.
This workflow automates the process of generating professional research reports for researchers, students, and professionals. It eliminates manual research and report formatting by aggregating data, g
Twitter Template. Uses lmChatOpenAi, agent, toolHttpRequest, executeWorkflowTrigger. Event-driven trigger; 9 nodes.
Facebook Template. Uses lmChatOpenAi, agent, toolHttpRequest, executeWorkflowTrigger. Event-driven trigger; 9 nodes.