adorable-whale-86571
10/16/2023, 10:50 PMjs
workflow.webhookSuccess = false /// create this variable in your bot to check if the connection was successful or not, type must be boolean
const makeData = {
first_name: workflow.firstName,
last_name: workflow.lastName,
business_name: workflow.businessName,
phone: workflow.phoneNumber,
email: workflow.emailAddress,
message: workflow.userMessage
} /// above you can fill the variables you want to send to make, always delete the "," at the end of the last property of this object which in this case is "message: workflow.userMessage"
try {
const response = await axios.post('https://hook.eu2.make.com/webhooklink',makeData) /// here the link you get when you create a custom webhook module in make
workflow.webhookSuccess = true
}
catch (error) {
console.error(error)
}