Create and publish social posts via Telegram, OpenAI, Google Docs and PostWire
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: SerpApi (Google Search). 1 breaking item(s) found. Static check, last run 2026-10-19.
What to replace before upgrading
| Removed in 3.0 | Replace with |
|---|---|
| SerpApi (Google Search) Search Google with SerpApi | No direct replacement: call the SerpApi REST API with an HTTP Request tool, or use a verified community node |
Nodes used (11)
- Telegram Trigger
n8n-nodes-base.telegramTrigger - Filter
n8n-nodes-base.filter - Google Docs
n8n-nodes-base.googleDocs - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - SerpApi (Google Search)
@n8n/n8n-nodes-langchain.toolSerpApi - Edit Fields (Set)
n8n-nodes-base.set - Telegram
n8n-nodes-base.telegram - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Google Sheets
n8n-nodes-base.googleSheets
What it does
Quick Overview This workflow turns Telegram topic messages into platform-specific drafts for LinkedIn, Facebook, Bluesky, and Mastodon using OpenAI and brand rules from Google Docs, then publishes approved posts via PostWire and logs outcomes to Google Sheets. How it works 1. Triggers when a new Telegram message arrives and ignores empty messages or commands starting with “/”. 2. Fetches your brand rules from a Google Docs document and combines them with the submitted topic. 3. Uses an OpenAI agent (optionally calling SerpApi Google Search for current facts) to generate a JSON object containing one draft per network plus any source URLs used. 4. Sends the drafts back to Telegram and waits for an Approve or Decline response. 5. If approved, posts the per-network text to PostWire and checks whether each platform publish succeeded. 6. Appends a success or failure record (including links and notes) to Google Sheets and replies in Telegram with published URLs or required fixes. 7. If declined, replies in Telegram confirming nothing was published. Setup 1. Create a Telegram bot with @BotFather, add a Telegram credential in n8n, and select it for the trigger and messaging steps. 2. Connect Google Docs and Google Sheets credentials, set your Google Doc URL for the brand rules, and choose the target spreadsheet and sheet for logging. 3. Add an OpenAI credential for the chat model and a SerpApi API key for the Google Search tool. 4. Create a PostWire account, connect your social profiles, and add an HTTP Header Auth credential with Authorization: Bearer <your PostWire API key for the PostWire request. 5. Create the Google Sheet columns date, topic, status, links, and note to match the append operations.