Templates / Schedule and optimize Twitter and LinkedIn posts from Google Sheets with OpenAI GPT-4o-mini

Schedule and optimize Twitter and LinkedIn posts from Google Sheets with OpenAI GPT-4o-mini

Needs changes

by yu-ya ✓ · 161 views · created 2025-12-19 · Social Media, Multimodal AI

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 18 nodes and runs on a schedule (every hour) (plus 1 other trigger). Along the way it connects Google Sheets, OpenAI Chat Model, X (Formerly Twitter) and LinkedIn and 1 more.

How it runs

Trigger: On a schedule (every hour) (plus 1 other trigger).

  1. Merge: merges the data from its input branches
  2. Fetch Content Queue (Google Sheets): uses Google Sheets
  3. Filter Ready Posts (Code): runs custom JavaScript code
  4. Has Content to Post? (If): checks a condition and branches into true / false
  5. AI Content Optimizer (AI Agent): runs an AI agent, with model: OpenAI Chat Model
  6. No Content Response (Edit Fields (Set)): sets 2 fields: message, timestamp
  7. Parse AI Content (Code): runs custom JavaScript code
  8. Merge: merges the data from its input branches
  9. Post to Twitter (X (Formerly Twitter)): uses X (Formerly Twitter)
  10. Post to LinkedIn (LinkedIn): uses LinkedIn

…plus 5 more steps. See the full node list below.

Services it uses

Google SheetsOpenAI Chat ModelX (Formerly Twitter)LinkedInSlack

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in AI Content Optimizer (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Removed in 3.0Replace with
AI Agent v1 (old agent modes)
AI Content Optimizer (v1.7)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (14)

From the author

Schedule and optimize social media posts to Twitter and LinkedIn using AI This workflow automates the entire lifecycle of social media management—from fetching draft content to AI-driven optimization and multi-platform publishing. Who’s it for Social media…

Excerpt from yu-ya's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.