Help Center
How can we help? πŸ‘‹

ChatGPT Integration

How to configure OpenAI’s ChatGPT to receive and respond to SMS and WhatsApp in Avochato.

Β 

Welcome to the Avochato / ChatGPT integration guide. The steps below will help you configure OpenAI’s advanced natural language processing models to automatically handle WhatsApp and/or SMS conversations in Avochato. There are many applicable use cases for this integration, ranging from managing external customer conversations at scale to collecting internal data from employee surveys. Note that this product integration is in Beta - Avochato does not guarantee full accuracy in the models used by ChatGPT and is not responsible for the content nor the timing of the messages sent to recipients. Please refer to Avochato’s Terms of Use and Privacy Policy for more information.

Β 

To get started, you will need account access to three different services:

  • Zapier (to enable the zap configuration steps shown below)
  • OpenAI (to configure the processing model used)
  • Avochato (to send and receive these messages from a valid business number)
Β 

Once you have active accounts for the services listed above, follow the steps below to setup ChatGPT with an SMS-enabled Avochato number. Note that Step 3 of the Zap (”Text in Formatter by Zapier”) is optional and only applicable if you wish to setup WhatsApp in addition to SMS. WhatsApp requires a separate business approval process. You can delete this step in the zap if you are only looking to set up SMS. Contact us if you would like to initiate the WhatsApp approval process. The WhatsApp Avochato integration allows you to WhatsApp-ify a new or existing SMS number, and you will be able to have separate conversations in your Avochato inbox for SMS and WhatsApp using the same, single phone number. Click here to learn more about the WhatsApp integration.

1) Login to your Zapier account and click the Zap template here then click β€œTry this Zap”

Notion image

2) You will be redirected to this window where you will configure the Zap by completing the following steps:

Notion image

3) Click on β€œ1. New Inbound Message in Avochato” to expand and show configurations that needs to be added. β€œApp & Event” should be pre-populated and will have a green checkmark.

Β 
Notion image

4) Click β€œAccount” to expand it. Here you will need to connect your Avochato account by clicking β€œSign In”.

Notion image

5) A new window will pop-up asking for your Auth ID and Auth Secret.

Β 

To locate both of these, go to your Avochato account and select the inbox (phone number) that you want the ChatGPT model to use for receiving messages and sending back its responses to the user. After you have selected the inbox, navigate to β€œSettings” and under β€œTexting Automation” click β€œAPI Access”. Select a user, then click on β€œGenerate Credentials” to get your Auth ID and Auth Secret keys.

Β 

Note: You will need to have an upgraded account on Avochato to access the API. Contact us if you do not have access to the API settings.

Notion image
Notion image
Notion image

6) Once you have provided your Auth ID and Auth Secret and you see a green checkmark beside β€œAccount”, you can now proceed to β€œTest” and click β€œTest Trigger”

Β 
Notion image

7) When you get β€œWe found a message!”, that means Zapier has successfully communicated with your Avochato account. You can now proceed to the next step by clicking β€œContinue”

Β 
Notion image

8) Click on β€œ2. Conversation in ChatGPT” to expand and configure it. β€œApp & Event” will be pre-populated and no changes will be needed. What you’ll need to do here is go to β€œAccount” and connect your ChatGPT account by clicking β€œSign In”

Notion image

9) A new window will pop-up asking for your API Key from ChatGPT. If you haven’t yet, login to your ChatGPT account and click this link or click β€œView API Keys” on the window pop-up to get your API Key (secret key). You can confirm that you have successfully signed in if you see a green check mark beside β€œAccount”. Click β€œContinue” to proceed to β€œAction”.

Β 

Note: You will need to generate a secret key for the first time and you will need to generate a new one again if you lose it for security reasons.

Β 
Notion image

10) Under β€œAction”, there are a few settings you can change to customize how ChatGPT will behave to incoming messages. Below are explanations for each field:

  • User Message (Required): Click on space below β€œUser Message” and select β€œ1. Message Body:” from the drop down selection. This is mandatory for the integration to work as this part configures the Zap to communicate the text message to ChatGPT.
  • Model: Determines the ChatGPT model to be used for responding. Note that depending on your OpenAI account you may have access to multiple different models.
  • Temperature: Higher temperatures will make the output more random, while lower values will make it more focused and deterministic.
  • Assistant Instructions: This is the prompt that you give the model to give it guidance on what to say and how to say it. This is the most important field to configure, as it determines the overall behavior of the model and adapts to the use case that you wish to configure. There is a limit to how many characters you can include in the prompt depending on the version model used. We strongly recommend experimenting with this prompt in the OpenAI Playground before configuring it.
  • User Name: This is how the model will address the other party it is communicating with.
  • Assistant Name: This is the name of the OpenAI assistant.
  • Memory Key: We recommend setting this to β€œ1. Contact Phone Number:”. This will allow the model to remember the conversation it had with that specific phone number, and it will build conversational knowledge specific to that unique conversation.
Β 

Once you have set the β€œUser Message” to β€œ1. Message From:”, you can now click β€œContinue” as this is the only required portion of this step.

Notion image
Β 

11) Test the action by clicking β€œTest” and it should show something similar to the image at the right if it is successful. If you see a green checkmark at the right side, you can now proceed to the next step.

Notion image

12) The β€œText in Formatter by Zapier” step is optional and is mainly required for ChatGPT to work with WhatsApp. You can delete this step by clicking on the three dotted symbol (β€’β€’β€’) and choosing β€œDelete” if you do not plan to use ChatGPT with WhatsApp conversations. If you have WhatsApp enabled in Avochato, or plan to do so in the future, you can configure this step as seen below in order for ChatGPT to work with both SMS and WhatsApp conversations.

Β 

Under β€œApp & Event” then β€œEvent” choose the β€œText” event.

Under β€œAction” then β€œTransform” Select β€œSpreadsheet-Style Formula”

Under β€œAction” then β€œFormula” type the following command, making sure to substitute Zapier fields in everything in brackets below:

=if(”[insert Message Origin from Step 1]” = β€œwhatsapp”, β€œwhatsapp: [insert Contact Phone Number from Step 1]”, β€œ[insert Contact Phone Number from Step 1]”)

Click β€œContinue” on both the β€œAction” and the β€œTest” steps.

Notion image
Notion image

13) Click on β€œ4. Send Text Message in Avochato” to expand and configure it. β€œApp & Event” will be pre-populated (no changes needed) and β€œAccount” should show your Avochato account that you linked earlier in β€œ1. New Inbound Message in Avochato”.

Β 

What you need to do here is to change the following fields under β€œAction”:

  • Phone Number: Change this to β€œ1. Contact Phone Number”
  • Message: Change this to β€œ2. Assistant Response Message”
Β 

Optional fields you can configure are:

  • Tag: Adds a tag to the contact that sends a message to the ChatGPT configured number
  • Media URL: Adds an image to every response the ChatGPT model gives by using a publicly available image URL (uses 1 mms segment)
  • Message Status Callback URL: URL to send a POST request to on every status change while this message is being delivered.
    • Β 
Notion image
Β 

14) Once done, publish the Zap and test the integration if it works by sending a message to the number you chose the ChatGPT model to use.

Β 
User sending text messages to ask questions from the ChatGPT model
User sending text messages to ask questions from the ChatGPT model
ChatGPT model responding to incoming messages
ChatGPT model responding to incoming messages
Β 
Β 
Did this answer your question?
😞
😐
🀩