Automate Product Surveys with Telegram, Google Sheets & AI

This workflow automates customer satisfaction surveys via Telegram, integrating Google Sheets and AI to ask, analyze, and store detailed responses efficiently. It eliminates manual survey follow-ups and ensures insightful data collection.
telegramTrigger
googleSheets
agent
+8
Workflow Identifier: 1915
NODES in Use: Telegram Trigger, Telegram, If, Redis, Google Sheets, Set, Switch, AI Agent, Text Classifier, HTTP Request, Memory Manager
Automate surveys with n8n and Telegram

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Workflow Does

This workflow runs a survey in Telegram chat and collects detailed user feedback automatically.
It solves the problem of manual survey sending, which has low response and hard data collection.
Users answer questions step-by-step, and AI follows up on some answers to dig deeper.
All data is saved in Google Sheets for easy review later.


Tools And Services Used

  • Telegram Bot API: Receives user messages and sends questions and replies.
  • Google Sheets: Stores survey questions and saves user answers.
  • Redis: Keeps track of each user’s survey progress and session state.
  • OpenAI GPT-4o-mini (via LangChain): Generates AI follow-up questions for open-ended responses.
  • n8n Automation Platform: Runs and connects the workflow nodes.

Who Should Use This Workflow

This workflow is for teams or managers who need better surveys with chat.
It helps avoid manual collecting and reading of feedback.
The workflow delivers more answers that are richer because AI asks follow-ups.


How the Workflow Works

Inputs

Processing Steps

  • The Telegram Trigger Telegram Trigger listens for any user message.
  • A Set node defines survey info, like title and Google Sheet ID.
  • Google Sheets node reads the full list of survey questions.
  • Redis node fetches current user progress by a unique Redis key.
  • If no session exists, new session is created and saved to Redis.
  • Switch and Set nodes parse user commands to control survey steps.
  • Survey question index updates and completion status computed.
  • Telegram node sends current survey question to user.
  • User answers received and formatted.
  • Text Classifier node decides if AI follow-up is needed.
  • If follow-up needed, LangChain Agent calls GPT-4o-mini to ask deeper questions.
  • Agent memory is reset regularly to keep answers focused.
  • All responses written back to Google Sheets.
  • Redis index incremented to move to next question.
  • When survey ends, user is told survey is complete and can restart.

Outputs

  • Users get questions and AI replies sent in Telegram chat.
  • Raw user responses and AI follow-ups saved in Google Sheets.
  • Survey progress tracked live in Redis.

Beginner Step-by-Step: How To Use The Workflow In Production Inside n8n

Importing The Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open the n8n editor (assuming you are already logged in).
  3. Click on menu and choose “Import from File”.
  4. Select the downloaded workflow file to load it into n8n.

Configuring The Workflow

  1. Go to each credential node and add your own API Keys or OAuth tokens:
  2. Edit the Set node named “Set Variables1”:
    • Replace the Google Sheet ID with your survey sheet’s ID.
    • Optionally change the survey title.
    • Make sure Redis key pattern fits your use case.
  3. Check Text Classifier node “Should Follow Up?1” prompt if you want to adjust follow-up sensitivity.
  4. Update any Telegram message templates in Telegram nodes if needed.

Testing And Activating

  1. Test the workflow by sending “/start” and “/next” commands to the Telegram bot.
  2. Check Google Sheets for recorded responses.
  3. If testing succeeds, activate the workflow toggling the switch on the top-right.
  4. Optionally, enable retries on critical nodes to handle network errors.

If using self-host n8n or running on server, see self-host n8n for setup tips.


Input → Process → Output Summary

Inputs

  • User commands in Telegram chat.
  • Survey questions from Google Sheets.
  • Session state from Redis key-value store.

Process

  • Trigger on Telegram message.
  • Load questions.
  • Check session progress.
  • Send question to user.
  • Classify answer to decide AI follow-up.
  • Generate AI follow-up question if needed.
  • Store answers in Google Sheets.
  • Update Redis session.

Output

  • Survey questions and AI responses sent via Telegram.
  • Answers saved to Google Sheet.
  • Session state updated for next survey question.

Customization Ideas

  • Add more questions by adding columns to your Google Sheet.
  • Switch Telegram nodes to WhatsApp nodes to use WhatsApp instead.
  • Tune AI follow-up chance by changing the Text Classifier node settings.
  • Edit welcome messages in the Telegram “Send Start” node.
  • Change sheet ID or survey title in the “Set Variables1” node.

Handling Errors And Troubleshooting

  • Telegram Trigger no response: Fix webhook and API token in Telegram Trigger.
  • Google Sheets errors: Check OAuth permissions and that sheet ID is correct.
  • Redis missing data: Confirm Redis keys match and Redis service is connected.
  • AI not triggering follow-ups: Review Text Classifier settings and OpenAI API status.

Summary

✓ This workflow runs step-by-step surveys inside Telegram chat, pushing questions one at a time.
✓ It uses Redis to track user progress so interruptions are handled.
✓ It triggers AI follow-up questions for open answers to get deeper insights.
✓ All responses are saved into Google Sheets for easy viewing and analysis.
✓ Users get immediate replies in chat, improving engagement.
✓ Setup requires Telegram, Google Sheets, Redis, and OpenAI credentials.
✓ Activating the workflow in n8n automates all survey messaging and data storage.


survey_user_{{ $json.sessionId }}

Sample Text Classifier Prompt For “Should Follow Up?1” Node

This prompt lets the node decide if the answer needs AI follow-up.

Is this user response detailed enough? Answer "yes" if simple or closed ended, "no" if open ended or unclear.User response: "{{$json.answer}}"
Automate surveys with n8n and Telegram

Visit through Desktop to Interact with the Workflow.

Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.
Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.

Frequently Asked Questions

The Telegram Trigger node listens for user messages and starts the survey when users send commands.
A Text Classifier node analyzes user answers to check if follow-up questions from AI should be asked.
All user answers and AI follow-ups are saved in Google Sheets for easy access and review.
After importing, add Telegram, Google Sheets, Redis, and OpenAI credentials, update Sheet ID and prompt texts, then test.

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.