🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 21, 2026

Google Sheets to LinkedIn, posts published for you

Lisa Granqvist Partner Workflow Automation Expert

Your LinkedIn consistency usually breaks for the same boring reason. You have ideas, maybe even a rough title list, but turning those into polished posts (with a decent image) keeps getting pushed to “later.” Later turns into next week. Then nothing ships.

This Sheets LinkedIn automation hits marketing managers hard, but founders and solo consultants feel it too. You need a reliable queue that publishes without you babysitting it, so your content doesn’t disappear when your calendar gets messy.

This workflow watches a Google Sheet for “pending” ideas, uses Gemini to write the post and generate an on-brand visual, stores the image in Drive, and publishes to LinkedIn. Below, you’ll see exactly what it automates and what you get back.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Google Sheets to LinkedIn, posts published for you

The Problem: LinkedIn Posting Falls Apart at the Finish Line

Most teams don’t struggle with “coming up with ideas.” They struggle with production. A simple post title turns into 30 minutes of writing, rewriting, formatting, and second-guessing, then another chunk of time hunting for an image that doesn’t look like stock-photo soup. And when you finally post, there’s no clean system that tells you what shipped, what’s still pending, and what’s stuck half-done. It’s mentally heavy work, so it’s the first thing you drop when client work, launches, or meetings pile up.

It adds up fast. Here’s where the friction compounds.

  • Drafts live in too many places, which means your “content plan” becomes guesswork.
  • Writing hooks and closing questions takes longer than it should, especially when you are tired.
  • Images are a constant bottleneck because “good enough” is surprisingly hard to find.
  • Without a status field and a posting trail, you end up reposting topics or forgetting the best ones.

The Solution: Google Sheets → Gemini → LinkedIn Auto-Publishing

This workflow turns your Google Sheet into a content conveyor belt. When a row is marked “pending,” n8n pulls the post title, sends it to Gemini, and gets back a LinkedIn-ready draft with a hook, a few structured paragraphs, a question to drive comments, and a small set of hashtags. Then it generates a matching image using Gemini’s image model, uploads that image to Google Drive, and makes it accessible for LinkedIn’s upload process. Finally, it publishes the post (text plus image) to your LinkedIn profile and marks the original row as “posted,” so your queue stays clean and trustworthy. One idea in. One finished post out.

The workflow starts by monitoring Google Sheets for new “pending” items and intentionally caps it to one post at a time for controlled execution. Next, Gemini handles both the writing and the visual. After that, LinkedIn’s API steps register the image, upload it properly, publish the post, and update your spreadsheet so you always know what happened.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you publish 5 LinkedIn posts per week. Manually, a reasonable “good post” pace is about 30 minutes to write, plus maybe 15 minutes to find or design an image, plus a few minutes to upload and format. That’s roughly 4 hours every week. With this workflow, you add five titles to a Sheet and set them to “pending” (maybe 10 minutes total), then n8n generates and publishes each post automatically on schedule. You get most of those hours back, without losing consistency.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Google Sheets to manage titles and post status.
  • Google Drive to store and share generated images.
  • Google Gemini API key (get it from Google AI Studio / Google Cloud credentials).
  • LinkedIn API credentials (get them from LinkedIn Developer portal for posting permissions).

Skill level: Intermediate. You’ll connect accounts, paste API keys, and verify a few permissions in Google and LinkedIn.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

Google Sheets triggers the run. When a row changes (or when the scheduled trigger checks), n8n looks for a post idea with status set to “pending.” If nothing is pending, nothing publishes.

The workflow verifies and limits what gets processed. An “if” check filters out anything that isn’t ready, and a cap keeps it to one post per execution. That prevents accidental bulk posting and makes failures easier to spot.

Gemini writes the post and produces a matching image. The text is generated in a structured format (hook, paragraphs, question, hashtags), then line breaks are cleaned up so LinkedIn renders it the way you expect. Next, Gemini generates a high-resolution 16:9 image with a professional look and no text baked into the graphic.

