Trigger Workflow via API BulkUpdate

We have Freshsales integrated with our SaaS product via a custom marketplace app. Some changes in the CRM (status updates, new clients, etc) are pushed to our SaaS product. Our SaaS system will use the POST /api/sales_accounts/bulk_upsert to updated our Account objects with useful information from our system - “Last Interaction” " # of Users" etc.

I have a Workflow that is set to trigger on Update Account, looking for a an Account’s “Last Interaction” date. But it does not trigger. Would an Account BulkUpsert API call trigger that workflow? I have too many clients to use single Update Account calls all at once (API limit is 1000/hr, total)

How can I trigger that Workflow when I’m making updates with the API?

Does anyone have an idea here? I want Workflows to be triggered when I use the API to update an Account, but the API update does not trigger the Workflow.

Currently, the Freshsales BulkUpsert API call does not directly trigger workflows that are set to activate on account updates. This limitation arises because bulk operations often bypass individual record triggers to optimize performance.

To work around this and ensure your workflow triggers correctly, you might consider these approaches:

  1. Batch Processing: Divide the bulk update into smaller batches and use the Update Account API within the rate limit. This can allow workflows to trigger as expected.
  2. Webhooks: Use webhooks to monitor changes and trigger custom scripts or external workflows that can handle updates accordingly.
  3. Scheduled Check: Implement a scheduled task using Scheduled Events that runs periodically to check for updated accounts and manually triggers the workflow.

Thank you for the reply, Debjani,

Since Update Account will trigger the workflow, we’ll try to make that work.

@Debjani For your “option 3”, is there a way to manually trigger a Workflow? I’m asking about the object in Admin → Workflows. If we built a scheduled event, I do not see a way to call a Workflow via the api Freshsales | Refreshingly new CRM & Deal Management Software.

Hi @chimmelb-si

In Freshsales, workflow automations will trigger whenever the fields which are part of the conditions are updated and at that time the record satisfies all the workflow conditions.

For example, if you have a workflow with advanced conditions like (Country is India AND City is Chennai), then whenever any one of the two field values (Country or City) are updated (Eg. you update City to Chennai through API) and at that time if both fields satisfy the condition (Country was already India for that record) then the workflow automation will get triggered.

If you have a contact where these two conditions are already satisfied (already its Chennai, India) but you are performing an update to a different field like State for example then the workflow won’t trigger on this specific update action. It only triggers when any one of the fields which are part of the conditions are updated and if all required field conditions are satisfied when that update is performed.

Thanks