This is an advanced integration. We recommend using our Webhook integrations instead: Webhooks
Your website chatbot can not only answer questions about your business or online store, but it can also perform simple tasks, for example:
- Add an event in Google Calendar
- Create a new contact in Hubspot CRM
- Collect survey answers in an Airtable database
All this can be done thanks to our integration with Zapier - and through it, with 6000+ services it supports.
Want to learn how to go 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 will collect contact information from website visitors and add it to Airtable. If you want to follow along, make sure you have the accounts set up on both services.
This guide explains a specific example of integrating with one of services available on Zapier, Airtable - but the same steps apply to any integration.
Preparation
Prepare the Airtable database
Let’s get our “lead database” ready for new contacts! Go ahead to your Airtable account and create a database.
Make sure to name the columns accordingly:
- 'name'
- 'email'
- 'phone number'
Get your API key from your Chatwith dashboard
When connecting Chatwith to Zapier for the first time, you will need to provide Zapier with your Chatwith API Key. This will authorize Zapier to access your chatbots and interact with the Chatwith API.
You can find your API key in your Dashboard, at this URL: https://chatwith.tools/app/account. Copy the key - you will need it in the next step.
Create a Zap in the Zapier dashboard
Zapier works by connecting two or more apps: the Trigger app and the Action app. Chatwith is our Trigger app and in this guide, Airtable is the Action app.
The Chatwith app is not public in the Zapier app store. Click here to accept the invitation to use it. It won’t show up in your Zapier dashboard otherwise!
The order of operations is crucial for this integration to function correctly. Please ensure that you follow the steps carefully.
- Begin by navigating to your Zapier dashboard and creating a new Zap.
- Select the Chatwith app as the Trigger.
- Choose the 'Skill Triggered' event action.
- When prompted, provide your Chatwith API key.
- Proceed with the Zapier flow until you are ready to test. Do not proceed with testing (or skip the test) yet!
Important: It is crucial to not proceed with testing at this point. Please do not click “Test Trigger” or skip this step until you have completed the configuration in the Chatwith dashboard (next section).
Add the Zapier Zap 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 action and provide instructions to the chatbot.
Adding Zapier 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 'Zapier' action card.
A popup will open; we have already completed the first steps and reached the Zapier testing stage, so let’s click 'Ready to Test'.
In the next section, we will define the values that our chatbot should collect and send to Zapier. 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
first_name
andemail
when adding a new newsletter subscriber to Mailchimp.
- 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 will use the same fields we already added as columns in Airtable:
name
, email
, phone number
Click 'Test' and you’ll see the payload show up in Zapier. We’re almost there!
Before returning to Zapier and completing the Zap, let's include instructions for the chatbot on when and how to use this new Action:
If the visitor asks for a call, inquires about the offering or wants to leave their contact details, then you will use the provided Zapier Action to save their contact information (name, email, phone number). If they did provide their contact details upfront, you must ask them for each piece of information until you have everything to create a lead in the database. Never create leads with only partial or dummy information.
Finishing the Zap in Zapier
Now that we have established and tested the connection between Chatwith and Zapier, we are ready to complete and enable the Zap.
Let's return to the Zapier dashboard and proceed with the following steps:
- Select Airtable as the Action app.
- Choose 'Create Record' as the event action.
- When prompted, authorize Zapier to connect with Airtable and access the necessary resources.
- Map the values received from Chatwith through the Trigger to the Action, including name, email, and phone number.
- Save, test, and enable the new Zap.
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 are called "Reception AI" and you can collect visitors contact details. If the visitor asks for a call or wants to leave their contact details 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 contact:
An now check your Airtable database:
Congratulations! Your chatbot has a new superpower now 🎉
Troubleshooting
What if something doesn’t work?
- Open the Zapier dashboard and check if the Zap is toggled on does not show any warnings. For example, one of your services used in the Zap could become disconnected and require you to log in again.
- Ensure that the correct services and accounts are being used. Check the Zapier 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 Zap in Zapier, 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.