Drive stores the image, LinkedIn publishes, and the Sheet gets updated. The image is uploaded to Google Drive, shared so it can be fetched, then LinkedIn’s upload flow registers and attaches the media to the post. When publishing succeeds, the spreadsheet row is marked “posted” (plus the image link is saved), which keeps your queue honest.

You can easily modify the posting frequency to match your calendar (daily, three times a week, specific weekdays). See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Google Sheets Trigger

Set up the workflow to watch for new or updated rows in your posting spreadsheet.

  1. Add and open Sheets Update Trigger.
  2. Set Document to your spreadsheet: [YOUR_ID] (cached name: Linkedin Post).
  3. Set Sheet Name to Posts (value: [YOUR_ID]).
  4. Confirm Poll Times is set to everyMinute.
  5. Credential Required: Connect your googleSheetsTriggerOAuth2Api credentials.
⚠️ Common Pitfall: Make sure the sheet has columns named ID, LinkedIn Post Title, and Status, or the downstream updates will fail.

Step 2: Filter and Limit Pending Rows

Only rows marked as pending should continue through the workflow.

  1. Open Status Condition Check and ensure the condition compares Status to pending using ={{ $json.Status }} on the left.
  2. Connect Status Condition Check to Cap Records to limit processing.
  3. Keep Cap Records as-is (default limit) unless you want to process multiple rows per run.

Step 3: Set Up the AI Post Composer

Compose a LinkedIn-ready post with structured JSON output and prepare it for API submission.

  1. Open LinkedIn Post Composer and confirm the prompt uses the title expression {{ $json['LinkedIn Post Title'] }} and returns JSON with title and post.
  2. Ensure Gemini Chat Engine is connected as the language model for LinkedIn Post Composer. Credential Required: Connect your googlePalmApi credentials in Gemini Chat Engine.
  3. Verify Parse Structured Output is attached to LinkedIn Post Composer with the provided JSON schema. This is an AI sub-node; add credentials to the parent LinkedIn Post Composer via Gemini Chat Engine, not here.
  4. Open Escape Line Breaks and confirm the JS Code replaces newlines using item.json.output.post.replace(/\n/g, "\\n").

Step 4: Generate and Store the Social Image

Create a Gemini-generated image, upload it to Drive, and save the shareable link back to the sheet.

  1. Open Create Social Image and keep the Prompt as the multi-line prompt using {{ $json.output.post }} with Resource set to image.
  2. Credential Required: Connect your googlePalmApi credentials in Create Social Image.
  3. In Drive File Upload, set Name to =linkedin_{{$now.format('YYYYMMDD_HHmmss')}}.{{$binary.data.fileExtension || 'png'}} and choose the target folder linkedin images. Credential Required: Connect your googleDriveOAuth2Api credentials.
  4. In Public Share File, set Operation to share and File ID to ={{ $json.id }}, with permissions anyone + reader. Credential Required: Connect your googleDriveOAuth2Api credentials.
  5. In Save Image Link, set Operation to update and map columns: ID to ={{ $('Status Condition Check').item.json.ID }} and imageUrl to ={{$node["Drive File Upload"].json.webViewLink}}. Credential Required: Connect your googleSheetsOAuth2Api credentials.

Step 5: Upload to LinkedIn and Publish the Post

Register the image upload, send the binary file, and publish the LinkedIn post.

  1. Configure LinkedIn User Lookup with URL https://api.linkedin.com/v2/userinfo and Authentication set to genericCredentialType. Credential Required: Connect your httpHeaderAuth credentials.
  2. In Init Image Upload, set URL to https://api.linkedin.com/v2/assets?action=registerUpload and JSON Body to the provided template with owner urn:li:person:{{ $('LinkedIn User Lookup').item.json.sub }}. Credential Required: Connect your httpHeaderAuth credentials.
  3. In Fetch Drive File, set Operation to download and File ID to ={{ $('Save Image Link').item.json.imageUrl }}. Credential Required: Connect your googleDriveOAuth2Api credentials.
  4. Configure Send Image Binary with URL ={{$node["Init Image Upload"].json.value.uploadMechanism["com.linkedin.digitalmedia.uploading.MediaUploadHttpRequest"].uploadUrl}}, Method POST, Content Type binaryData, and header Content-Type set to ={{$binary.data.mimeType || 'image/png'}}.
  5. In Publish LinkedIn Post, keep the URL https://api.linkedin.com/v2/ugcPosts and the JSON Body mapping to: {{ $('Escape Line Breaks').item.json.output.post }}, {{ $('LinkedIn Post Composer').item.json.output.title }}, and {{ $('Init Image Upload').item.json.value.asset }}. Credential Required: Connect your httpHeaderAuth credentials.
  6. Update the status in Mark Sheet Row with Status set to posted and ID set to ={{ $('Cap Records').item.json.ID }}. Credential Required: Connect your googleSheetsOAuth2Api credentials.

