[Solved] How to write data on Google Sheets using the data inputted by the user?


#1

I am trying to create a chatbot that conducts a survey. The answers that was inputted by the user will be stored in a google sheet. My question is what is the best way to connect BLiP and google sheet in order to save these answers into the google sheet.


#2

I’ve done an API who communicates with Google Sheets API and call my API in the flow. For me, that’s the best way to solve this problem.


#3

Oh I see. How will I be able to get the message of the user in that case? :slight_smile: I mean, will I need it to store in a variable? How does it work?


#4

Yeah. You will need to store the user input in a variable, then, you will pass that information in your request body. When you create a POST request, you can do it.

For example:
Request body

{
“nome_cliente”: “{{nomeCliente}}”,
“classificacao”: “{{nota}}”
}

who the “nome_cliente” is the key and the {{nomeCliente}} is the value that i have stored from the flow.


#5

Okay. Thank you very much. The one doing the API is not yet finished that’s why I still cannot test it, but is it okay to POST an array. For example:
[
{
"nome_cliente “:” {{}} nomeCliente "
“classificacao”: “{{nota}}”
},
{
“nome_cliente “:” {{}} nomeCliente1”
“classificacao”: “{{nota1}}”
}
]


#6

I think you can do it normally. But i have not tested it.