Your website chatbot can not only answer questions about your business or online store, but it can also perform a variety of tasks, for example:
- Add a new support ticket in Freshdesk
- Create a new contact in Pipedrive CRM
- Collect survey answers in an Retable database
Want to learn how to take your chatbot beyond just Q&A? Read along: this guide will take you through the necessary steps towards making your chatbot even cooler!
Introduction
In this guide, we will create a chatbot that adds a new subscriber to your email newsletter. If you want to follow along, make sure you have the accounts set up on Make.com and Mailchimp.
This guide explains a specific example of integrating with one of services (”modules”) available on Make.com, Mailchimp - but the same steps apply to any integration.
Preparation
Prepare the Mailchimp Audience
Let’s make sure we have a list ready for more subscribers! Go ahead to your Mailchimp account and create a new Audience if you haven’t done that yet.
Feel free to skip this step if you already have an Audience you want to use.
Create a Flow in the Make.com dashboard
Make.com works by connecting two or more apps (”modules”): the Trigger app and the Action app. We will use 'Webhook' as the trigger piece, 'Mailchimp' as the first action piece and 'HTTP' as the last piece.
- Begin by navigating to your Make.com dashboard and creating a New Scenario.
- Select Webhook as the Trigger.
- Copy the provided Webhook URL.
Add a Webhook as a new Action for your AI chatbot
The following steps will be performed in the Chatwith dashboard. We will define the values used in this new skill and provide instructions to the chatbot.
Adding Webhook as a new Action
From the Chatwith dashboard, click on the 'Actions' button in the left sidebar.
In the window that appears, click 'Install' on the 'Webhook' Action card.
A popup will open. Here, we will enter the Webhook URL and define the values that our chatbot should collect and send to the webhook. We will also send a first test payload to establish a connection between the services.
When choosing values, consider what the triggered service accepts. For example:
- Use
phone_number
andfull_name
when creating a Hubspot contact.
- Use
answer1
,answer2
, and so on when asking survey questions and adding them to Google Sheets.
For our chatbot, we want to add a new subscriber by
email
, so let’s define the payload as such:Click 'Send test payload' and you’ll see the payload show up in Make.com. We’re almost there!
Before returning to Make.com and completing the scenario, let's include instructions for the chatbot on when and how to use this new Action:
This action can be used to add visitors as new subscribers to email newsletter. If they did not provide their email upfront, you must ask them for the email first. Never attempt adding a new email to the newsletter with partial or dummy information.
Finishing the Scenario in Make.com
Now that we have established and tested the connection between Chatwith and Make.com, we are ready to complete and enable the Scenario.
Let's return to the Make.com dashboard and proceed with the following steps:
- Select Mailchimp as the next module connected to our webhook.
- Choose 'Add/Update a Subscriber' as the event action.
- When prompted, authorize Make.com to connect with Mailchimp and access the necessary resources.
- Map the value received from Chatwith through the Trigger to the Action. Make sure to choose only the
name
field in the “Data to Insert” picker.
- Save, test, and publish the new Scenario.
Updating the System Prompt
To ensure that our chatbot is aware of its new role, we need to update the System Prompt. Follow these steps:
- Select 'Settings' in the navigation sidebar.
- Locate the 'System Prompt' field.
- Update the field with the following instructions:
You task is to collect visitors email if they want to get added to the newsletter. If the visitor gives their email address you will use the enabled action to save their information.
Make sure to save the changes once you have finished updating the System Prompt.
Testing
We are ready to see how our upgraded chatbot performs! Head on to the 'Preview' section in the dashboard and try asking the chatbot for the newsletter:
Congratulations! Your chatbot has a new superpower now 🎉
Tip: It’s a good idea to validate emails that come from free text sources. You can extend your Make.com Scenario by another module like ZeroBounce to do this automatically.
Troubleshooting
What if something doesn’t work?
- Open the Make.com dashboard and check if the Scenario is published and does not show any warnings. For example, one of your services used in the Make.com could become disconnected and require you to log in again.
- Ensure that the correct services and accounts are being used. Check the Make.com logs and Chatwith conversation history to see how the chatbot interacts with third-party services.
- Put on your Prompt Engineer's hat and make sure the System Prompt and Action Instructions are filled in and clear. Look for signs of the chatbot not being aware of the action at all or using the action with incorrect details.
- If all else fails, try starting over: delete the Scenario in Make.com, remove the Action in Chatwith, and create the connection from scratch.
- Reach out to our team at support@chatwith.tools. Our team will be more than happy to assist you with setting up your chatbot.