Hi and thanks for any help you could provide.
I am fairly new to HubSpot so I do apologise if my questions are too basic or have been answered before.
I am trying to implement a custom workflow action to be included in regular workflows when a particular field is known.
I have created a test app, done the OAuth handshake and I am able to obtain information about the user and account id from hubspot at that point in time. Meaning I have established a mapping between the app account and hubspot account (app_acc_id and hub_id - from token metadata).
After creating a workflow custom action I am able to use it in a workflow as expected, but the data sent by HubSpot to the app has no information that I can effectively use to identify the account origin.
- What would be the recommended way of achieving this?
- Does the app need to create a record/property of some sort and request it as part of the workflow action data?
- Can an app setting be used instead?
Ideally we would like zero manual processing from the user, ie the user should only need to install the app.
Sample payload received:
{
"callbackId": "ap-39703706-575141485615-1-0",
"origin": {
"portalId": 39703706,
"actionDefinitionId": 35783959,
"actionDefinitionVersion": 4,
"actionExecutionIndexIdentifier": {
"enrollmentId": 575141485615,
"actionExecutionIndex": 0
},
"extensionDefinitionId": 35783959,
"extensionDefinitionVersionId": 4
},
"context": {
"source": "WORKFLOWS",
"workflowId": 377557936
},
"object": {
"objectId": 51,
"objectType": "CONTACT"
},
"fields": {
"platform": "Sample Platform",
"cid": "Halligan (Sample Contact)"
},
"inputFields": {
"platform": "Sample Platform",
"cid": "Halligan (Sample Contact)"
}
}
Update: It seems as if the “portalId” is what I need as it seems to have the same value as the `hub_id` that I got earlier. Please confirm if that is what I need to use? (if moderators remove the spam mark on my message). Thanks