# Integration using the Make service

[*Make*](https://www.make.com/en) — *a unified platform for automation. All the tools needed to design, create, automate, and scale your business.*

You can set up integration with any external service. Selarti will send a webhook to the external system when the AI agent receives contacts or consent for a target action.

### Setting up integration in the Make dashboard

Register at [the Make service](https://www.make.com/en), complete a short survey from the service, then go to the «*Organization*» and click the «*Create a new scenario*» *button.*

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2F9Ak6xOIKShVdS8jyibDx%2Fmake_1.png?alt=media&#x26;token=09c68fb0-7c5e-406c-baab-1e36ceb3b025" alt=""><figcaption></figcaption></figure>

Click the connection type «*Webhooks*»*.*

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2FUudy8aiSnfCnT03iqHpJ%2Fmake_2.avif?alt=media&#x26;token=0945b197-734c-4a89-8cf9-c5b15ae51fb4" alt=""><figcaption></figcaption></figure>

Then select «*Custom webhook*»*.*

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2FU89ap5CgrKo4cig6cmSD%2Fmake_3.avif?alt=media&#x26;token=eb2cbabf-8cd3-4a33-b8de-964a1b8a804d" alt=""><figcaption></figcaption></figure>

Click «*Create a webhook*».

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2F213YV0GVhe2oyIGwft2N%2Fmake_4.avif?alt=media&#x26;token=ea604cdb-44de-49b0-a2b4-8016f21a7276" alt=""><figcaption></figcaption></figure>

Enter a name for the webhook you are creating and click «*Save*».

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2FacLeyRg75h8xV8GIgIRd%2Fmake_5.avif?alt=media&#x26;token=3fd43e8f-fde6-47fe-9080-72be53e904a9" alt=""><figcaption></figcaption></figure>

Select the previously created webhook from the dropdown list, note — the label should show «Stop», then copy the webhook address using the «*Copy address to clipboard*» *button* and proceed to the next step in the adjacent tab. Do not save the webhook or close this page yet; you will need to save it later.

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2F2G7BYtBfx9lYG94cZkX2%2Fmake_5.1.avif?alt=media&#x26;token=079fdc5c-9c1b-48c1-9371-8a26d2944742" alt=""><figcaption></figcaption></figure>

### Setting up integration in the Selarti dashboard

Go to the Selarti dashboard, on the left choose «[*Integration*](https://selarti.com/panel?menu=integration)», click «*Create integration*»*,* then select the type «*Make*».

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2F8gNMLb3wPLuHpnHwyuso%2Fmake_6.png?alt=media&#x26;token=4704d7d9-e600-433c-99c1-9747a2497c70" alt=""><figcaption></figcaption></figure>

Enter your name, then paste the link copied from the Make dashboard. Click «*Send test webhook*».

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2FjUSX1O4reVdSBleSqekU%2Fmake_7.png?alt=media&#x26;token=19cc46ee-dac6-4988-9d57-4de64c266c1e" alt="" width="461"><figcaption></figcaption></figure>

If you did everything correctly, the link entered in Selarti will be highlighted in green.

Select the required webhook types and click «*Create integration*»**.**

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2FMmkRS7pcRdUc8T076Pcq%2Fmake_8.png?alt=media&#x26;token=90094dc7-5da9-4a25-8078-f546741d74ba" alt="" width="461"><figcaption></figcaption></figure>

### Creating an action in the Make service

Return to Make and make sure the webhook connected — instead of the label «Stop» it will show «Successfully determined». Click «*Save*».

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2Fhe3PffiysySu6NeaRcnI%2Fmake_9.avif?alt=media&#x26;token=6afded80-a699-4c29-b42f-d8726e5849e4" alt=""><figcaption></figcaption></figure>

Then create an action. There can be many options Make supports a large number of actions.

#### Example of configuring data transfer to Google Sheets

For this setup you will need a Google account and a pre-created spreadsheet in Google Sheets.

Click the «*+*» *sign.*

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2F1E7aQUEa6W5h5MZwywlo%2Fmake_10.avif?alt=media&#x26;token=eccd63b1-4cf2-49ab-85e3-5fb14efa69fd" alt=""><figcaption></figcaption></figure>

In the opened menu select «*Google Sheets*».

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2FZV3cDaQ6dq8sIFa9cqUA%2Fmake_11.avif?alt=media&#x26;token=047d9afd-40e5-4aa8-aabd-9fca7dc113d7" alt=""><figcaption></figcaption></figure>

Then choose the action «*Add a Row*» — adding a new row to the spreadsheet.

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2FePnUcFKAQ9bMtpyDQnxK%2Fmake_12.avif?alt=media&#x26;token=a0299592-82e4-44b1-aac9-3da1d0a0fcc5" alt=""><figcaption></figcaption></figure>

Connect Make and your Google account by clicking «*Create a connection*».

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2FfDNIgLn2dgFKq7sv6wuV%2Fmake_13.avif?alt=media&#x26;token=92cff0ff-e441-4c70-8eb3-69cc2a06059f" alt=""><figcaption></figcaption></figure>

In the newly opened window select the account, and if necessary sign in to the required account.

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2FZLcR94uY9nMxSXGaFsiy%2Fmake_14.png?alt=media&#x26;token=8039e2e4-5bc5-40de-8af8-6797c925a19d" alt=""><figcaption></figcaption></figure>

Accept all terms to create the connection and wait for the connection to be established. If the connection is interrupted — try again.

Then select the spreadsheet you created where leads will be collected. Find it in the list or using search.

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2Fz8cRqpKkCV3T17XisW1N%2Fmake_15.avif?alt=media&#x26;token=54b9122d-3a9c-4e2a-a67d-72d29a3faebe" alt=""><figcaption></figcaption></figure>

Choose the required sheet in the spreadsheet from the dropdown list.

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2F8zXPvo5Dm6Seu7CKxLyf%2Fmake_16.avif?alt=media&#x26;token=c6276f7f-37da-463c-ab8d-9fcdbf1ad013" alt=""><figcaption></figcaption></figure>

Select a value for each column. Clicking on a field will open a dialog: go to the *«☆»* tab, specify the required value and click «*Save*». If the webhook fields do not appear — recreate the webhook and reconnect the integration with it in Selarti.

Description of all webhook fields at the end of the article.

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2Fhcoat7yK6e1MZRdsGXTL%2Fmake_17.avif?alt=media&#x26;token=10cf604a-e47d-4fae-8800-e9469e95d57d" alt=""><figcaption></figcaption></figure>

After configuring the actions, click the «*Run once*».

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2FoEJWKDcnrP7K4FOnbNvB%2Fmake_18.avif?alt=media&#x26;token=085d210b-9568-45c4-beb4-85d47e0f9948" alt=""><figcaption></figcaption></figure>

After setup open the «*Scenarios*» section and switch the toggle next to the created scenario to «*ON*».

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2FXfwBWDZtBw6KGYCjjNHW%2Fmake_19.avif?alt=media&#x26;token=6339237c-ffaf-4325-82d8-94964bb755fa" alt=""><figcaption></figcaption></figure>

### Webhook fields description

<mark style="color:purple;">**`title`**</mark> — the dialog title (FirstName LastName/profile name).\ <mark style="color:purple;">**`contacts`**</mark> — the interlocutor's contacts. Phone, username.\ <mark style="color:purple;">**`success`**</mark> — the AI agent marked the dialog as successful (yes/no).\ <mark style="color:purple;">**`get_contact`**</mark> — the AI agent obtained additional contacts of the interlocutor (yes/no).\ <mark style="color:purple;">**`close`**</mark> — the dialog is closed (yes/no).\ <mark style="color:purple;">**`is_bot`**</mark> — the dialog is identified as a bot (yes/no).\ <mark style="color:purple;">**`share_url`**</mark> — link to view the dialog.\ <mark style="color:purple;">**`company_id`**</mark> — company id.\ <mark style="color:purple;">**`task_id`**</mark> — task id.\ <mark style="color:purple;">**`thread_id`**</mark> — dialog id.\ <mark style="color:purple;">**`dialog`**</mark> — AI dialog with the user as text.

We can add additional fields from the list of standard ones. If you believe there are fields that are needed by all clients — write to [support](https://t.me/selarti_support_bot).

You can add custom fields for yourself using [custom API](https://manual.selarti.com/manual-en/main-sections-of-the-service/ai/ai-functions).
