Generate LinkedIn posts with Gemini content & Imagen images for instant publishing
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (7)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Edit Fields (Set)
n8n-nodes-base.set - AI Agent
@n8n/n8n-nodes-langchain.agent - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Wait
n8n-nodes-base.wait
What it does
π AI-Powered LinkedIn Post Generator with Automated Image Creation π Overview Transform any topic into professional LinkedIn posts with AI-generated content and custom images! This workflow automates the entire process from topic input to published LinkedIn post, including professional image generation using Google's Imagen 4 API. β¨ Key Features - π€ AI Content Generation: Uses Google Gemini to create engaging LinkedIn posts - π¨ Professional Image Creation: Automatically generates images using Google Imagen 4 - π± Direct LinkedIn Publishing: Posts content and images directly to your LinkedIn feed - π Form-Based Input: Simple web form to submit topics - π Content Formatting: Converts markdown to LinkedIn-friendly format π§ What This Workflow Does 1. π Form Submission: User submits a topic through a web form 2. πΊοΈ Data Mapping: Maps the topic for AI processing 3. π§ AI Content Generation: Google Gemini creates post content and image prompt 4. π― Content Normalization: Cleans and formats the AI output 5. πΌοΈ Image Generation: Creates professional images using Google Imagen 4 6. π€ LinkedIn Registration: Registers image upload with LinkedIn API 7. π Binary Conversion: Converts base64 image to binary buffer 8. β¬οΈ Image Upload: Uploads image to LinkedIn 9. π Content Curation: Converts markdown to LinkedIn format 10. β³ Processing Wait: Ensures image is fully processed 11. π Post Publishing: Publishes the complete post to LinkedIn π οΈ Prerequisites & Setup π Required Credentials 1. LinkedIn OAuth 2.0 Setup π You'll need to create a LinkedIn app with the following OAuth 2.0 scopes: - β
openid - Use your name and photo - β
profile - Use your name and photo - β
wmembersocial - Create, modify, and delete posts, comments, and reactions on your behalf - β
email - Use the primary email address associated with your LinkedIn account Steps to get LinkedIn credentials: 1. Go to LinkedIn Developer Portal 2. Create a new app or use existing one 3. Configure OAuth 2.0 settings with the scopes above 4. Get your access token from the authentication flow 2. Google Cloud Platform Setup βοΈ Required GCP Services to Enable: - π― Vertex AI API - For Imagen 4 image generation - π Cloud Resource Manager API - For project management - π‘οΈ IAM Service Account Credentials API - For authentication Steps to get GCP token: 1. Install Google Cloud SDK 2. Authenticate: gcloud auth login 3. Set project: gcloud config set project YOURPROJECTID 4. Get access token: gcloud auth print-access-token > π‘ Note: The access token expires after 1 hour. For production use, consider using service account credentials. π§ n8n Node Credentials Setup 1. LinkedIn OAuth2 API: Configure with your LinkedIn app credentials 2. HTTP Bearer Auth (LinkedIn): Use your LinkedIn access token 3. HTTP Bearer Auth (Google Cloud): Use your GCP access token 4. Google Gemini API: Configure with your Google AI API key π Workflow Structure mermaid graph LR Aπ Form Trigger --> BπΊοΈ Mapper B --> Cπ€ AI Agent C --> Dπ― Normalizer D --> EπΌοΈ Text to Image E --> Fπ€ Register Upload F --> Gπ Binary Converter G --> Hβ¬οΈ Upload Image H --> Iπ Content Curator I --> Jβ³ Wait J --> Kπ Publish to LinkedIn π¨ Image Generation Details The workflow uses Google Imagen 4 with these parameters: - π Aspect Ratio: 1:1 (perfect for LinkedIn) - π― Sample Count: 1 options generated - π‘οΈ Safety Setting: Block few (content filtering) - π§ Watermark: Enabled - π Language: Auto-detect π Content Processing The AI generates content in this JSON structure: json { "postcontent": { "text": "Your engaging LinkedIn post content with hashtags" }, "imageprompt": { "description": "Professional image generation prompt" } } π LinkedIn API Integration Image Upload Process: 1. Register Upload: Creates upload session with LinkedIn 2. Binary Upload: Uploads image as binary data 3. Post Creation: Creates post with text and image reference API Endpoints Used: - π€ POST /v2/assets?action=regist