5. Empower your bot with Actions

So far, you’ve created a bot that understands, responds and redirects the conversation based on certain variables. Learn now how to connect it to 3rd-party systems to increase its functionalities.

Action blocks empower chatbots to perform tasks beyond their built-in capabilities by leveraging the functionality of external tools and services, enhancing the overall user experience and utility of the bot.

Step 9: Send an email with an Action block

Now that the bot asks the user info, let’s use the gathered info to send an email so that they receive their discount code.

Send an email

To add a Send email Action:

  1. From the canvas, open the Send email returning user block.

  2. Go to its Settings.

  3. Change its type to Action.

  4. Back to the block content, scroll down to Send mail.

  1. Fill the text fields with the following:

  1. Click Save.

  2. Do the same process for the Send email new user block, and fill it in with the following content:

  1. Save your changes.

Confirm the email to users

Let’s now wrap up the conversation by confirming users that their code has been send.

To add a confirmation message:

  1. Drop a Message block to your canvas.

  2. Go to the block Settings.

  3. Change its name to Thanks.

  4. Back to the block configuration, add a Text step.

  5. Fill it with the following text: Thanks {userName}, we just send you an email with the code!

  6. Save your changes.

  7. Draw a Go-to connection from the two blocks that send email to the Thanks block.

Your canvas should look like so:

Test your bot

Make sure to test your bot. Is everything working as expected? If so, your conversation should like so:

And if you check your emails, you should have received something like this:

Lesson 5 recap

In this lesson, you’ve learned how to:

Coming next

You’ve just built your whole flow, congratulations! The final step in your bot building journey will be to publish your bot.

page6. Set up a channel and publish your bot

💬 Feedback

Your feedback on the tutorial means the world to us! Please, let us know what you think through this short form.

Last updated