The execution order follows a single path: Sheets Update TriggerStatus Condition CheckCap RecordsLinkedIn Post ComposerEscape Line BreaksCreate Social ImageDrive File UploadPublic Share FileSave Image LinkLinkedIn User LookupInit Image UploadFetch Drive FileSend Image BinaryPublish LinkedIn PostMark Sheet Row.

Step 6: Test and Activate Your Workflow

Validate the workflow end-to-end and enable it for production use.

  1. In your Google Sheet, add a row with Status set to pending and a valid LinkedIn Post Title.
  2. Click Execute Workflow to run a manual test.
  3. Confirm a Drive image file is created and the imageUrl column is updated by Save Image Link.
  4. Verify LinkedIn receives a new post with the generated image and text.
  5. Check the sheet row is updated by Mark Sheet Row with Status = posted.
  6. Turn on the workflow by clicking Activate to run automatically every minute.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • LinkedIn API credentials can expire or lack the right posting scope. If things break, check your LinkedIn Developer app permissions and token status 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.
  • Google Drive sharing settings can silently block the image fetch. Confirm the uploaded file is publicly accessible (or at least accessible to the workflow) before the LinkedIn upload step runs.

Frequently Asked Questions

How long does it take to set up this Sheets LinkedIn automation automation?

About an hour if you already have your LinkedIn and Gemini credentials.

Do I need coding skills to automate Sheets LinkedIn automation?

No. You’ll mostly connect accounts and paste API keys. The only “technical” part is checking permissions when LinkedIn or Google rejects a request.

Is n8n free to use for this Sheets LinkedIn automation workflow?

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 Gemini API usage costs, which depend on how long your posts are and how many images you generate.

Where can I host n8n to run this automation?

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.

Can I customize this Sheets LinkedIn automation workflow for scheduled posting at specific times?

Yes, and it’s one of the best tweaks to make. You can adjust the Schedule Trigger so posts only run on weekdays or at a specific hour, and keep the “pending/posted” status logic the same. Common customizations include adding an “Approved” column in Google Sheets, changing the Gemini prompt to match your brand voice, and switching the image style to match your design system.

Why is my LinkedIn connection failing in this workflow?

Usually it’s an expired token or missing posting permissions on your LinkedIn Developer app. Regenerate the credentials and update them in n8n, then re-run with a single pending row. If it fails only sometimes, you may be hitting rate limits during the image upload sequence, so spacing out executions helps.

How many posts can this Sheets LinkedIn automation handle?

A lot, but it’s designed to process one pending row per run for safety.

Is this Sheets LinkedIn automation better than using Zapier or Make?

For this specific job, n8n is usually the smoother choice because the LinkedIn upload flow is multi-step and you often need branching, data cleanup, and retries. n8n also gives you a self-hosting path, which matters when you want lots of runs without paying per task. Zapier and Make can work, but you’ll feel the complexity when you start attaching images, saving Drive links, and updating statuses reliably. Frankly, the real difference is control: n8n lets you see and adjust every part of the chain when something changes in an API. If you want a second opinion for your setup, Talk to an automation expert.

Once this is running, your spreadsheet becomes a real publishing queue, not a wish list. The workflow handles the repetitive parts so you can focus on the ideas that actually move your business.

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.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal