Share feedback, ideas and get community help

Updated 3 months ago

i want return values or data to the chatbot and show to the user!!!

i am creating an restaurant chatbot, where user order something and it suppose generate an "token number" according to the number of entry in the database( as per now for database i am using an google spreadsheet using webhook) i successful send the chatbot data to the google spreadsheet and in the spreadsheet i also created an api in app script which send data to my web-app for restaurant owner in next.js framework! successful it shows up the data of spreadsheet and show an token number of the entry!!! BUT i facing the problem that HOW? can i show that token number back to the user in Chatbot!!! Somebody got some any help?! I will be glad if someone helped me out :'))?
B
h
A
11 comments
Where is the token generated and how?
i just define the simple logic in my index.tsx to show the latest entry of the data as "Token Number" but the problem i am facing is the how can show this so called token number to the user in its chat!!?
and note i am using an POST method webhook to send data to spreadsheet! from spreadsheet it is routing to the my next.js project!
Attachments
output-ss.png
code-ss.png
You will have to retrieve all the orders once again from your google sheets for example:

As you can see I am retrieving my emails from the google sheet, and they are saved in a variable as an array.

You can then map those to their index ids
Attachments
image.png
image.png
You create a new variable where you either save this data in array or in my case as an exmaple just as a string

and it displays each data with their respective position
Attachments
image.png
image.png
thanks for replying! let me try this, i guess it would work. i appreciates your help mate :)🀜 πŸ€›
no worries hope you can get it working
yourr method working!! fine mate but i guess we ignore the main question to return only the current User data entry number or in my case token number not the entire spreadsheet!! got any help with that?!
Attachment
token-method_1.png
You do not have to select the whole sheet but rather the sheet block has both filter option and to only select a specific column
The other way would be to create an api server in ur react app that will return the tokens based on given number/userid or whatever
okay cool! let me try this way too!! thanks for your help mate
Add a reply
Sign up and join the conversation on Discord