You can use the Prebuilt Action Templates from your HubSpot integration to auto-create dialog tasks and test them using the Talk to Bot option.
Steps to create a dialog task using HubSpot action templates:
- Go to Build > Conversation Skills, and then click the Dialog Tasks.
- Click Create a Dialog Task.
- On the Dialog Task pop-up, under the Integration, select the HubSpot option to view the action templates.
Note: If you have not configured any integration for your virtual assistant, you will see the Explore Integrations option. Once you click this option, you will be redirected to the Actions page to configure an integration for your VA. For more information, see Actions Overview.
HubSpot ActionsÂ
The following HubSpot actions are supported in this release:
Supported Tasks | Description | Method |
Create a Deal | Creates a new deal in the system. | POST |
Get Deal by Id | Retrieves a deal details | GET |
Update a Deal | Updates the deal details. | PATCH |
List all Deals | Retrieves all deals from the system. | GET |
Search Deal by Keyword | Searches all deals that match with the keyword. | GET |
Delete Deal | Deletes a deal. | DELETEÂ |
Create a Contact | Creates a request in the system. | POST |
Get Contact by Id | Retrieve a contact details | GET |
List All Contacts | Retrieves all contacts from the system | Get |
Update a Contact | Updates the contact details | PATCH |
Search Contact by Keyword | Search all contacts that match with the keyword | GET |
Delete a Contact | Deletes a contact | GET |
Create a Deal
Steps to create a new deal in HubSpot:
- Refer to the Install the HubSpot Action Templates section for installing this action template.
- The Create a Deal dialog task is added with the following components:
- createDeal –Â A user intent to create a deal.
- dealName and dealStage – Entity nodes for gathering the required deal details.
- createDealService – A bot action service to create a deal in an external integration. Click the Plus icon to expand to view the createDealService bot action component properties.
- In the Component Properties window, click the Edit Request link to edit the request parameters as shown below:
Sample Request body:
{
"properties": {
"dealname": "Custom data integrations",
"dealstage": "presentationscheduled",
"pipeline": "default"
}
}Sample Response:
{
"id": "10146264661",
"properties": {
"createdate": "2022-09-11T10:06:55.570Z",
"days_to_close": "0",
"dealname": "Integrations",
"dealstage": "presentationscheduled",
"hs_closed_amount": "0",
"hs_closed_amount_in_home_currency": "0",
"hs_createdate": "2022-09-11T10:06:55.570Z",
"hs_deal_stage_probability_shadow": "0.59999999999999997779553950749686919152736663818359375",
"hs_is_closed": "false",
"hs_is_closed_won": "false",
"hs_is_deal_split": "false",
"hs_lastmodifieddate": "2022-09-11T10:06:55.570Z",
"hs_object_id": "10146264661",
"hs_projected_amount": "0",
"hs_projected_amount_in_home_currency": "0",
"pipeline": "default"
},
"createdAt": "2022-09-11T10:06:55.570Z",
"updatedAt": "2022-09-11T10:06:55.570Z",
"archived": false
}
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to create a deal as shown below:
- The new deal is created in HubSpot.
- Click the View Deal button to view the deal details in HubSpot.
Get a Deal by ID
Steps to find a deal by Id in HubSpot:
- Refer to the Install the HubSpot Action Templates section for installing this action template.
- The Get Deal by Id dialog task is added with the following components:
- getDeal by Id : A user intent to get a deal by Id.
- dealID Â – Entity nodes for entering the deal Id.
- getDealService – A bot action service to create a deal in an external integration. Click the Plus icon to expand to view the getDealService bot action component properties.
- In the Component Properties window, click the +Add Response button to add one or more responses.
Sample Response
{
"id": "10099894869",
"properties": {
"amount": null,
"closedate": null,
"createdate": "2022-09-07T13:52:04.184Z",
"dealname": "Nike deal",
"dealstage": "appointmentscheduled",
"hs_lastmodifieddate": "2022-09-10T14:13:05.712Z",
"hs_object_id": "10099894869",
"pipeline": "default"
},
"createdAt": "2022-09-07T13:52:04.184Z",
"updatedAt": "2022-09-10T14:13:05.712Z",
"archived": false
},
"archived": false
}
- getAccoutService – A bot action service to get account details in an external integration. Click the Plus icon to expand to view the getAccountService bot action component properties.
- getDealMessage – A message node with script to display responses for various scenarios.Â
List All Deals
Steps to view all deals in HubSpot:
- Refer to the Install the HubSpot Action Templates section for installing this action template.
- The List All Deals dialog task is added for HubSpot with the following components:
- List All Deals: A user intent to list all deals.
- listAllDealsService – A bot action script to view all deals in an external integration. Click the Plus icon to expand to view the listAllDealsService bot action component properties.
Scroll down and click +Add Response to add one or more response.
Sample Response
{
"total": 7,
"results": [
{
"id": "10274255383",
"properties": {
"amount": null,
"closedate": null,
"createdate": "2022-09-22T07:23:17.500Z",
"dealname": "Adidas deal",
"dealstage": "qualifiedtobuy",
"hs_lastmodifieddate": "2022-09-22T07:23:18.603Z",
"hs_object_id": "10274255383",
"pipeline": "default"
},
"createdAt": "2022-09-22T07:23:17.500Z",
"updatedAt": "2022-09-22T07:23:18.603Z",
"archived": false
},
{
"id": "10168816194",
"properties": {
"amount": null,
"closedate": null,
"createdate": "2022-09-13T06:44:20.931Z",
"dealname": "kora",
"dealstage": "decisionmakerboughtin",
"hs_lastmodifieddate": "2022-09-21T17:48:52.859Z",
"hs_object_id": "10168816194",
"pipeline": "default"
},
"createdAt": "2022-09-13T06:44:20.931Z",
"updatedAt": "2022-09-21T17:48:52.859Z",
"archived": false
},
{
"id": "10168663436",
"properties": {
"amount": null,
"closedate": null,
"createdate": "2022-09-13T05:55:53.195Z",
"dealname": "Assist",
"dealstage": "decisionmakerboughtin",
"hs_lastmodifieddate": "2022-09-13T05:55:54.257Z",
"hs_object_id": "10168663436",
"pipeline": "default"
},
"createdAt": "2022-09-13T05:55:53.195Z",
"updatedAt": "2022-09-13T05:55:54.257Z",
"archived": false
},
{
"id": "10168850185",
"properties": {
"amount": null,
"closedate": null,
"createdate": "2022-09-13T05:54:00.891Z",
"dealname": "Smart deal",
"dealstage": "qualifiedtobuy",
"hs_lastmodifieddate": "2022-09-13T05:54:02.233Z",
"hs_object_id": "10168850185",
"pipeline": "default"
},
"createdAt": "2022-09-13T05:54:00.891Z",
"updatedAt": "2022-09-13T05:54:02.233Z",
"archived": false
},
{
"id": "10146264661",
"properties": {
"amount": null,
"closedate": null,
"createdate": "2022-09-11T10:06:55.570Z",
"dealname": "Integrations",
"dealstage": "presentationscheduled",
"hs_lastmodifieddate": "2022-09-11T10:06:56.238Z",
"hs_object_id": "10146264661",
"pipeline": "default"
},
"createdAt": "2022-09-11T10:06:55.570Z",
"updatedAt": "2022-09-11T10:06:56.238Z",
"archived": false
},
{
"id": "10146382146",
"properties": {
"amount": null,
"closedate": null,
"createdate": "2022-09-11T10:05:52.560Z",
"dealname": "Custom data integrations",
"dealstage": "presentationscheduled",
"hs_lastmodifieddate": "2022-09-11T10:05:54.028Z",
"hs_object_id": "10146382146",
"pipeline": "default"
},
"createdAt": "2022-09-11T10:05:52.560Z",
"updatedAt": "2022-09-11T10:05:54.028Z",
"archived": false
},
{
"id": "10096681328",
"properties": {
"amount": "20",
"closedate": "2022-09-30T07:42:47.238Z",
"createdate": "2022-09-07T07:46:11.328Z",
"dealname": "Basic deal",
"dealstage": "presentationscheduled",
"hs_lastmodifieddate": "2022-09-13T13:48:43.097Z",
"hs_object_id": "10096681328",
"pipeline": "default"
},
"createdAt": "2022-09-07T07:46:11.328Z",
"updatedAt": "2022-09-13T13:48:43.097Z",
"archived": false
}
] }- getAccoutService – A bot action service to get account details in an external integration. Click the Plus icon to expand to view the getAccountService bot action component properties.
- listAllDealsMessage – A message node with script to display responses for various scenarios.Â
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to view all deals.
Update a Deal
Steps to update an existing deal in HubSpot:
- Refer to the Install the HubSpot Action Templates section for installing this action template.
- The Update a Deal dialog task is added with the following components:
- Update a Deal: A user intent to update a deal.
- dealId, dealUpdate, dealName, and dealStage – Entity nodes for updating the deal details.
- updateDealScript – A bot action script to update a deal in an external integration. Click the Plus icon to expand to view the updateDealScript bot action component properties.
- updateDealService – A bot action service to update a deal in an external integration. Click the Plus icon to expand to view the updateDealService bot action component properties.
Sample Request Body
{
"properties": {
"dealname": "Adidas Deal",
"dealstage": "closedwon"
}
}
To add one or more responses scroll down and click the +Add Response button.
Sample Response
{
"id": "10123889765",
"properties": {
"createdate": "2022-09-09T06:45:26.228Z",
"days_to_close": "0",
"dealname": "Adidas Deal",
"dealstage": "closedwon",
"hs_closed_amount": "",
"hs_closed_amount_in_home_currency": "",
"hs_deal_stage_probability": "0.8000000000000000444089209850062616169452667236328125",
"hs_deal_stage_probability_shadow": "1",
"hs_is_closed": "true",
"hs_is_closed_won": "true",
"hs_lastmodifieddate": "2022-09-11T10:54:30.961Z",
"hs_object_id": "10123889765",
"hs_projected_amount_in_home_currency": "",
"pipeline": "default"
},
"createdAt": "2022-09-09T06:45:26.228Z",
"updatedAt": "2022-09-11T10:54:30.961Z",
"archived": false
}
- getAccoutService – A bot action service to get account details in an external integration. Click the Plus icon to expand to view the getAccountService bot action component properties.
- getDealService – A bot action service to get deal details in an external integration. Click the Plus icon to expand to view the getDealService bot action component properties.
- updateDealMessage – A message node with script to display responses for various scenarios.Â
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task
- Follow the prompts in the VA console to update a deal as shown below:
- Enter all deal details to update when prompted by the VA. The existing deal is updated in HubSpot as shown below:
- Click the View Deal button to view the deal details in HubSpot.
Search Deal by Keyword
Steps to search a deal using keywords in HubSpot:
- Refer to the Install the HubSpot Action Templates section for installing this action template.
- The Search Deal by Keyword dialog task is added for the Hubspot with the following components:
- Search Deal: A user intent to search a deal.
- Keyword – Entity nodes for entering the keywords for the searching deals.
- searchDealService – A bot action script to update a deal in an external integration. Click the Plus icon to expand to view the searchDealService bot action component properties.
Sample Request Body
{
"sorts": [
{
"propertyName": "createdate",
"direction": "DESCENDING"
}
],
"query":"abac"
}
Sample Response
{
"total": 3,
"results": [
{
"id": "10274255383",
"properties": {
"amount": null,
"closedate": null,
"createdate": "2022-09-22T07:23:17.500Z",
"dealname": "Adidas deal",
"dealstage": "qualifiedtobuy",
"hs_lastmodifieddate": "2022-09-22T07:23:18.603Z",
"hs_object_id": "10274255383",
"pipeline": "default"
},
"createdAt": "2022-09-22T07:23:17.500Z",
"updatedAt": "2022-09-22T07:23:18.603Z",
"archived": false
},
{
"id": "10168850185",
"properties": {
"amount": null,
"closedate": null,
"createdate": "2022-09-13T05:54:00.891Z",
"dealname": "Smart deal",
"dealstage": "qualifiedtobuy",
"hs_lastmodifieddate": "2022-09-13T05:54:02.233Z",
"hs_object_id": "10168850185",
"pipeline": "default"
},
"createdAt": "2022-09-13T05:54:00.891Z",
"updatedAt": "2022-09-13T05:54:02.233Z",
"archived": false
},
{
"id": "10096681328",
"properties": {
"amount": "20",
"closedate": "2022-09-30T07:42:47.238Z",
"createdate": "2022-09-07T07:46:11.328Z",
"dealname": "Basic deal",
"dealstage": "presentationscheduled",
"hs_lastmodifieddate": "2022-09-13T13:48:43.097Z",
"hs_object_id": "10096681328",
"pipeline": "default"
},
"createdAt": "2022-09-07T07:46:11.328Z",
"updatedAt": "2022-09-13T13:48:43.097Z",
"archived": false
}
] }
- getAccoutService – A bot action service to get account details in an external integration. Click the Plus icon to expand to view the getAccountService bot action component properties.
- searchDealMessage – A message node with script to display responses for various scenarios.Â
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to view all deals as shown below:
Delete a Deal
Steps to delete a deal in HubSpot:
- Refer to the Install the HubSpot Action Templates section for installing this action template.
- The Delete Deal dialog task is added for HubSpot with the following components:
- Delete Deal: A user intent to delete a deal.
- DealId – Entity nodes for entering the deal ID.
- deleteDealService – A bot action script to delete a deal in an external integration. Click the Plus icon to expand to view the deleteContactService bot action component properties.
- getAccoutService – A bot action service to get account details in an external integration. Click the Plus icon to expand to view the getAccountService bot action component properties.
- deleteDealMessage – A message node with script to display responses for various scenarios.Â
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to create a deal as shown below:
Note: If you enter an incorrect ID, the 404 – No Record Found error message is displayed.
Create a Contact
Steps to create a contact in HubSpot:
- Refer to the Install the HubSpot Action Templates section for installing this action template.
- The Create a Deal dialog task is added with the following components:
- createContact : A user intent to create a deal.
- Email, firstName, lastName, and phone– Entity nodes for gathering the required contact details.
- createContactService – A bot action service to create a contact in an external integration. Click the Plus icon to expand to view the createContactService bot action component properties.
- In the Component Properties window, click the Edit Request link to edit the request parameters as shown below:
Sample Request Body
{
"properties": {
"email": "harry@abac.com",
"firstname":"Harry",
"lastname":"Anthony",
"phone": "(877) 829-06966777"
}
To add one or more responses, scroll down and click the +Add Response button:
Sample Response:
{
"id": "1201",
"properties": {
"createdate": "2022-09-21T05:54:29.872Z",
"email": "harry.anthony@abac.com",
"firstname": "harry",
"hs_all_contact_vids": "1201",
"hs_email_domain": "abac.com",
"hs_is_contact": "true",
"hs_is_unworked": "true",
"hs_lifecyclestage_lead_date": "2022-09-21T05:54:29.872Z",
"hs_object_id": "1201",
"hs_pipeline": "contacts-lifecycle-pipeline",
"hs_searchable_calculated_phone_number": "87782906966777",
"lastmodifieddate": "2022-09-21T05:54:29.872Z",
"lastname": "anthony",
"lifecyclestage": "lead",
"phone": "(877) 829-06966777"
},
"createdAt": "2022-09-21T05:54:29.872Z",
"updatedAt": "2022-09-21T05:54:29.872Z",
"archived": false
}
- getAccoutService – A bot action service to get account details in an external integration. Click the Plus icon to expand to view the getAccountService bot action component properties.
- createContactMessage – A message node with script to display responses for various scenarios.Â
- Refer the step # 3 to train and talk to bot and learn how to view the new contact.
Get a Contact by ID
Steps to find a contact by ID in HubSpot:
- Refer to the Install the HubSpot Action Templates section for installing this action template.
- The Get Contact by Id dialog task is added with the following components:
- getContact by Id : A user intent to get a contact by ID.
- contactID Â – Entity nodes for entering the contact ID.
- getContactService – A bot action service to create a deal in an external integration. Click the Plus icon to expand to view the getDealService bot action component properties.
- In the Component Properties window, click the Edit Request link to edit the request parameters as shown below:
To add one or more responses, scroll down and click the +Add Response button.
Sample Response{
"id": "1201",
"properties": {
"createdate": "2022-09-21T05:54:29.872Z",
"email": "harry.anthony@abac.com",
"firstname": "harry",
"hs_object_id": "1201",
"lastmodifieddate": "2022-09-21T05:54:33.826Z",
"lastname": "anthony"
},
"createdAt": "2022-09-21T05:54:29.872Z",
"updatedAt": "2022-09-21T05:54:33.826Z",
"archived": false
}
- getAccoutService – A bot action service to get account details in an external integration. Click the Plus icon to expand to view the getAccountService bot action component properties.
- getContactMessage – A message node with script to display responses for various scenarios.Â
- Refer the step # 3 to train and talk to bot section and learn how to find the contact.  Â
List All Contacts
Steps to view all contacts in HubSpot:
- Refer to the Install the HubSpot Action Templates section for installing this action template.
- The List All Contacts dialog task is added for HubSpot with the following components:
- List All Contacts: A user intent to list all contacts.
- listAllContactsService – A bot action script to view all contacts in an external integration. Click the Plus icon to expand to view the listAllContactsService bot action component properties. Â
Sample Request Body
{
"sorts": [
{
"propertyName": "createdate",
"direction": "DESCENDING"
}
] }
To add one or more responses, scroll down and click the +Add Response button.
Sample Response
{
"total": 6,
"results": [
{
"id": "1401",
"properties": {
"createdate": "2022-09-21T08:10:09.101Z",
"email": "getkgw@zomato.com",
"firstname": "John",
"hs_object_id": "1401",
"lastmodifieddate": "2022-09-21T13:39:48.442Z",
"lastname": "Doe"
},
"createdAt": "2022-09-21T08:10:09.101Z",
"updatedAt": "2022-09-21T13:39:48.442Z",
"archived": false
},
{
"id": "1301",
"properties": {
"createdate": "2022-09-21T07:55:53.923Z",
"email": "iugf@uber.com",
"firstname": "Kevin",
"hs_object_id": "1301",
"lastmodifieddate": "2022-09-21T16:36:41.185Z",
"lastname": "Smith"
},
"createdAt": "2022-09-21T07:55:53.923Z",
"updatedAt": "2022-09-21T16:36:41.185Z",
"archived": false
},
{
"id": "1201",
"properties": {
"createdate": "2022-09-21T05:54:29.872Z",
"email": "harry.anthony@kore.com",
"firstname": "Harry",
"hs_object_id": "1201",
"lastmodifieddate": "2022-09-21T14:10:34.717Z",
"lastname": "Anthony"
},
"createdAt": "2022-09-21T05:54:29.872Z",
"updatedAt": "2022-09-21T14:10:34.717Z",
"archived": false
},
{
"id": "501",
"properties": {
"createdate": "2022-09-16T09:50:44.195Z",
"email": "rtyui@microsoft.com",
"firstname": "Ray",
"hs_object_id": "501",
"lastmodifieddate": "2022-09-20T06:14:59.539Z",
"lastname": "John"
},
"createdAt": "2022-09-16T09:50:44.195Z",
"updatedAt": "2022-09-20T06:14:59.539Z",
"archived": false
},
{
"id": "451",
"properties": {
"createdate": "2022-09-16T09:42:19.196Z",
"email": "jnbg@amazon.com",
"firstname": "Jack",
"hs_object_id": "451",
"lastmodifieddate": "2022-09-16T09:42:37.438Z",
"lastname": "James"
},
"createdAt": "2022-09-16T09:42:19.196Z",
"updatedAt": "2022-09-16T09:42:37.438Z",
"archived": false
},
{
"id": "301",
"properties": {
"createdate": "2022-09-13T11:27:52.943Z",
"email": "eurfh@meta.com",
"firstname": "Pavan",
"hs_object_id": "301",
"lastmodifieddate": "2022-09-15T07:51:34.486Z",
"lastname": "Mamidi"
},
"createdAt": "2022-09-13T11:27:52.943Z",
"updatedAt": "2022-09-15T07:51:34.486Z",
"archived": false
}
] }
- getAccoutService – A bot action service to get account details in an external integration. Click the Plus icon to expand to view the getAccountService bot action component properties.
- listAllContactsMessage – A message node with script to display responses for various scenarios.Â
- Refer the step # 3 to train and talk to bot section and learn how to view all contacts.  Â
Update a Contact
Steps to update an existing contact in HubSpot:
- Refer to the Install the HubSpot Action Templates section for installing this action template.
- The Update a Contact dialog task is added with the following components:
- UpdateContact: A user intent to update a contact.
- contactId, contactUpdate, email, firstName, lastName, and phone – Entity nodes for updating the contact details.
- updateContactScript – A bot action script to update a deal in an external integration. Click the Plus icon to expand to view the updateContactScript bot action component properties.
- updateContactService – A bot action service to update a deal in an external integration. Click the Plus icon to expand to view the updateDealService bot action component properties.
Sample Request Body
{
{
"properties": {
"email":"harry.anthony@abac.com"
}
}
To add one or more responses scroll down and click the +Add Response button:
Sample Response
{
"id": "1201",
"properties": {
"email": "harry.anthony@abac.com",
"hs_email_domain": "abac.com",
"lastmodifieddate": "2022-09-21T06:18:56.655Z"
},
"createdAt": "2022-09-21T05:54:29.872Z",
"updatedAt": "2022-09-21T06:18:56.655Z",
"archived": false
}
- getAccoutService – A bot action service to get account details in an external integration. Click the Plus icon to expand to view the getAccountService bot action component properties.
- getContactService – A bot action service to get deal details in an external integration. Click the Plus icon to expand to view the getContactService bot action component properties.
- updateContactMessage – A message node with script to display responses for various scenarios.Â
- Refer the step # 3 to train and talk to bot section and learn how to update the contact.  Â
Search Contact by Keyword
Steps to search a contact using keywords in HubSpot:
- Refer to the Install the HubSpot Action Templates section for installing this action template.
- The Search Contact by Keyword dialog task is added for the Hubspot with the following components:
https://kore-wordpress.s3.us-east-2.amazonaws.com/developer.kore.ai/v10-2/wp-content/uploads/sites/45/20230128100016/search_contact_keyword.png- Search Contact: A user intent to search a contact.
- Keyword – Entity nodes for entering the keywords for the searching contacts.
- searchContactService – A bot action script to update a deal in an external integration. Click the Plus icon to expand to view the searchContactService bot action component properties.
Sample Request Body
{
"sorts": [
{
"propertyName": "createdate",
"direction": "DESCENDING"
}
],
"query":"abac"
}
Sample Response
{
"total": 1,
"results": [
{
"id": "1201",
"properties": {
"createdate": "2022-09-21T05:54:29.872Z",
"email": "workassit123@kore.com",
"firstname": "Work",
"hs_object_id": "1201",
"lastmodifieddate": "2022-09-21T14:10:34.717Z",
"lastname": "Assist"
},
"createdAt": "2022-09-21T05:54:29.872Z",
"updatedAt": "2022-09-21T14:10:34.717Z",
"archived": false
}
] }
- getAccoutService – A bot action service to get account details in an external integration. Click the Plus icon to expand to view the getAccountService bot action component properties.
- searchContactMessage – A message node with script to display responses for various scenarios.Â
- Refer the step # 3 to train and talk to bot section and learn how to search the contact with keyword.  Â
Delete a Contact
Steps to delete a contact in HubSpot:
- Refer to the Install the HubSpot Action Templates section for installing this action template.
- The Delete Contact dialog task is added for HubSpot with the following components:
- Delete Contact: A user intent to delete a contact.
- ContactId – Entity nodes for entering the Contact ID.
- deleteContactService – A bot action script to delete a deal in an external integration. Click the Plus icon to expand to view the deleteContactService bot action component properties. Â Â Â
- getAccoutService – A bot action service to get account details in an external integration. Click the Plus icon to expand to view the getAccountService bot action component properties.
- deleteContactMessage – A message node with script to display responses for various scenarios.
- Refer the step # 3 to train and talk to bot section and learn how to delete the contact.
Note: If you enter an incorrect ID, the 404 – No Record Found error message is displayed.