Send GPT-4 Telegram polls to multiple groups with Google Sheets analytics
Needs changesWhat this workflow does
This AI workflow has 18 nodes and runs on a schedule (cron 0 9,17 * * 1-5). Along the way it connects Google Sheets, OpenAI Chat Model and Telegram.
How it runs
Trigger: On a schedule (cron 0 9,17 * * 1-5).
- Load Topic Queue from Sheets (Google Sheets): uses Google Sheets
- Select Highest Priority Topic (Code): runs custom JavaScript code
- Load Telegram Group Registry (Google Sheets): uses Google Sheets
- GPT-4 Poll Question Generation (AI Agent): runs an AI agent, with model: GPT-4o Model
- Validate Poll Quality and Safety (Code): runs custom JavaScript code
- Split Groups for Parallel Deploy (Loop Over Items (Split in Batches)): loops over the items in batches
- Send Poll to Telegram Group (Telegram): uses Telegram
- Send Context Message with Hashtags (Telegram): uses Telegram
- Collect Deploy Result Per Group (Code): runs custom JavaScript code
- Merge: merges the data from its input branches
…plus 6 more steps. See the full node list below.
Services it uses
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 GPT-4 Poll Question Generation (v1.6): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) GPT-4 Poll Question Generation (v1.6) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (9)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Telegram
n8n-nodes-base.telegram - Merge
n8n-nodes-base.merge - Send Email
n8n-nodes-base.emailSend
From the author
An enterprise-grade n8n workflow that leverages OpenAI GPT-4 to generate contextually relevant poll questions and automatically distributes them across multiple Telegram groups and channels. Includes comprehensive analytics tracking, smart error handling,…