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'
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe31ec311-d29b-4a71-be7f-7a554076531c%2F434361de-c842-4d00-a768-bf17bd7f50b3%2FGroup_15.png%3FspaceId%3De31ec311-d29b-4a71-be7f-7a554076531c?table=block&id=ab1a3234-8180-4234-9737-c76dcac157d0&cache=v2)
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.
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe31ec311-d29b-4a71-be7f-7a554076531c%2Fbcdd2d25-0f95-4e9b-8b89-8576493cdd3d%2FGroup_22.png%3FspaceId%3De31ec311-d29b-4a71-be7f-7a554076531c?table=block&id=41fd1436-56d7-4112-8bbb-6b47ce45e0b7&cache=v2)
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!
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe31ec311-d29b-4a71-be7f-7a554076531c%2F6d51476b-8faa-44ec-8e99-94bb8315ca85%2FGroup_24.png%3FspaceId%3De31ec311-d29b-4a71-be7f-7a554076531c?table=block&id=f3ea550c-f524-4373-a78b-7b8b914d9d41&cache=v2)
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe31ec311-d29b-4a71-be7f-7a554076531c%2Fa643d26d-f52a-41b9-86b0-5af607b7c517%2FXnapper-2023-10-25-2.35.png%3FspaceId%3De31ec311-d29b-4a71-be7f-7a554076531c?table=block&id=6382fb03-4180-4b5d-932b-289922d00c42&cache=v2)
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.
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe31ec311-d29b-4a71-be7f-7a554076531c%2F63cea1ea-87b6-47fb-b99e-f8dd3ff382d5%2FGroup_19.png%3FspaceId%3De31ec311-d29b-4a71-be7f-7a554076531c?table=block&id=c79c6b81-3e63-4b6e-96ee-9cae6559ec7c&cache=v2)
A popup will open; we have already completed the first steps and reached the Zapier testing stage, so let’s click 'Ready to Test'.
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe31ec311-d29b-4a71-be7f-7a554076531c%2F4fb21df0-d3c9-411c-91aa-f9d16e592db8%2FGroup_25.png%3FspaceId%3De31ec311-d29b-4a71-be7f-7a554076531c?table=block&id=aa32fc5b-e5d4-44ef-b502-ecc7a22160a4&cache=v2)
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
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe31ec311-d29b-4a71-be7f-7a554076531c%2Facc82c00-6452-4b33-96d2-9defb7c30d96%2FGroup_23.png%3FspaceId%3De31ec311-d29b-4a71-be7f-7a554076531c?table=block&id=4d5f58c8-e11b-429b-984e-4cff26c6b7b4&cache=v2)
Click 'Test' and you’ll see the payload show up in Zapier. We’re almost there!
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe31ec311-d29b-4a71-be7f-7a554076531c%2Fed5cebda-7b1e-46ce-9033-32ae075dff93%2FGroup_21.png%3FspaceId%3De31ec311-d29b-4a71-be7f-7a554076531c?table=block&id=a655aff3-b30d-415f-b478-94f25852ea3b&cache=v2)
Before returning to Zapier and completing the Zap, let's include instructions for the chatbot on when and how to use this new Action:
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe31ec311-d29b-4a71-be7f-7a554076531c%2F35097bf7-d86b-4be3-9ce4-83fd8e0edb0d%2FGroup_26.png%3FspaceId%3De31ec311-d29b-4a71-be7f-7a554076531c?table=block&id=f5ec961c-5a5c-4dc0-902e-40101145008f&cache=v2)
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.
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe31ec311-d29b-4a71-be7f-7a554076531c%2F8d999592-fa7f-41f4-9f50-1cec49f97497%2FXnapper-2023-10-25-3.52.45_PM.png%3FspaceId%3De31ec311-d29b-4a71-be7f-7a554076531c?table=block&id=be3b718c-32fb-463a-bddc-69caef7d9158&cache=v2)
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:
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:
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe31ec311-d29b-4a71-be7f-7a554076531c%2F32370e5f-88f1-4f72-8052-304e3ff673e7%2FXnapper-2023-10-06-2.06.17_PM.png%3FspaceId%3De31ec311-d29b-4a71-be7f-7a554076531c?table=block&id=cd6ae1e3-e550-45b9-8c16-90da0154f3c1&cache=v2)
An now check your Airtable database:
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fe31ec311-d29b-4a71-be7f-7a554076531c%2Fcbbcb2a4-f65c-448b-ad36-6e6e19bb5cd5%2FXnapper-2023-10-06-2.15.54_PM.png%3FspaceId%3De31ec311-d29b-4a71-be7f-7a554076531c?table=block&id=a630b271-9003-4ff4-bcb7-b98c6f984ca9&cache=v2)
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.