why is this giving me an error? It's exactly the f...
# 🤝help
p
I am trying to send multiple variables to Zapier, (https://botpress.com/docs/cloud/channels/zapier/) This is the format used {{JSON.stringify({ Name: @workflow.BenName, Case: @workflow.UserFollowup, Number: @Workflow.PhoneNumber})}} but it keeps giving me an error https://cdn.discordapp.com/attachments/1221800329167769703/1221800455319982181/Screen_Shot_2024-03-25_at_2.38.39_PM.png?ex=6613e558&is=66017058&hm=473595c46432bd6f19746f2c6254efe721c106ad79e22be1be5f36efa52d8cef&
l
Name: @workflow.BenName, Case: @workflow.UserFollowup, Number: @Workflow.PhoneNumber this should work
p
it did not work unfortunately
@User
f
Just looks like the variables are empty
Can you try and run it, where the variables aren't empty
p
They were not empty 😊
the problem is, that is works when I only have one variable. But it doesn't work when there are multiple ones
m
This is mine workflow.makeSuccess = false; const leadData = { name: workflow.name, email: workflow.email, BusinessName: workflow.BusinessName, Industry: workflow.Industry, Website: workflow.Website, Goals: workflow.Goals, aiDesiredOutcomes: workflow.aiDesiredOutcomes, aiBizOverview: workflow.aiBizOverview, TypeOfVideo: workflow.TypeOfVideo, NarrativeFramework: workflow.NarrativeFramework, Concept: workflow.Concept, aiMarketingPlan: workflow.aiMarketingPlan, final: workflow.final }; try { const response = await axios.post('https://hooks.zapier.com/hooks/catch/restofyourhookhere/', leadData); workflow.makeSuccess = true; } catch (error) { console.error(error); }
@purple-dream-91712
p
Thank you so much! But are you putting this in a code card and using webhook in Zapier? Because I am trying to utilize the free integration with Zapier using botpress directly and not a webhook.
f
You can do the same. Do this workflow.variableName = { name: workflow.name, email: workflow.email, BusinessName: workflow.BusinessName, Industry: workflow.Industry, Website: workflow.Website, Goals: workflow.Goals, aiDesiredOutcomes: workflow.aiDesiredOutcomes, aiBizOverview: workflow.aiBizOverview, TypeOfVideo: workflow.TypeOfVideo, NarrativeFramework: workflow.NarrativeFramework, Concept: workflow.Concept, aiMarketingPlan: workflow.aiMarketingPlan, final: workflow.final };
And then use workflow.variableName in your Zapier card
f
No
workflow.full = { name: workflow.BenName, phone: workflow.PhoneNumber, case: workflow.UserFollowUp }
Can you hover your mouse over the first red underline
f
What type have you set your workflow.full to be?
It has to be an object
p
array
ah ok
changed it to object, the code is all well
f
Perfect. How is Zapier taking it?
p
same problem, I think It is not expecting an object. This might need a little formating maybe?
Here's what I see
f
🤷‍♀️ 🤷‍♀️ I really don't know a lot about Zapier. Why are you using it instead of Make?
p
I found its interface to be a lot more friendly haha, I tried make once, and it was a little frustrating. This is the only problem I faced with zapier (bulk messages) and it's only in the botpress integration.
If this doesn't work I will try and do it via make 😊
f
Alrighty
p
Thanks a lot Decay 😄
f
You are very welcome