How to pass variables from N8N to use in Typebot.

Hey guys! I'm calling a Typebot flow via N8N and I need to pass the name in the request body. However, I'm having trouble understanding how to get this name from Typebot when calling it via N8N.
16 Replies
Tridi
Tridi•2y ago
are you talking about typebot rest api and using it on n8n?
michaelvips
michaelvips•2y ago
Use QueryString in the url mybot.typebot.com/?name=john https://docs.typebot.io/editor/variables#prefilled-variables
danielpetinga
danielpetingaOP•2y ago
I'm actually passing the 'name' variable into an HTTPrequest endpoint and calling a flow in Typebot. I want to use this 'name' variable that I passed as a parameter in Typebot. Do you understand? I understand that you are passing the parameters via URL. Now, I would like to know how to receive and use this data in Typebot using the N8N with the WhatsApp API.
michaelvips
michaelvips•2y ago
Explain....
danielpetinga
danielpetingaOP•2y ago
I have an HTTP request endpoint on N8N that invokes a flow on Typebot. So far so good, as the flow in Typebot works normally. Now, what I would like to do is pass a variable called 'name', which is in N8N, and use it in Typebot. For example, I want to start the flow in Typebot by calling the person by the name that came from N8N. That's what I want to accomplish, understand?
Tridi
Tridi•2y ago
you already set text input node and save the variables on your typebot? if you are using n8n endpoint you dont need pass the body parameter cause every variables will be send by typebot
No description
Tridi
Tridi•2y ago
ahhh
Tridi
Tridi•2y ago
set your webhook on n8n like this
No description
Tridi
Tridi•2y ago
and add respond to webhook node on n8n
No description
Tridi
Tridi•2y ago
you can pass your parameter on n8n with JSON custom on respond webhook
No description
Tridi
Tridi•2y ago
and on typebot save that parameter as variables too
No description
Tridi
Tridi•2y ago
so the chain node must be end with respond webhook node on n8n if u want pass any parameter from your flow on n8n to typebot
No description
danielpetinga
danielpetingaOP•2y ago
That's not it yet. Maybe I'm not able to express my question clearly. Basically I want to transfer data from n8n to Typebot and manipulate it within Typebot.🥹
Tridi
Tridi•2y ago
you cant send data from n8n to typebot because typebot not generate own webhook so you must do tricks on typebot by send dummy post to n8n endpoint and build your flow to be able "Get your n8n data" then pass it with respond webhook
Tridi
Tridi•2y ago
or for more complicated case you can playaround with this docs https://docs.typebot.io/api-reference/chat/start-chat
danielpetinga
danielpetingaOP•2y ago
I understand, I'll do a search on documents, thanks!

Did you find this page helpful?