The trio Joonbot x Airtable x Integromat / Make is very powerful!
Among the things you can do with the trio, you can get data from Airtable and reuse it in your Joonbot conversation.
To show you how to do it, we'll take an example of a chatbot that gives the last voting results.
Here is how to proceed:
Create your Airtable
Here I want to display statistics, so I want to arrange myself to get an integer.
Here is the formula you can use:
INT(nb_vote_a / (nb_vote_a + nb_vote_b) * 100)
I'll just have to add a percentage in my chatbot text right after.
Later, when I create my webhook into Integromat / Make, I will need to give the record_id, so I'll add a column to get it. For that, I can use this formula :
RECORD_ID()
Create your chatbot
Our chatbot will display the voting results, so you need to first add a webhook block to get the data and then create a text block that displays the results by calling variables.
You can name the variables as you want; they only need to have the same names as your webhook response that you'll create later.
To call a variable, you always need to use the {{ }}.
Create your webhook in Integromat / Make
1. Create a new scenario and add the trigger custom webhook
2. Create a webhook by clicking on the "add" button and name it the way you want.
3. Copy the Webhook URL
4. Go into your Joonbot and click on your webhook block and on the "edit my webhooks" button.
5. Click on the "Create webhook" button, name your webhook, choose GET as webhook method, paste the Webhook URL in the field below and save.
6. Now, click on the Joonbot logo on the upper left and go back to your chatbot. Click on your Webhook block and choose the webhook you just created.
Choose "No" for the Asynchronous option.
7. Now go back to Integromat / Make and add the new action to your scenario: the Airtable get a record.
8. Connect your Airtable account, pick your database and table and go into the Airtable you created, copy the record_id and paste it in your Integromat/ Make Airtable block.
9. Add a new action into your Integromat / Make scenario: the Wehbook response.
⚠️ Joonbot webhook block is expecting a JSON, so you need to send back a JSON format.
For that, toggle the "show advanced settings" button to add a header.
Add Content-Type as Key and application/json as Value.
10. Now, create the JSON in the Body field. A JSON format looks like that:
{
"your_variable_name_a": XXX,
"your_variable_name_b": YYY
}
⚠️ Your variable names have to be the same as the ones you call in your Joonbot.
11. Now, time to tell your Integromat/ Make custom webhook first block that you designed the Webhook response this way.
Click on the "redetermine data structure" button and start a conversation with your chatbot.
⚠️ You'll get a weird behaviour within the conversation as nothing happens, or you get a "sorry, there is an issue"; it's normal. 😁
Come back to Integromat / Make and click on OK.
12. Time to test now!
Within Integromat / Make, activate your integration. Make sure you have the right option selected: "Immediately as data arrives".
If something doesn't work
If you make some changes in your Joonbot, don't forget to redetermine your data structure in your custom webhook block.
Re-run to see if everything is ok now.
Also, maybe there is something wrong with your Webhook block in Joonbot. First, check that your webhook block has a webhook selected and that the URL is correct.
If your chatbot is ok and you tested your Integromat integration, and it's a success, then open a tab and paste the webhook URL. Maybe there is an issue with the JSON payload.
Well, you are the 🤴 / 👸 of automation now! 🚀
Comments
0 comments
Please sign in to leave a comment.