This tutorial shows how to set up Automated Emails with the help of Zapier (low-code method, template shared below).
I assume you have already set up the some questions/choices you'd like to send inside of an email.
Now:
1- Open Zapier and create a Zap
2- In the first node of the Zap, choose "Webhooks by Zapier" and select "Catch Hook" as event
3- Zapier will then give you an URL, copy it
4- Back to Botpress, add an Execute Code card:
workflow.zapierSuccess = false
const leadData = {
email: workflow.Email,
problem: workflow.Problem
}
//Replace YOUR_URL_HERE with your actual Zap URL
try {
const response = await axios.post('YOUR_URL_HERE', leadData)
console.log(response.data)
workflow.zapierSuccess = true
} catch (error) {
console.error(error)
}
5- Make sure you replaced YOUR_URL_HERE with the URL of your zap.
If you want different variables, replace "email: workflow.Email" and "problem: workflow.Problem" with your actual variables.
Use the same format to make sure it works.
6- Back to Zapier, in the second node select "Gmail" and select "Send Email" as event.
Now you can choose your account and customize the fields of your email as you like.
You can use the variables you stored as well!
7- Test it, if it works properly just pubblish the Zap and you're done
You can choose whatever text you like and even send confirmation emails to the user who opened the ticket. This works for logins and password resets as well (template below).
https://cdn.discordapp.com/attachments/1146127527279079524/1146127527543308379/Screenshot_3.png▾
https://cdn.discordapp.com/attachments/1146127527279079524/1146127527895650435/Screenshot_2.png▾
https://cdn.discordapp.com/attachments/1146127527279079524/1146127528159870976/Screenshot_1.png▾