🔓 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 22, 2026

Google Sheets + LinkedIn, repeat free content posting

Lisa Granqvist Partner Workflow Automation Expert

You already have the content. What’s broken is the distribution. Someone still has to pick an article, write two versions of a post, avoid repeats, then publish to LinkedIn and X without it turning into a daily chore.

This hits marketing managers first, because consistency is the job. But founders trying to stay visible and agency owners managing multiple client calendars feel the same grind. With this sitemap posting automation, your old articles turn into fresh social posts on a schedule, while Google Sheets keeps you from recycling the same link.

Below is the exact workflow logic, what you need to run it, and where teams typically tweak it for their brand voice and posting rhythm.

How This Automation Works

See how this solves the problem:

n8n Workflow Template: Google Sheets + LinkedIn, repeat free content posting

The Challenge: Staying consistent without reposting the same link

Repurposing long-form content sounds easy until you do it for a month. You open your blog, scroll for something “still relevant,” copy the URL, then write a LinkedIn version and an X version that don’t look like a lazy cross-post. Next week you forget what you already shared, so you either repeat yourself or burn more time checking old posts. The mental load is the annoying part: it’s not hard work, it’s just endless work.

It adds up fast. Here’s where it breaks down in real life.

  • You lose about 20 minutes per post just deciding what to share and confirming it hasn’t already run.
  • Writing for LinkedIn and X takes two different angles, so “quick repurposing” becomes a mini copywriting session.
  • Manual tracking lives in someone’s head, which means repeats happen as soon as that person gets busy or goes on vacation.
  • Even when you use schedulers, they don’t pick the next article from your sitemap or stop you from reusing the same URL.

The Fix: Turn your sitemap into scheduled LinkedIn + X posts

This workflow starts with what you already own: your sitemap. On a schedule (daily by default), it pulls the sitemap, parses out article URLs, filters out pages you don’t want to promote (like table-of-contents or utility pages), and builds a clean list of candidates. At the same time, it looks at a Google Sheet where past posts were logged, compiles the URLs that already ran, then chooses an unused article at random so your feed stays varied. Once a URL is selected, the workflow fetches the article page, extracts the HTML, attaches useful metadata, and asks Gemini to generate platform-specific copy. Finally, it publishes to LinkedIn and X (only if those channels are enabled) and logs what happened back into Google Sheets so you won’t repeat the same link tomorrow.

The workflow begins with a scheduled trigger and your input settings (sitemap URL, language, channels). It then merges “available articles” with “already processed URLs” to pick the next unused piece. Gemini writes two drafts, and n8n publishes them and records the URL, timestamp, and the exact text that went out.

What Changes: Before vs. After

Real-World Impact

Say you publish one syndicated post per day to two channels (LinkedIn + X). Manually, it’s usually 10 minutes to pick an article and confirm it’s not a repeat, then about 15 minutes to write and tailor the two versions. Call it 25 minutes a day, or roughly 2 hours a week. With this workflow, the “human time” is close to zero after setup: it triggers automatically at noon, generates the copy, posts, and logs everything while you keep working.

Requirements

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Google Sheets for tracking posted URLs and drafts.
  • LinkedIn to publish the finished post automatically.
  • X/Twitter to publish the tweet version automatically.
  • Google Gemini API key (get it from Google AI Studio / Gemini API in Google Cloud).

Skill level: Beginner. You’ll connect accounts, paste in a sitemap URL, and map a few spreadsheet columns.

Need help implementing this? Talk to an automation expert (free 15-minute consultation).

The Workflow Flow

A schedule kicks things off. The workflow runs automatically (daily at noon by default), or you can test it with a manual run. Your settings node controls the sitemap URL, language, and which channels are turned on.

Your sitemap becomes the content source. n8n fetches the sitemap via HTTP request, parses the XML into individual URLs, cleans up edge cases like weird image lists, and filters out pages you don’t want promoted (for example, TOC pages).

