Automated Content Generation and LinkedIn Scheduling using AI and Google Sheets - n8n Workflow

Use this comprehensive n8n workflow to automatically fetch content, transform it using AI agents (GPT-4/OpenRouter), stage posts in Google Sheets, and schedule updates to LinkedIn.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Markdown-formatted list of ideal users:
Content marketers needing high-volume social media automation.
Solopreneurs looking to repurpose short-form content (e.g., tweets) for LinkedIn.
Users seeking advanced n8n templates integrating AI agents and structured data management.
Automation specialists who rely on Google Sheets for editorial approval processes.

Overview

Managing consistent, high-quality content across platforms can be time-consuming. This powerful n8n workflow solves the problem by creating a robust, multi-stage content pipeline. It automatically pulls raw input (like AI-generated tweets), uses an AI agent (via OpenRouter/GPT-4) to rephrase and adapt the content specifically for professional platforms like LinkedIn, and stores the resulting post in Google Sheets for editorial review.

Crucially, the third segment of this n8n workflow acts as a scheduled publisher, automatically checking for approved posts in the Google Sheet and posting them at calculated optimal times. This intricate n8n node setup ensures both speed of generation and quality control via human approval, making it one of the most effective n8n templates for advanced content operations.

How it Works

This complex automation runs in three coordinated stages:


  1. Content Harvesting (5 AM Daily): The process starts with a scheduled n8n trigger. The 5AM Everyday n8n trigger initiates an HTTP Request to pull new AI-generated tweets. A subsequent Code n8n node cleans the data. The flow then checks Google Sheets using a dedicated n8n node to prevent duplicates. If the tweet is new, the n8n workflow saves it to the sheet, logging the raw content for later processing.


  1. AI Transformation and Staging (6 AM Daily): The 6AM Daily n8n trigger starts the second phase. It reads the newly saved raw content from Google Sheets. The powerful LangChain AI Agent n8n node, connected to an OpenRouter model, transforms the raw tweet text into a professional LinkedIn post format. It uses a Structured Output Parser n8n node to ensure data integrity. The resulting LinkedIn-ready text is then written back to Google Sheets, ready for human review.


  1. Approval and Publishing (Google Sheets Triggered): The final segment is initiated by the Updated News Google SheetsTrigger n8n trigger. When a post status is updated (i.e., approved by a human), the flow filters for approved items. A Code n8n node calculates optimized posting times. The Wait for Posting n8n node holds the execution until the designated time. Finally, the n8n workflow downloads any associated image, uses the LinkedIn n8n node to publish the content, and updates the Google Sheet to mark the item as 'Posted'. Notifications are sent via a Telegram n8n node throughout the process.

Installation Guide

To deploy this n8n workflow:


  1. Import the n8n Template: Copy the provided JSON and import it into your n8n instance via the 'Workflows' menu.

  2. Credential Setup: You must configure credentials for several services:

Google Sheets: Set up authentication for reading, writing, and triggering the workflow based on sheet updates.
OpenAI/OpenRouter (LangChain Agent): Provide API keys for the AI agent n8n node to handle content transformation.
LinkedIn: Authenticate your LinkedIn connection for posting updates.
Telegram: Set up a bot token and chat ID for notifications.

  1. Sheet Configuration: Create a Google Sheet with necessary columns (e.g., 'Tweet ID', 'Raw Content', 'LinkedIn Post', 'Status', 'Posted Time'). Ensure the Google Sheets n8n trigger is pointed to the correct sheet and column for the 'Updated News' trigger.

  2. Activate n8n Triggers: Ensure the '5AM Everyday', '6AM Daily', and 'Updated News' n8n trigger nodes are configured and the n8n workflow is activated.

Node Details

Key components used in this sophisticated n8n workflow include:

Schedule Trigger (5AM Everyday, 6AM Daily): Primary n8n trigger nodes that schedule the two daily content pipelines.
Google Sheets Node: Used extensively (Find Existing Tweet, Save New Tweet, Google Sheets, Google Sheets1, Set Posting, Set Posted) for data logging, de-duplication, staging, and updating status flags. Essential for controlling the flow of this n8n workflow.
HTTP Request Node (Get AI Tweets, Download Image): Used to fetch initial content data and to download media files before posting.
Code Node (Clean Tweets, Get Post Timings): Custom code n8n nodes used for data preparation and calculating time-based delays for optimized posting.
Split In Batches Node (Loop Tweets, Loop Posts, Loop Approved Posts): Core flow control n8n node used to iterate over lists of tweets or posts sequentially.
AI Agent Node (AI Agent): This powerful LangChain n8n node utilizes the connected language model (4.1 - OpenRouter/GPT-4) to rewrite content specifically for LinkedIn.
Wait Node (Wait, Wait1, Wait for Posting): Crucial n8n node for introducing calculated delays, particularly the Wait for Posting node which ensures posts hit LinkedIn at the optimal time derived by the Code n8n node.
LinkedIn Node (Post LinkedIn): The final action n8n node responsible for publishing the transformed and approved content to the professional network.


  • Google Sheets Trigger (Updated News): An event-based n8n trigger that launches the third phase only when the spreadsheet data changes (i.e., approval is given).

Related n8n Workflows

Paid

Nodes: 18 Nodes
Updated: December 26 2025
View all
Created by
Archit Jain
Archit Jain

Featured*