How to know Webhook triggered from which account?

SOLVE
New Contributor

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?

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
HubSpot Moderator

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!

Matthew Willson

HubSpot Developer Support
2 Replies 2
HubSpot Moderator

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!

Matthew Willson

HubSpot Developer Support
New Contributor

Hi @Willson 

 

Thank for your reply, the problem has solved now.