# Workflow custom action data identification

**URL:** <https://community.hubspot.com/t/workflow-custom-action-data-identification/80983>\
**Category:** APIs & Integrations\
**Tags:** workflows\
**Created:** [May 11, 2023, 6:40am UTC](https://community.hubspot.com/t/workflow-custom-action-data-identification/80983 "2023-05-11T06:40:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![frequeno](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@frequeno](https://community.hubspot.com/u/frequeno)\
**Post date:** [May 11, 2023, 6:40am UTC](https://community.hubspot.com/t/workflow-custom-action-data-identification/80983/1 "2023-05-11T06:40:02Z")

</div>

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:

```lia-code-sample
{
 "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

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [May 12, 2023, 4:06pm UTC](https://community.hubspot.com/t/workflow-custom-action-data-identification/80983/2 "2023-05-12T16:06:54Z")

</div>

Hey, @frequeno 👋 Did you get this resolved? To confirm, portalID = HubID.

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![frequeno](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@frequeno](https://community.hubspot.com/u/frequeno)\
**Post date:** [May 15, 2023, 1:24am UTC](https://community.hubspot.com/t/workflow-custom-action-data-identification/80983/3 "2023-05-15T01:24:38Z")

</div>

Thanks for confirming [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074) 👍. We will use that field to do our mapping.

Now I just need to understand how app settings can be used in a workflow action. Is there something you can comment on that? If we need text fields is that only doable through iframes? That’s what it seems by what’s described here [Create a settings page for a legacy public app - HubSpot docs](https://developers.hubspot.com/docs/api/create-an-app-settings-page)
