> For the complete documentation index, see [llms.txt](https://help.sipgate.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sipgate.de/cloud-telefonanlage/en/connections-and-integrations/integrationen-fur-die-sipgate-app/wie-nutze-ich-den-sipgate-ai-assist-in-verbindung-mit-hubspot-slack-google-sheet.md).

# How do I use sipgate AI Assist together with HubSpot, Slack, and Google Sheets?

#### Prerequisite

AI Assist is available exclusively in the sipgate app, which is used in conjunction with the sipgate cloud phone system.

The webhook can only be configured by administrators of the sipgate account and applies only to channels. Consequently, a channel with a phone number is required in sipgate.

In Zapier, a plan with webhooks is required, and in HubSpot the API must be available.

{% hint style="info" %}
Note: This feature is currently in beta status in the app, so it can be found under "Labs" in the settings if you are among the beta testers. After release, the feature will then be listed under AI features.
{% endhint %}

#### **Step 1: Create webhook in Zapier**

After you are logged into Zapier, create a new Zap via "+ Create" in the top left:

![01-ZapierCreate.png](/files/62443fa5504dbdb7d137db082843639a5186d440)

#### **Step 2: Set up trigger**

In the new Zap, select the first trigger:

![02-ErsterTrigger.png](/files/e077f7f66a4c427fec0a75aae3c3f535d7468e9a)

Select Webhooks for this trigger:

![03-ErsterTriggerWebhooks.png](/files/fd283d07d80579b0fa276c6436de0157ce232062)

Set the trigger event to "Catch Raw Hook":

![04-CatchRawHook.png](/files/4c0f930f2b660579b21b6da151491fca80b7313a)

After clicking "Continue", go to the webhook and copy it to the clipboard via "Copy":

![05-CopyHook.png](/files/fd397b7e0d425d3cf81df1e5a866c8229115723e)

#### **Step 3: Store webhook in AI Assist**

Now enter the webhook in the sipgate app under "AI Assist Webhook" and select format "VCON":

![06-AIassistHook1.png](/files/0d768f89404a28a3d8e2b5dd53e2ab6a0c30791e)

![07-AIassistHook2.png.png](/files/ebd0c3c2ed2e069c0701e3a840181be1ce24a614)

Don't forget to save.

#### **Step 4: Test trigger**

To do this, first make a call via a channel in your account and wait for the summary of the conversation in the sipgate app.

![08-sipgateAppZusammenfassung.png](/files/b0cb9b7cf7a9785e38ea4e19aea2950e3d57a31f)

Back in Zapier, the trigger can be tested by clicking "Test trigger". The calls that were made are then listed as "records". The first call, for example, as "request A". Select a record and continue with "Continue with selected record".

![09-WeiterMitRecord.png](/files/cab342aaf41e985ee3d998c599acf59ec21f0ad1)

#### **Step 5: Extract data fields**

The transmitted data is available in raw format and can be converted into data fields in the next step using "low code":

![10-CodeAuswaehlen.png](/files/9b9075cc07cf456c41f66d91cbfb7786b0606c80)

In this example, Python is used, but JavaScript can also be selected.

![11-CodeDefinieren.png](/files/4e283bc48c129213a6807281e7ebe1d779c90750)

To find out the data structure, simply switch to "Test" and you can also store the data in the clipboard right away:

![13-RohdatenZwischenspeichern.png](/files/cc45b8008f0445815b831fd0a622de372e2334e4)

To make the whole thing clearer, the data from the clipboard can be pasted into an editor and formatted hierarchically here. An editor that understands JSON is helpful here to add color support to the whole thing.

![14-FelderVorbereiten.png](/files/5baa4c8f16ead11fa19f4eb176782a2a2e725b1d)

Once the desired fields have been identified, they can be filled in the code:

![15-BeispielCodePython.png](/files/03bdeede06662e9174bc7d085c4f921fd28bdb31)

In this example with Python, it is:

```python
# Let python understand JSON
import json
Parse the raw_body string into a dictionary
raw_body_dict = json.loads(input_data['raw_body'])
Now you can access the fields in Zapier
return {'uuid': raw_body_dict['uuid'],
'created_at': raw_body_dict['created_at'],
'updated_at': raw_body_dict['updated_at'],
'subject': raw_body_dict['subject'],
'agent': raw_body_dict['parties'][0]['tel'],
'customer': raw_body_dict['parties'][1]['tel'],
'start': raw_body_dict['dialog'][0]['start'],
'duration': raw_body_dict['dialog'][0]['duration'],
'analysis': raw_body_dict['analysis'][0]['body'],
'channel': raw_body_dict['tags']['channel_name'],
'direction': raw_body_dict['tags']['direction']
}
```

Using "Continue" and "Test step" on the following page, the filled fields are now visible:

![16-FelderMitDaten.png](/files/9f1f0d00c0b6556884718e76842b63022a05e6d4)

Publish the node and then move on to the next point.

#### **Step 6: Log call in HubSpot**

**Step 6.1: Find contact**

Since the goal is to record a call, the first thing to do is find the contact person in HubSpot. This can be implemented with a ready-made template.

So add another node:

![17-AddStep.png](/files/019a3db4459b43da6a939f8fe7e0f09547eaf203)

Select HubSpot:

In the next step, set the "Action Item" to "Find Contact" and then continue with "Continue".

![19-ActionEventFindContact.png](/files/80ba8d7ee32ebc18ef500c6624ff69dfcbb7ba06)

The call metadata contains the contact's phone number, which can be used as the search criterion. In this example, the "Property" "Contact information : Phone Number" and "Contact information : Calculated Phone Number in International Format" are accessed. A "+" is prefixed in the fields for the values.

![20-FindContactProps.png](/files/443184335ca590f1eed16c66a5d4b75f90f6f42b)

Continue with "Continue" to execute "Test step". If the contact is found, it looks like this:

![21-KontaktGefunden.png](/files/8867a5e2f44878dd97f83fd2fec83bbc57ea56f3)

**Step 6.2: Log call**

Now continue with creating the log. Add another node for this:

![22-4terKnoten.png](/files/cc1d02994503cbf35acdbc4e11950a6f6bdc89c1)

The required "Action event" in the HubSpot template "Create Engagement":

![23-CreateEngagement.png](/files/9d660e1d0090030888630ad911605a2e1b04b3c7)

Now set the details

![241-EngagementDetails.png](/files/e3075671c56ad91e230c4d8513702b94a6531850)

Determining the contact ID is somewhat hidden:

![242-EngagementDetails.png](/files/0eeeaddec7a67e8d1a167fa7b02b6d6aaea94b30)

![243-EngagementDetails.png](/files/61c311814d11be0b23603c6592c3b137c0011418)

Using "Continue" and "Test step" results in the following:

![25-EngagementTest.png](/files/fda404fe5ee793d23b8a72d66a75b1279546e4b1)

Finally, confirm using the "Publish" button. And this is how it then appears in Hub:

![26-Hubspot Kopie.png](/files/c609faf9a3e51044caa25c332a275db93cd689c8)

#### **Step 7: Maintain Google Sheet**

Afterwards, a table is to be supplemented with the call for later evaluation.

So create another node:

![27-5terKnoten.png](/files/39d25ff7a45ac5011818aadc1a0df4020c67a24d)

Here, Google Sheets is used as the template:

![28-TemplateGoogleSheet.png](/files/0d0d39dab5d4b5121c1b3eaa31a65dbccb7219d4)

The selected "Action event" is "Create Spreadsheet Row at Top". It inserts an empty row below the header row and then fills it with the data.

![29-ChooseEvent.png](/files/14f47d99add0b0b0b12056df540bf105dc8c67f5)

In the next step, location, file, and sheet are selected and the fields are mapped to the columns:

![30-gSheetMapping.png](/files/14b9d74b4d95399ae89267ed520ee4d6273220c0)

Then again click on "Continue" and "Test step":

![31-gSheetTest.png](/files/6f0b304c7b18442db739c631d6dce9175481f2c7)

Oh yes, don't forget to publish.

And this is what it looks like in the sheet:

![32-gSheet.png](/files/24c11af8cc660076caf1d69103241bdb26f69ff6)

#### **Step 8: Post message in Slack**

Now send a message in Slack and inform the colleagues about the conversation. It is possible that the caller has already been in contact with someone.

It starts again with a node:

![33-6terKnoten.png](/files/702fd24f788fc5875c528d65a986fe6f07dec94c)

Select Slack template:

![34-TemplateSlack.png](/files/1e64e178eb2af680f3cb074eea25555ea289d65b)

Then set "Send Channel Message" as the event and configure the Slack account:

![35-SlackChannelKto.png](/files/eb552226fe8c72da1800b170199c4f18c7fb2b17)

Now select the channel and prepare the message "Message":

![36-SlackDetails.png](/files/8bd9447d346f1020b241e7775c9428744a1b4812)

Then "Continue" and "Test step" as usual:

![37-SlackTest.png](/files/ef5060dc0c7806cd26160ad4e3add6c4110c693f)

And the result in Slack:

![38-Slack.png](/files/18a688415ecfcdd3066cef083cb36278b887dfbd)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.sipgate.de/cloud-telefonanlage/en/connections-and-integrations/integrationen-fur-die-sipgate-app/wie-nutze-ich-den-sipgate-ai-assist-in-verbindung-mit-hubspot-slack-google-sheet.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
