Templates / Generate AI-powered LinkedIn posts with Ollama, image creation, and Gmail delivery

Generate AI-powered LinkedIn posts with Ollama, image creation, and Gmail delivery

Needs changes

by Aashit Sharma ✓ · 5,797 views · created 2025-06-05 · Content Creation, Multimodal AI

Needs changes. This template uses 2 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes), HTTP Request Tool (legacy). 2 breaking item(s) found. Static check, last run 2026-10-19.

What to replace before upgrading

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
LinkedIn Post Agent (v1.9), Image Prompt Agent (v1.9)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
HTTP Request Tool (legacy)
Tavily
HTTP Request node connected to the AI Agent's Tool input

Nodes used (9)

AI AgentHTTP RequestOllama Chat ModelLinkedIn

What it does

This automation flow is designed to generate professional, research-backed LinkedIn posts based on a user-submitted topic and audience, enhance it with a visually aligned image prompt, and then automatically send the post and image via Gmail and/or publish it to LinkedIn. ⚙️ How It Works (Step-by-Step): 1. 📝 Form Submission (Input Trigger) A user fills out a form with: Email Topic of the Post Target Audience This form submission acts as the entry point of the workflow (Form Trigger node). 2. 🤖 LinkedIn Post Generation Agent An AI agent is triggered that: Uses Tavily API to fetch real-time web search content related to the topic. Processes the topic and audience data using an Ollama Chat Model. Generates a well-structured LinkedIn post that includes: Hook Educational insight Professional tone Source citations Hashtags and call to action 3. 🎨 Image Prompt Agent The generated post is passed to a second agent that: Extracts the core message. Converts it into a graphic prompt using a different Ollama LLM. The prompt is written to be used by an image-generation model like DALL·E or Gemma/GPT-based image tools. 4. 🖼️ Image Generation The image prompt is passed to a local image generation endpoint (localhost:8098) or OpenAI (api.openai.com) to generate a visual asset. The base64 image is converted into a file. 5. 📩 Email Dispatch The post text and the generated image are then sent to the user’s email address via the Gmail node. The email includes: The full LinkedIn post The auto-generated image as an attachment 6. 🔗 LinkedIn Publishing (Optional) If OAuth is enabled, the post can also be published directly to LinkedIn using the LinkedIn node. 🛠️ Tools Used: n8n: Orchestration platform OpenRouter & Ollama: Local/hosted LLMs for post and prompt generation Tavily API: Real-time web search OpenAI or Local Endpoint: Image generation from text SMTP (Gmail): For sending emails LinkedIn API: For automated posting 📦 Key Features: End-to-end automation from form to email/post Uses real-time research for accuracy Creative visual generation with professional branding intent Works locally or with cloud APIs Modular: Can switch tools or endpoints (OpenAI ↔ Localhost, Ollama ↔ OpenRouter) 🚀 Ideal Use Cases: Marketing teams needing fast content turnaround Personal branding assistants Founders, freelancers, and executives sharing thought leadership University or organization-wide communication systems

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.