# Integration using the Zapier service

[*Zapier*](https://zapier.com/) *— a service for automation and creating integrations. It allows combining functions of different products, optimizing workflows and setting up integrations without involving developers.*

### Setting up integration in the Zapier dashboard

1. Register [in the Zapier service](https://zapier.com/). On the main page select «*Create*» and click the «*Zaps*».

<figure><img src="https://content.gitbook.com/content/sBua8zDbkZPvmgjidnwA/blobs/Mt2P1wWfkwPjLwTaLNsi/zapier1.png" alt=""><figcaption></figcaption></figure>

Click «*Trigger*».

<figure><img src="https://content.gitbook.com/content/sBua8zDbkZPvmgjidnwA/blobs/Ig0Saln4KkviZghVp0wI/zapier2.png" alt=""><figcaption></figcaption></figure>

Select the connection type «*Webhooks by Zapier*».

<figure><img src="https://content.gitbook.com/content/sBua8zDbkZPvmgjidnwA/blobs/lUmXexjhdXfbkgb7tReM/zapier3.png" alt=""><figcaption></figcaption></figure>

Then in the menu on the right choose «*Catch Hook*».

<figure><img src="https://content.gitbook.com/content/sBua8zDbkZPvmgjidnwA/blobs/UfclMmEsqEfvKOTbiSad/zapier4.png" alt=""><figcaption></figcaption></figure>

Click «To continue» and in the «Trigger» tab also click «To continue».

Copy the created link. To do this click «*Copy*».

<figure><img src="https://content.gitbook.com/content/sBua8zDbkZPvmgjidnwA/blobs/zth7jD1fQMDihAiOFSJc/zapier5a.png" alt=""><figcaption></figcaption></figure>

### Setting up integration in the Selarti dashboard

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

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2FMyHbD8tIe8sxjLdL65K1%2Fzapier_6.png?alt=media&#x26;token=717a422f-2eb6-4b99-8b09-5ab7fb4c91c8" alt=""><figcaption></figcaption></figure>

2. Specify your name, then paste the link copied from the Zapier 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%2FjKXHH2mc8tjwAm4oMXpq%2Fzapier_7.png?alt=media&#x26;token=2e1854ae-9afe-4e1e-89e0-bc8761a71df7" alt="" width="461"><figcaption></figcaption></figure>

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

3\. Select the required trigger types from the dropdown list «*Select webhook type*» and click «*Create integration*».

<figure><img src="https://271796707-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBua8zDbkZPvmgjidnwA%2Fuploads%2F7uHWe00U5dOLYaHUrbg2%2Fzapier_8.png?alt=media&#x26;token=5ac84cae-8ecb-4061-bde3-8c61be14e0b2" alt="" width="461"><figcaption></figcaption></figure>

### Creating an action in Zapier

Return to Zapier and check the trigger — click «*Test trigger*».

<figure><img src="https://content.gitbook.com/content/sBua8zDbkZPvmgjidnwA/blobs/c5CxbjG5NNzjHh5HXfNT/zapier21.1.png" alt="" width="491"><figcaption></figcaption></figure>

If you did everything correctly, available fields will appear in Zapier.

<figure><img src="https://content.gitbook.com/content/sBua8zDbkZPvmgjidnwA/blobs/yNJ7i1Q8hR1edeMftRvZ/zapier22a.png" alt="" width="491"><figcaption></figcaption></figure>

Create an action. There can be many options; Zapier supports a large number of actions.

### Example of configuring data transfer to Google Sheets

In the menu select «*Google Sheets*».

<figure><img src="https://content.gitbook.com/content/sBua8zDbkZPvmgjidnwA/blobs/NZSg768ruZrRNIeE0yLL/zapier31a.png" alt="" width="563"><figcaption></figcaption></figure>

Then select the action «*Create Spreadsheet Row*» — adding a new row to the spreadsheet.

<figure><img src="https://content.gitbook.com/content/sBua8zDbkZPvmgjidnwA/blobs/uSy4prJdYCBEee6p8D4L/zapier32a.png" alt="" width="563"><figcaption></figcaption></figure>

Authorize with your Google account.

Select your Google account and click «*Continue*».

<figure><img src="https://content.gitbook.com/content/sBua8zDbkZPvmgjidnwA/blobs/bh7BqfFwn8bRdc6QMrrI/zapier34%D0%B0_1.png" alt=""><figcaption></figcaption></figure>

In the field «*Spreadsheet*» choose the spreadsheet where you plan to collect leads.

<figure><img src="https://content.gitbook.com/content/sBua8zDbkZPvmgjidnwA/blobs/BUAVluX8b16ln3A2gpjE/zapier33.01.png" alt="" width="563"><figcaption></figcaption></figure>

Select the values you want to pass to the spreadsheet and click «*Continue*».

<figure><img src="https://content.gitbook.com/content/sBua8zDbkZPvmgjidnwA/blobs/uLI35vnCJKL7idChnMym/zapier34a.1.png" alt="" width="563"><figcaption></figcaption></figure>

Run a test — click the button «*Test step*».

<figure><img src="https://content.gitbook.com/content/sBua8zDbkZPvmgjidnwA/blobs/Mndbl06bTVbmCPXja8Yc/zapier35a.png" alt="" width="524"><figcaption></figcaption></figure>

After configuring actions and a successful test click the «*Publish*».

<figure><img src="https://content.gitbook.com/content/sBua8zDbkZPvmgjidnwA/blobs/kC0WSOZEHTGyJVJbABRG/zapier36a.png" alt="" width="473"><figcaption></figcaption></figure>

### Description of webhook fields

<mark style="color:purple;">**`title`**</mark> - Dialog title (First Last/profile name)\ <mark style="color:purple;">**`contacts`**</mark> - Counterparty contacts. Phone, username\ <mark style="color:purple;">**`success`**</mark> - AI agent marked the dialog as successful (yes/no)\ <mark style="color:purple;">**`get_contact`**</mark> - AI agent obtained additional contacts of the counterparty (yes/no)\ <mark style="color:purple;">**`close`**</mark> - Dialog closed (yes/no)\ <mark style="color:purple;">**`is_bot`**</mark> - Dialog 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 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).
