How to Send SMS Using a Custom Conversation Provider in GHL with Sakari and Make.com

Updated on May 11,2023

To send SMS in GHL, you need to have a phone number which by default you can do by using GHL's in-house phone provider LC (Lead Connector) or by linking to a Twilio phone number.

However, these are not the only options. GHL allows the option to set up your customer conversation provider to send SMS. This feature proved really useful recently when a client requested that I set up their GHL to send SMS using Sakari.

Why Sakari? The cost per sms was cheaper in the region and the reliability of the service - no deliverability issues.

Which brings us to the topic of today, how to send sms using a customer provider in GHL using Sakri and make.com.

To send SMS using a custom conversation provider in GHL, we'll need to follow these general steps:

  1. Set up a Sakari account.
  2. Set up a Make.com account: Make.com is a platform that allows you to create custom integrations with other apps and services.
  3. Create a custom conversation provider in GHL.
  4. Test your custom conversation provider.

Step 1: Set up a Sakari account

First, you'll need to create an account with Sakari, which is a messaging platform that provides APIs for sending SMS messages.

  • Go to https://www.sakari.io/ and sign up for an account.
  • To use the APIs, you need three important things: client ID, client secret, and account ID. To get these, log in to https://hub.sakari.io and click on the "cog" in the top right corner. Look for your API credentials and account ID in the popup dialog at the bottom. If you can't see them, click on "Request Credentials.

Step 2: Set up a Make.com account

Make.com is a platform that allows you to create custom integrations with other apps and services. You'll need to create an account with Make.com and then set up a new integration that uses the Sakari API to send SMS messages.

  • Go to https://make.com/ and sign up for an account.
  • Create a new scenario and give it a name of your choice. Click on the + sign and select "Webhook" and then select "Custom webhook".
  • Copy the address- we will use it in the next section.

Incoming webhook in make

Create a custom conversation provider in GHL

To get started, we need to register an app with Go High Level and obtain a clientId and a clientSecret.

Then, we'll create a custom conversation provider in the app that will forward the message to be sent to the Make.com scenario we just created.

To do this, sign up for a developer account on the Go High Level Developer Site and create a new app. When creating the app, select "Private" as the app type, and define the app's scopes as:

  • contacts.write
  • contacts.readonly
  • conversations.readonly
  • conversations.write
  • conversations/message.readonly
  • conversations/message.write

Next, click on "Create Conversation Provider", give your provider a name, select "SMS" as the type and paste the make.com webhook address we created earlier and save.

Set up GHL conversation provider

Add the Conversation Provider to the location or agency in GHL

To add the app to a location, the sub-account or agency admin needs to go to the app's Authorization Page URL.

This URL can be generated by replacing the client_id, redirect_uri, and scope in the following template:

https://marketplace.gohighlevel.com/oauth/chooselocation? response_type=code& redirect_uri={{REDIRECT_URL}}& client_id={{CLIENT_ID}}& scope={{LIST OF SCOPES SEPARATED BY SINGLE SPACE}}

After linking the app, go to your sub-account, click on "settings" and select "Phone numbers" from the side menu.

Select the SMS service provider you created from the list of options as shown in the picture below:

Set up GHL conversation provider

That's all we need to do in GHL!

Every time you send an SMS in GHL, the message will now be forwarded to the make.com webhook indicated.

The next step is to receive the sms and use Sakari API to send it to the appropriate receiver. All be done using make.com automation.

Send the SMS using Sakri API and make.com

Here is the format of the SMS that will be sent to our make.com webhook:

{

"contactId": "GKBhT6BfwY9mjzXAU3sq",

"locationId": "GKAWb4yu7A4LSc0skQ6g",

"messageId": "GKJxs4P5L8dWc5CFUITM",

"type": "SMS",

"phone": "+15864603685",

"message": "The text message to be sent to the contact",

"attachments": ["https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png"]

}

To make a send sms request using Sakari, you need a token to authenticate it.

Sakari provides an endpoint you can use to obtain a token. We will need the client id and client token we obtained from Sakari earlier.

Add a new http module to the scenario and select "Make a request" as the action.

Next, update your request as shown in the screenshots below:

http make.com post request

make.com post request

Finally, let's add an http post request module to send the SMS:

  • Set the URL as https://api.sakari.io/v1/accounts/{accountId}/messages
  • Add the "Authorization" header and set the value to "Bearer {{Token obtained from the previous module".
  • Select "Raw" as the body type and the content type as "application/json"
  • Add these as the content: { "contacts": [{ "mobile": { "number":" {{1.phone}}", "country": "US" } }], "phoneNumberFilter": { "group": { "id": "{{phone number group id but is oprional}}" } }, "template":"{{1.message}}"}

Note:

  • Replace {{accountId}} with your Sakari account id
  • phoneNumberFilter field is optional and is only important if you have multiple phone numbers in Sakari and you want to specify which phone number should send the message.

send sms using sakari api

sakari sms

Test the custom conversation provider

Send SMS from GHL Dashboard:

sms sent from GHL Dashboard

Boom it works:

sms message

Conclusion

Once you have set up the necessary configurations in Make.com and GHL, you can start sending SMS messages using Sakari API through the custom conversation provider you created. Here are the steps to follow:

  1. Open the GHL Dashboard and navigate to the conversation you want to send an SMS from.

  2. Type your message and add any necessary attachments.

  3. Click on the "Send" button.

  4. Your message will now be forwarded to the Make.com webhook address you created earlier.

  5. Make.com will trigger the scenario you set up, which will send an HTTP request to Sakari API to send the SMS message.

  6. Sakari will authenticate the request using the client ID and client secret you obtained earlier and send the message to the appropriate recipient.

  7. The recipient will receive the message on their phone.

That's it! By following these steps, you can easily send SMS messages using Sakari API in combination with Make.com and GHL.

Do you need help creating such integrations? Book a call with me today.



More in this category: How to automatically Sync your Google Sheet with Monday.com »