APIs & Integrations

deno
Member

How to know Webhook triggered from which account?

SOLVE

I created a workflow extension to help users send SMS when receiving the webhook. I would like to know are there any way to know the webhook trigger from which account?

0 Upvotes
1 Accepted solution
Willson
Solution
HubSpot Employee
HubSpot Employee

How to know Webhook triggered from which account?

SOLVE

Hi @deno 

 

In the request payload, you should see a new parameter that determines the source of this data. 

 

The specific parameter is the origin object included in the request payload. It includes the HubSpot portalId, extensionDefinitionId, and extensionDefinitionVersionId.

 

An example of this would look something along the lines of the following:

{
    "fields": {
        "appointment_date": "1536019200000",
        "appointment_notes": "30 minute appointment to go over the services contract",
        "appointment_title": "Appointment with Sky"
    },
    "object": {
        "objectId": 34,
        "objectType": "CONTACT"
    },
    "origin": {
        "extensionDefinitionId": 108,
        "extensionDefinitionVersionId": 5,
        "portalId": 99160967
    }
}

This is documented here in our Workflow Extensions Overview, look specifically for the section 'Handling Requests'. See here:
https://developers.hubspot.com/docs/methods/workflow-extensions/workflow-extensions-overview

 

I hope this helps!

Product Manager @ HubSpot

View solution in original post

2 Replies 2
Willson
Solution
HubSpot Employee
HubSpot Employee

How to know Webhook triggered from which account?

SOLVE

Hi @deno 

 

In the request payload, you should see a new parameter that determines the source of this data. 

 

The specific parameter is the origin object included in the request payload. It includes the HubSpot portalId, extensionDefinitionId, and extensionDefinitionVersionId.

 

An example of this would look something along the lines of the following:

{
    "fields": {
        "appointment_date": "1536019200000",
        "appointment_notes": "30 minute appointment to go over the services contract",
        "appointment_title": "Appointment with Sky"
    },
    "object": {
        "objectId": 34,
        "objectType": "CONTACT"
    },
    "origin": {
        "extensionDefinitionId": 108,
        "extensionDefinitionVersionId": 5,
        "portalId": 99160967
    }
}

This is documented here in our Workflow Extensions Overview, look specifically for the section 'Handling Requests'. See here:
https://developers.hubspot.com/docs/methods/workflow-extensions/workflow-extensions-overview

 

I hope this helps!

Product Manager @ HubSpot
deno
Member

How to know Webhook triggered from which account?

SOLVE

Hi @Willson 

 

Thank for your reply, the problem has solved now.