APIs & Integrations

PKostetskiy
Member

How to identify the user that runs the workflow?

I have made a workflow with custom actions which interacts with our service. The payload that is sent to "actionUrl" contains the "portalId" property.

{
    "callbackId": "ap-25785707-59723581409-1-0",
    "origin": {
        "portalId": 25785707,
        "actionDefinitionId": 24070804,
        "actionDefinitionVersion": 5,
        "extensionDefinitionId": 24070804,
        "extensionDefinitionVersionId": 5
    },
    "context": {
        "source": "WORKFLOWS",
        "workflowId": 408555000
    },
....
}

Problem is that my account has several users and there's no info about current user that runs this workflow. All of them have the same "portalId"

Is there a way to add "userEmail" property to paylod as it is done for CRM-Cards? 

Or any other way to obtain the email of user that runs the workflow?

Thank you for any help!

0 Upvotes
2 Replies 2
Jaycee_Lewis
Community Manager
Community Manager

How to identify the user that runs the workflow?

Hey, @PKostetskiy 👋 Thanks for reaching out! Can you say more about what you mean by obtain the email of user that runs the workflow? I ask because workflows typically enroll either by meeting the enrollment condition or if a user is Manually Enrolling them inside the Workflow, either individually or from a list.

 

Having additional information helps the community to understand the root cause and determine whether what you are asking falls under possible or not possible.

 

Thank you! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
PKostetskiy
Member

How to identify the user that runs the workflow?

Hello, @Jaycee_Lewis! Thank you for reply!

I mean exactly "Manually Enrollig" case.  Our workflow uses Custom Action which makes calls to our service/app.
If a user (or owner) enrolls manually a bunch of contacts in workflow -  how then our service can know who has enrolled those contacts? I see only "portalId" in payload. So if an account has several users with different emails - our app/sevice could not differ them. 
Sorry for not clear explanation 🙂

Thank you for any help!

0 Upvotes