Issue on telegram trigger

Hi my dear friends
I really search about my problem in internet but unfortunately I can’t find anything so if anyone help me please.

In my case:
I add a telegram bot updater to my flow by telegram trigger.
In telegram, I want to ask some questions from my users and then save their answers in my google sheet (database).

My problem is that how can I realize what answer is to specific question.

In fact now I use “forced reply” option in my questions (when I send message to my user).

You could do it like that:

Make sure that when you test, you press “Execute Workflow” every time you received an answer as the workflow has to get executed twice. Once to receive the first message and ask for the age and once to receive the age and send the response (that you could then save in Google Sheets).


Dear @jan
Thank you for your response. :pray:
I think I couldn’t get what I meant truly. :sleepy:

In some bots (in Telegram) I see that:
They ask Continuously several questions that needs their user responses through typing.
Their method is not through “forced reply” option.
For example they just ask question “How old are you?” without “forced reply” method and then their user send for example just “24” then,
Bot just ask “What is your name?” without “forced reply” and user just send “Maria”
then bot save “24” in “user_age” column and save “Maria” in “user_firstName” column in user_data table and etc.

I want to know how they recognize what response is for what question without using “forced reply” method?! (I know that this question is not related straightly to n8n and is for my knowledge).

Best regards;

I guess to do that you would simply have to save in Google Sheets the chat-id and what question got asked last.

So if the chat-id is “123” and you ask for the age you would save in the row for the chat-id “123” under “lastQuestionAsked” simply “user_age”. Once you then get the next webhook call with the answer you can look up in the Google Sheet what the last question was. it will then return “user_age” and you can then save the returned value under “user_age”. After that, you could then simply ask the next question and depending on what it is supposed to be (example “user_firstName”) you would then save that value under “lastQuestionAsked” and so on.

I come across similar situation where I need to ask a couple of follow-up questions, for example:

user: /sum
bot: ok, please enter the first number:
user: 10
bot: please enter the second number:
user: 20
bot: the sum is 30

How can I complete this kind of conversion that I need to track the state?

As far as I know, each workflow acts like a pipeline that starts with the input from a trigger node and then passes on the data to process in the successive nodes. If I need to get a second input from the follow-up question, should I start another workflow?

And if I need to start another workflow, is there any internal memory that I can save my previous state instead of using Google Sheet?

Many thanks!

Hi! I have the same problem, if you find solution, please share this information!
Thanks a lot!