Google Sheets prevents repeats. In parallel, it reads your “processed articles” sheet, compiles a list of URLs already used, then merges that list with the fresh sitemap list. A selection step picks an unused article so you don’t post the same link twice.

Gemini writes, then publishing happens. The workflow fetches the chosen article’s HTML, attaches metadata, and sends it to a Gemini-powered agent that generates a LinkedIn draft and a tweet draft. If a draft exists for a channel, n8n publishes it and logs the URL, timestamp, and final copy back to Google Sheets.

You can easily modify the schedule and the filtering rules to match your cadence and your site structure. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Manual and Scheduled Triggers

Set up how the workflow starts, either manually or on a schedule, and pass initial configuration values downstream.

  1. Open Manual Run Trigger to allow on-demand testing and execution.
  2. Open Scheduled Run Trigger and set the rule to run at 12 using the interval configuration shown in the node.
  3. In Input Settings, set sitemapURL to https://example.com/sitemap.xml.
  4. In Input Settings, set language to English and enable linkedinPostEnabled and twitterPostEnabled as true.
  5. Confirm the flow: Input Settings outputs to both Retrieve Sitemap and Retrieve Processed Rows in parallel.

Step 2: Connect Google Sheets for Processed Article Tracking

These nodes read and log processed URLs to prevent re-posting the same article.

  1. Open Retrieve Processed Rows and choose your target spreadsheet Document and Sheet (leave values as list selections in the node UI).
  2. Credential Required: Connect your googleApi credentials in Retrieve Processed Rows.
  3. Open Log Published Article and keep Operation set to append with Authentication as serviceAccount.
  4. Credential Required: Connect your googleApi credentials in Log Published Article.
  5. Verify column mappings in Log Published Article, including url, status (ready), timestamp ({{$now.format('dd.MM.yyyy HH:mm:ss')}}), and AI outputs for Twitter post and LinkedIn post.

Step 3: Build the Sitemap Parsing and Article Selection Pipeline

This sequence fetches your sitemap, filters valid articles, and selects an unprocessed URL.

  1. In Retrieve Sitemap, set URL to {{ $json.sitemapURL }}.
  2. In Parse Sitemap XML, keep XML options enabled (ignore attributes, no explicit arrays) as configured.
  3. In Split Article Entries, set Field to Split Out to urlset.url.
  4. Keep Normalize Image List as-is to wrap single image objects into arrays for consistent filtering.
  5. In Exclude TOC Pages, confirm the filter checks {{ $json["image:image"] }} for exists and not empty.
  6. In Map Field Names, map url to {{ $json.loc }}, lastModified to {{ $json.lastmod }}, and images to {{ $json["image:image"] }}.
  7. In Compile Available Articles, set Aggregate to aggregateAllItemData and Destination Field Name to availableArticles.
  8. In Compile Processed URLs, set Fields to Include to url and Destination Field Name to processedArticles.
  9. Confirm Combine Streams merges Compile Available Articles and Compile Processed URLs, then flows into Select Unused Article.

Step 4: Fetch Article Content and Generate Social Copy with AI

This section downloads the selected article, extracts the HTML, attaches metadata, and generates social media drafts.

  1. In Retrieve Article Page, set URL to {{ $json.url }}.
  2. In Extract Page HTML, keep Operation set to extractHtmlContent and use the CSS selector div.single-post-content with return value html.
  3. In Attach Article Metadata, map url to {{ $('Select Unused Article').item.json.url }}, lastModified to {{ $('Select Unused Article').item.json.lastModified }}, images to {{ $('Select Unused Article').item.json.images }}, and content to {{ $json.content }}.
  4. In Social Copy Generator, keep the prompt as provided; it references Input Settings with {{ $('Input Settings').first().json.language }} and enabled platform flags.
  5. Credential Required: Connect your googlePalmApi credentials in Gemini Chat Engine, which powers Social Copy Generator.
  6. Ensure Structured Result Parser remains attached as the output parser for Social Copy Generator; add credentials to the parent Gemini Chat Engine, not this sub-node.

Step 5: Configure Social Publishing and Conditional Checks

