AI-Powered LinkedIn Content Generation from Workflow JSON - n8n Workflow

Automate LinkedIn content creation from any n8n workflow JSON using Gemini and Cloudflare AI. This n8n workflow generates text, images, and posts automatically.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • n8n Specialists and Technical Content Writers.

  • Developers who frequently share n8n templates or technical tutorials.

  • Automation consultants needing a high-velocity content creation pipeline.

  • Users looking to leverage powerful AI models (Gemini, Cloudflare) within an n8n node structure.

Overview

Creating high-quality, engaging content for social media, especially technical platforms like LinkedIn, is time-consuming. This sophisticated n8n workflow solves this problem by turning raw technical data (your existing n8n workflow JSON) into ready-to-publish content, saving hours on writing and design.

The automation pipeline leverages the power of Google Gemini to analyze the structure of your n8n workflow, adopting a professional 'FlowArchitect' persona to generate compelling, high-engagement posts and detailed prompts for visual assets. It then uses Cloudflare AI via an HTTP Request n8n node to generate a matching image.

This entire process is managed through n8n and Telegram, providing a rapid verification loop before the final LinkedIn n8n node publishes the polished content. It ensures that every new n8n workflow you build can instantly be transformed into powerful marketing material.

How it Works

This comprehensive n8n workflow operates in two distinct phases: content generation and content publishing, orchestrated entirely within n8n.

Phase 1: Content and Image Generation


  1. Trigger and Input: The process begins with the 'Receive n8n JSON' Telegram n8n trigger. The user uploads an n8n workflow JSON file to their designated 'Generator Bot' (Bot A).

  2. Data Extraction: The workflow uses a Telegram n8n node to retrieve the file and the 'Parse Workflow JSON' n8n node extracts the content of the n8n workflow JSON file.

  3. AI Analysis: The extracted JSON is fed into the 'Gemini: Generate Post & Image Prompt' n8n node (LangChain/Google Gemini). This node analyzes the n8n workflow logic and outputs a detailed LinkedIn post (post_text), a professional image prompt, and a CTA keyword, wrapped in a structured JSON object.

  4. Logging and Configuration: The generated content details are logged into a Google Sheets n8n node for tracking, and the 'Set Image Generation Parameters' n8n node configures the necessary resolution and seed for the visual generation.

  5. Image Creation: An HTTP Request n8n node is configured to communicate with the Cloudflare AI flux-1-schnell model, using the AI-generated prompt to create the visual asset.

  6. Verification: The resulting image (converted to binary) and the image prompt are sent back to the user via Telegram (Bot A). Simultaneously, the text draft is also sent to the user for review. This completes the first part of the n8n workflow.

Phase 2: Publishing to LinkedIn


  1. Publish Trigger: The user reviews the content. To publish, they forward the verified image to a second 'Publisher Bot' (Bot B) and reply to that image with the final post text. This action fires the 'Trigger: Reply to Post Image' Telegram n8n trigger.

  2. Final Action: The workflow retrieves the image and the user's reply text via the Telegram n8n node. Finally, the 'Publish Post to LinkedIn' LinkedIn n8n node takes the validated image and text and automatically posts the content to the user's LinkedIn profile, concluding the end-to-end n8n workflow automation.

Installation Guide

To deploy this powerful content generation n8n workflow, follow these steps:


  1. Import the n8n Template: Copy the provided JSON data and import it into your n8n instance using the 'New' -> 'Import from JSON' function.

  2. Set Up Telegram Credentials (Two Bots Required):

Create Bot A (Generator Bot) and set up its credentials in the 'Receive n8n JSON' and 'Send Image & Prompt to User' Telegram n8n nodes.
Create Bot B (Publisher Bot) and set up its credentials in the 'Trigger: Reply to Post Image' and 'Get Image from Reply' Telegram n8n nodes.

  1. Configure AI Credentials: Add your credentials for the Google Gemini (or Google PaLM) n8n node and the Cloudflare API key in the 'Cloudflare: Get Account ID' and 'Cloudflare: Generate Image' HTTP Request n8n nodes.

  2. Set Up LinkedIn Credentials: Configure your LinkedIn OAuth2 account credentials in the 'Publish Post to LinkedIn' n8n node.

  3. Google Sheets Integration: Configure your Google Sheets credentials and paste the document ID and sheet name into the 'Log Content to Google Sheet' n8n node parameters.

  4. Cloudflare Account ID: Crucially, in the URL of the 'Cloudflare: Generate Image' HTTP Request n8n node, you must replace the placeholder account ID with your actual Cloudflare Account ID. (Note: The workflow attempts to fetch this ID, but hardcoding or pre-configuring the URL is safer).

  5. Activate: Once all connections and parameters are configured, activate the n8n workflow to start generating content.

Node Details

Telegram Trigger (Receive n8n JSON & Trigger: Reply to Post Image): Two instances of this n8n trigger node are used. The first monitors for uploaded n8n workflow JSON files (Bot A). The second monitors for replies to images (Bot B), initiating the publishing step.
Google Gemini (LangChain n8n node): Analyzes the complexity of the input n8n workflow JSON. It acts as an AI copywriter, generating professional LinkedIn posttext and a detailed imageprompt that dictates the visual style to Cloudflare AI.
Code (Parse Gemini Output): This crucial n8n node sanitizes and parses the raw JSON output from the Gemini model, making the posttext and imageprompt accessible to downstream n8n nodes.
HTTP Request (Cloudflare: Generate Image): This specialized n8n node connects to the Cloudflare AI API to execute the image generation based on the AI prompt. It handles the specific JSON payload required by the image generation model.
If (Validate Image Dimensions): A logic n8n node that checks if the generated image size exceeds 1 megapixel, ensuring compliance with LinkedIn and Cloudflare limits, preventing the workflow from failing downstream.
Convert to File (Convert Image to Binary): Transforms the raw image data received from the Cloudflare API call into a standard n8n binary object, preparing it for upload via the Telegram n8n node and the LinkedIn n8n node.


  • LinkedIn (Publish Post to LinkedIn): The final action n8n node. It publishes the content, using the user's validated text (from the Telegram reply) and the retrieved binary image to create a seamless professional post on LinkedIn.

Related n8n Workflows

Free

Nodes: 13 Nodes
Updated: December 26 2025
View all
Created by

I'm An Oracle Certified Developer specializing in intelligent and scalable business solutions. With expertise in n8n and a range of modern web technologies, I build dynamic systems that streamline operations, save time, and drive innovation.

Featured*