Where should the API call sit in a HubSpot workflow

Hello,

I’m working on a client project where the mobile app is mirrored in HubSpot. We’re using several workflows to move deals through stages and to create contacts when users register directly in the app.

I need to set up a workflow where a new user/deal enters HubSpot via an API call, and then the workflow handles the next actions (stage changes, emails, etc.).

My question is:

Should the API call be used before the workflow as the entry point (i.e., API creates/updates the deal/contact, and that triggers the workflow), or it should be after the trigger? i’m a bit confused when it should start

Thanks!

Hey @SRa79,

For this use case, one common approach is for the mobile app backend to create or update the HubSpot record through the CRM API, with that record change then meeting the workflow’s enrollment criteria

The Correct Flow → API First, Workflow Second

You should configure your Mobile App to send data to HubSpot via API immediately when the user registers. That action is what triggers the workflow.

Regards,

Moderator Note: this post was reviewed for relevancy and optimized for clarity on September 29, 2026. Thank you for your contributions to the HubSpot Community!

Hey @kosalaindrasiri Thank you! And the API is the custom code, correct? What my client should send to me from their backend? thank you so much for your help!! just to be sure So you are saying trigger come after the custom code? Thank you so much, it’s really helpful

Hi @SRa79

You can configure the workflow to trigger based on:
1. Object creation
a. Workflow starts when a Contact or Deal is created via the API.
b. No additional property is required if all new objects should enter the workflow.
2. Custom property as a trigger
a. Add a boolean or status property (e.g., integration_triggered) to Contacts or Deals.
b. Your API sets this property when creating/updating the object.
c. Workflow triggers only when this property is set, providing fine-grained control and preventing unintended workflow execution.

Once the workflow is triggered, it can handle all subsequent actions (stage changes, emails, tasks, etc.) as usual.

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.

Thanks!

Hi @SRa79 , good question, this part is confusing the first time you wire an app into HubSpot.

The API call from your client’s backend is one thing, and workflow custom code is another.

For your use case, the mobile app backend should talk directly to HubSpot’s CRM APIs to create or update the contact and deal when the user registers. For example, they would POST to the contacts and deals endpoints with the user’s email, app user ID, name, plan, and whatever properties you need for routing (CRM API | Contacts - HubSpot docs )

You can trigger the workflow from a CRM record creation/update, or, if it fits your integration, use HubSpot’s ‘When a webhook is received’ enrollment trigger to start a workflow from data sent by an external application. If your backend creates or updates the HubSpot record through the CRM API, configure the workflow enrollment criteria around that change, for example, record creation or a specific integration property. Alternatively, supported workflows can start when HubSpot receives a webhook from an external application (Create workflows )

Custom code actions run after a record has enrolled in the workflow and are useful when you need custom processing or API logic during the workflow. They’re separate from the API request or incoming webhook that can initiate the process. So your sequence is: mobile app backend sends data to HubSpot via API, HubSpot creates/updates the contact and deal, the workflow enrolls based on your trigger, then moves stages, sends emails, etc.

One small improvement is to add an integration flag property like source = mobile_app or integration_triggered = true so you can restrict the workflow to only those records. Do you want every new deal in that pipeline to enter this flow, or only app-driven ones?

When a mobile app and HubSpot both need to track the same lifecycle and revenue events, Stacksync keeps contacts and deals in two-way sync so your workflows always fire on clean, up-to-date data.

Moderator Note: this post was reviewed for relevancy and optimized for clarity on September 29, 2026. Thank you for your contributions to the HubSpot Community!