These nodes decide which posts to publish and send them to Twitter/X and LinkedIn.

  1. Verify Log Published Article outputs to both Check Twitter Draft and Check LinkedIn Draft in parallel.
  2. In Check Twitter Draft, confirm the conditions check {{ $json["Twitter post"] }} for exists and not empty.
  3. In Publish Tweet, set Text to {{ $json["Twitter post"] }} and connect your Twitter credentials.
  4. In Check LinkedIn Draft, confirm the conditions check {{ $json["LinkedIn post"] }} for exists and not empty.
  5. In Publish LinkedIn Post, set Text to {{ $json["LinkedIn post"] }} and keep Share Media Category as ARTICLE.
  6. Credential Required: Add credentials for Publish Tweet and Publish LinkedIn Post since they are not pre-configured.

⚠️ Common Pitfall: If the Google Sheet does not contain the expected url column, Compile Processed URLs will return empty data and Select Unused Article could re-select previously promoted pages.

Step 6: Test and Activate Your Workflow

Validate that data flows end-to-end and the social posts are generated correctly before turning on the schedule.

  1. Click Execute Workflow from Manual Run Trigger to test the full flow.
  2. Confirm Retrieve Sitemap returns data and Select Unused Article outputs a single article.
  3. Verify Social Copy Generator outputs structured JSON with TwitterPost and LinkedInPost fields.
  4. Check Log Published Article appends a new row to Google Sheets with the URL, timestamp, and draft posts.
  5. When results are correct, toggle the workflow to Active to enable Scheduled Run Trigger.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Watch Out For

  • Google Sheets credentials can expire or lack access to the right spreadsheet. If the workflow stops logging, check the Google Sheets node credentials and the document selection in “get processed articles” 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.
  • LinkedIn or X permissions can be the silent killer. If publishing fails, re-auth the LinkedIn/X connection in n8n and confirm your app/account can post on behalf of the profile or page you selected.

Common Questions

How quickly can I implement this sitemap posting automation?

About 30 minutes if your accounts and sitemap are ready.

Can non-technical teams implement this sitemap posting automation?

Yes. You’ll mostly be connecting accounts and filling in the sitemap URL plus a few Sheet columns.

Is n8n free to use for this sitemap posting 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 Google Gemini API usage, which is typically pennies for a small daily posting workflow.

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.

How do I adapt this sitemap posting automation solution to my specific challenges?

You can adjust the schedule in the Scheduled Run Trigger, change what counts as “promotable” content in the Exclude TOC Pages filter, and rewrite the prompt inside the Social Copy Generator to match your voice. If you prefer another model provider, swap the Gemini Chat Engine for your provider’s chat node and keep the same inputs (article text + metadata). Common customizations include adding UTM parameters to URLs, forcing a specific post format (hook, body, CTA), and disabling X or LinkedIn when you only want one channel active.

Why is my LinkedIn connection failing in this workflow?

Usually it’s expired authorization or missing permissions on the LinkedIn account you connected. Reconnect the LinkedIn credential in n8n, then confirm you’re posting to the right destination (profile vs. company page). If it fails only sometimes, you may also be hitting platform limits or trying to publish an empty draft because the AI node didn’t return the expected fields.

What’s the capacity of this sitemap posting automation solution?

For most teams posting once per day, capacity isn’t the constraint.

Is this sitemap posting automation better than using Zapier or Make?

Often, yes, because this workflow isn’t just “send A to B.” You’re parsing a sitemap, excluding certain pages, merging two data streams (available vs. already used), randomly selecting an unused URL, then generating structured outputs before publishing. n8n handles that kind of branching and data shaping cleanly, and you can self-host for unlimited runs. Zapier or Make can still work, but the logic tends to get spread across multiple scenarios and paid steps. If you’re torn, Talk to an automation expert and you’ll get a straight recommendation.

Once this is running, your content library stops gathering dust. The workflow handles the repetitive parts, and you get a steady stream of posts without the “what did we share last time?” headache.

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