Google Sheets + LinkedIn: posts published from ideas
Your LinkedIn content shouldn’t depend on panic-writing between meetings. But that’s how it usually goes: you’ve got a list of “ideas somewhere,” you reuse the same angles, and your visuals look like they came from five different brands.
Marketing managers feel the calendar pressure first. Founders trying to stay visible feel it too. And if you run client accounts, you already know why a reliable Sheets LinkedIn automation is a relief: it turns “we should post” into “it’s already posted.”
This workflow pulls a topic from Google Sheets, researches a timely angle, writes the post, generates an on-brand image, publishes to LinkedIn, then marks the row as done. You’ll see what it does, what you need, and how to avoid the common breakpoints.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Google Sheets + LinkedIn: posts published from ideas
flowchart LR
subgraph sg0["When clicking ‘Execute workflow’ Flow"]
direction LR
n0@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model", pos: "b", h: 48 }
n1@{ icon: "mdi:wrench", form: "rounded", label: "SerpAPI", pos: "b", h: 48 }
n2@{ icon: "mdi:wrench", form: "rounded", label: "SerpAPI1", pos: "b", h: 48 }
n3@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model1", pos: "b", h: 48 }
n4@{ icon: "mdi:swap-vertical", form: "rounded", label: "Edit Fields", pos: "b", h: 48 }
n5@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If", pos: "b", h: 48 }
n6@{ icon: "mdi:play-circle", form: "rounded", label: "When clicking ‘Execute workf..", pos: "b", h: 48 }
n7@{ icon: "mdi:cog", form: "rounded", label: "Wait", pos: "b", h: 48 }
n8@{ icon: "mdi:robot", form: "rounded", label: "Structured Output Parser", pos: "b", h: 48 }
n9@{ icon: "mdi:robot", form: "rounded", label: "Structured Output Parser1", pos: "b", h: 48 }
n10@{ icon: "mdi:database", form: "rounded", label: "1. Get Pending Topic from Go..", pos: "b", h: 48 }
n11@{ icon: "mdi:robot", form: "rounded", label: "2. Research Topic & Find Vir..", pos: "b", h: 48 }
n12@{ icon: "mdi:robot", form: "rounded", label: "3. Generate LinkedIn Post Co..", pos: "b", h: 48 }
n13["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>4. Generate Branded Image Pr.."]
n14["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>4.1. Generate Branded Image .."]
n15["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>5a. Start Image Generation (.."]
n16["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>5b. Check Image Status"]
n17["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>6. Download Generated Image"]
n18["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/linkedin.svg' width='40' height='40' /></div><br/>7. Publish Post to LinkedIn"]
n19@{ icon: "mdi:database", form: "rounded", label: "8.Update Google Sheets", pos: "b", h: 48 }
n5 --> n17
n5 --> n7
n7 --> n16
n1 -.-> n12
n2 -.-> n11
n4 --> n19
n0 -.-> n12
n3 -.-> n11
n16 --> n5
n8 -.-> n11
n9 -.-> n12
n17 --> n18
n18 --> n4
n13 --> n14
n14 --> n15
n6 --> n10
n15 --> n16
n10 --> n11
n12 --> n13
n11 --> n12
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n6 trigger
class n8,n9,n11,n12 ai
class n0,n3 aiModel
class n1,n2 ai
class n5 decision
class n10,n19 database
class n15,n16,n17 api
class n13,n14 code
classDef customIcon fill:none,stroke:none
class n13,n14,n15,n16,n17,n18 customIcon
The Problem: LinkedIn Content Gets Stuck in “Draft Hell”
Most “content calendars” are really just spreadsheets full of guilt. Topics sit in a column, the status never changes, and you end up rewriting the same post structure because it’s faster than thinking. Then visuals become another bottleneck. You either skip them, grab a generic stock image, or ping a designer (who has their own priorities). The worst part is the mental load: you’re constantly tracking what’s been posted, what’s next, and what’s accidentally repeating. It’s exhausting, and honestly, it’s unnecessary.
The friction compounds. Here’s where it breaks down in real life.
- Researching a “fresh” angle takes longer than writing the post, so you default to safe, stale takes.
- Visual consistency slips because each post gets created with different tools, templates, or people.
- Manual posting invites mistakes, like missing hashtags, wrong images, or posting the same topic twice.
- Your calendar becomes unreliable, which means planning turns into guesswork instead of a pipeline.
The Solution: Google Sheets to Published LinkedIn Posts (With Branded Images)
This workflow turns a simple Google Sheet into a content engine. You keep one row per idea (plus a status like “Pending”), and n8n grabs the next topic when you run it. From there, an AI researcher looks up recent news and trends related to the topic using SerpAPI, so the angle isn’t generic. A second AI step writes the LinkedIn post itself, including a title-style hook, body text, and relevant hashtags. Then the workflow builds a detailed image prompt that includes your brand style guide, sends it to Replicate to generate a unique image, and waits until the render is ready. Finally, it posts the text and image directly to LinkedIn and updates your sheet to “done,” so you don’t repeat yourself.
The workflow starts from a manual launch in n8n (easy for testing, and simple to schedule later). It moves from Sheets → research → writing → image generation → LinkedIn publishing. After posting, it maps the final fields and updates the original row so your calendar stays truthful.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you publish three LinkedIn posts per week. Manually, a “good” post often takes about 30 minutes to research, about 30 minutes to draft, and another 20 minutes to get a usable visual, so you’re spending roughly 4 hours a week. With this workflow, you spend maybe 10 minutes up front adding topics to Google Sheets, then each run is mostly automated waiting: a few minutes for research and writing, plus around 10–20 minutes for image rendering. You get the time back while the calendar stays updated.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets to store topics and statuses.
- LinkedIn to publish posts from the workflow.
- OpenAI API key (get it from your OpenAI dashboard).
- SerpAPI key (get it from your SerpAPI account).
- Replicate API token (get it from your Replicate account settings).
- Google Drive to archive generated images.
Skill level: Intermediate. You’ll connect accounts (OAuth) and adjust a few text variables like your brand style guide.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
Google Sheets triggers the content queue. When you run the workflow, it grabs the next row marked “Pending,” so your calendar is the source of truth.
Research and writing happen back-to-back. An AI agent pulls recent context using SerpAPI, then another agent turns that into a full LinkedIn post that reads like a human wrote it (because it has something specific to say).
Your brand style is merged into the image prompt. Two code steps assemble and refine a detailed prompt, combining the post theme with your visual rules (colors, mood, composition) before sending it to Replicate.
Publishing and cleanup are automatic. n8n checks if the render is finished, fetches the image, posts to LinkedIn, archives the image to Google Drive, then updates the Google Sheet row to “done.”
You can easily modify the brand style guide to match different campaigns based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
This workflow starts manually so you can run it on demand while you validate your data and prompts.
- Add a Manual Launch Trigger node as the workflow entry point.
- Leave the node settings as default (no fields required).
- Optionally keep Flowpast Branding as a sticky note for documentation; it does not affect execution.
Step 2: Connect Google Sheets for Topic Intake
Fetch pending topics from your spreadsheet so the AI agents can choose a high-engagement theme.
- Open Retrieve Pending Topics and set Document to
[YOUR_ID]. - Set Sheet to
gid=0(shown as “Sayfa1” in the node). - In Filters, set Lookup Column to Status and Lookup Value to
Pending. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Retrieve Pending Topics.
⚠️ Common Pitfall: If your sheet uses different column names, update the filter to match exactly, or no topics will be returned.
Step 3: Set Up AI Research and Post Drafting
These AI steps pick a trending topic and produce a structured LinkedIn post with hashtags.
- Open Analyze Topic Trends and verify the prompt uses
{{ $json.Topic }}in the search instruction. - Confirm Analyze Topic Trends has an output parser enabled and connected to Structured JSON Parser with the schema shown.
- Open Draft LinkedIn Post and verify the prompt uses
{{ $json.output.research_data }}and returns the strict JSON format. - Confirm Draft LinkedIn Post is connected to Structured JSON Parser B to enforce the schema.
- Credential Required: Connect your openAiApi credentials in OpenAI Conversation Model and OpenAI Conversation Model B.
- Credential Required: Connect your serpApi credentials in Search API Utility and Search API Utility B.
OpenAI Conversation Model and OpenAI Conversation Model B are connected as the language models for Draft LinkedIn Post and Analyze Topic Trends; ensure credentials are added to those model nodes, not the agents.
Search API Utility and Search API Utility B are connected as tools for the agents; add credentials to the tool nodes, not the agent nodes.
Step 4: Build the Image Prompt and Render It
This section converts the post into a refined image prompt and renders it through Replicate.
- In Compose Image Prompt, keep the JavaScript code that assembles
imagePromptfromparsedData.titleandparsedData.text. - In Refine Prompt Draft, keep the optimized prompt logic that extracts keywords and produces a new
imagePrompt. - In Initiate Image Render, set URL to
https://api.replicate.com/v1/models/black-forest-labs/flux-1.1-pro-ultra/predictionsand Method to POST. - Set the JSON Body to
{{ { "input": { "raw": false, "prompt": $json.imagePrompt, "aspect_ratio": "3:2", "output_format": "jpg", "safety_tolerance": 2, "image_prompt_strength": 0.1 } } }}. - Credential Required: Connect your httpHeaderAuth credentials in Initiate Image Render.
⚠️ Common Pitfall: If the Replicate request fails, double-check your header auth token and that the model URL matches the version you intend to use.
Step 5: Poll for Completion and Fetch the Image
The workflow loops until the render completes, then downloads the image file.
- In Verify Image Status, set URL to
https://api.replicate.com/v1/predictions/{{ $json.id }}. - Credential Required: Connect your httpHeaderAuth credentials in Verify Image Status.
- In Completion Check, set the condition to compare
{{ $json.status }}equalssucceeded. - In Delay Execution, set Amount to
2to pause between status checks. - In Fetch Generated Image, set URL to
{{ $json.output }}and keep response format as file.
Completion Check routes to Fetch Generated Image when successful and to Delay Execution when not yet complete, creating a polling loop.
Step 6: Publish to LinkedIn and Update the Sheet
Post the image with the generated text, then write the results back to Google Sheets.
- In Post to LinkedIn, set Text to
{{ $('Compose Image Prompt').item.json.title }} \n\n {{ $('Compose Image Prompt').item.json.text }} \n\n {{ $('Compose Image Prompt').item.json.hashtags.join(' ') }}and keep Share Media Category asIMAGE. - Credential Required: Connect your linkedInOAuth2Api credentials in Post to LinkedIn.
- In Map Output Fields, map topic to
{{ $node["Compose Image Prompt"].json.title }}, text to{{ $node["Compose Image Prompt"].json.text }}, hashtags to{{ $node["Compose Image Prompt"].json.hashtags }}, and imageUrl to{{ $('Fetch Generated Image').item.json.output }}. - In Update Sheet Records, set Operation to
appendOrUpdateand map columns: text to{{ $json.text }}, Topic to{{ $json.topic }}, Status todone, hashtags to{{ $json. hashtags }}, and imageUrl to{{ $json. imageUrl }}. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Update Sheet Records.
Step 7: Test and Activate Your Workflow
Run a manual test to ensure the AI output, image generation, LinkedIn post, and sheet update all succeed.
- Click Execute Workflow on Manual Launch Trigger to start a run.
- Verify that Retrieve Pending Topics returns at least one row with
Statusset toPending. - Confirm Draft LinkedIn Post outputs structured JSON and that Compose Image Prompt returns
title,text,hashtags, andimagePrompt. - Check that Completion Check routes to Fetch Generated Image after the render succeeds and that Post to LinkedIn completes without errors.
- Open your sheet to confirm Update Sheet Records appended or updated the row with
Statusset todone. - When satisfied, toggle the workflow to Active for production use (and replace the manual trigger with a scheduled trigger if desired).
Common Gotchas
- Google Sheets and Google Drive OAuth credentials can expire or need specific permissions. If things break, check your n8n Credentials page and Google Cloud OAuth consent settings first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Frequently Asked Questions
About an hour if you already have the accounts and API keys.
No. You’ll mostly connect credentials and edit a few text settings like your brand style guide.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI, SerpAPI, and Replicate API usage, which depends on how often you post.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and you should. You’ll update the style guide variables inside the image prompt code step (the “Compose Image Prompt” and “Refine Prompt Draft” parts), then tweak the AI writing instructions in “Draft LinkedIn Post” to match your voice. Common customizations include swapping hashtag rules, changing tone (more punchy or more formal), and generating a carousel-style image instead of a single visual.
Usually it’s expired OAuth credentials in n8n, so reconnect your LinkedIn credential and try again. It can also be a permissions mismatch (posting access not granted) or a payload issue if the image fetch step returns an empty file. If the post node fails right after a long wait, check the Replicate status response first to confirm the image is actually ready.
It can handle plenty for a small team, and the real limit is your n8n plan plus how fast image rendering completes.
For this particular workflow, n8n is usually the better fit because it can handle multi-step logic (research, writing, polling a render job, then publishing) without feeling fragile. The Wait/If loop for checking Replicate status is the kind of thing that gets awkward or expensive in many “simple automation” tools. You also get a self-hosting option, which matters if you want higher volume without per-task costs. Zapier or Make can still work if you simplify the process, like using a static image template instead of generated visuals. If you want help choosing, Talk to an automation expert.
Once this is running, your “content calendar” stops being a wish and starts being a system. The workflow handles the repetitive stuff, so you can spend your attention on strategy and real conversations.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.