We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Dec 23, 2020 5:09 PM
Is there a way to create a workflow with manual trigger through API call. I need to pass custom JSON object and based on the values choose which logic to follow. I already tried to look at Workflow API, Forms API. I wasn't able to find the solution, which suites my needs, I hope that it exists. The json object have two levels of nesting and can have an array as a value.
I have a usecase: I need a way to trigger business logic in the HubSpot from external system through the API call. This workflow should be able to trigger another workflow and based on the result and passed request object select required email template, substitute values and send an email.
To send email I can use Transactional Email API - Single-send API, but in such case I need to store in my application IDs of all email templates which I need to trigger. And I'm loosing possibility to trigger other workflows and make desisions based on the result. So I'm trying to find acceptable solution for my case.
Solved! Go to Solution.
Dec 30, 2020 9:22 AM
Hey @AndriiMelnyk ,
To trigger another workflow from one workflow, you would need to use the type "WORKFLOW_ENROLLMENT" in the actions array and provide workflow ID and name as well.
I'm not really sure if you can select the required email template using passed request object but to simplify the process, you can create a test workflow manually based on your requirements and then get the workflow using API to check what actions should be used in your external system.
Hope it useful !
Thanks
Himanshu
Dec 30, 2020 9:22 AM
Hey @AndriiMelnyk ,
To trigger another workflow from one workflow, you would need to use the type "WORKFLOW_ENROLLMENT" in the actions array and provide workflow ID and name as well.
I'm not really sure if you can select the required email template using passed request object but to simplify the process, you can create a test workflow manually based on your requirements and then get the workflow using API to check what actions should be used in your external system.
Hope it useful !
Thanks
Himanshu
Dec 28, 2020 4:14 PM
Welcome to the Community!
Wondering if @himanshurauthan or @Gonzalo have thoughts on this setup.
(happy holidays!)
![]() | Make sure to subscribe to our YouTube channel where you can find the HubSpot Community Developer Show |