Skip to main content
This functionality is currently in beta. By participating in this beta, you agree to HubSpot's Developer Terms and Developer Beta Terms. Note that the functionality is still under active development and is subject to change based on testing and feedback.
After setting up your workflows, use the following APIs to create, cancel, and retrieve data on your workflows’ runs. The sections below provide a walkthrough of how to use these endpoints.

Scope requirements

The following additional app permissions are required to use the workflows API, based on the endpoints you’re using:
  • workflows.read: grants access to view details about workflows and workflow definitions. This scope is required for all endpoints.
  • workflows.write: grants access to create and modify workflows. This is required for all modification endpoints.
  • workflows.trigger: grants access to manually run a workflow.
In addition, to access sensitive data properties in a workflow, run records in a workflow that references sensitive data, or retrieve run and reporting data for workflows with sensitive data properties, you’ll need to authorize sensitive data scopes as detailed below:
  • crm.objects.contacts.sensitive.read: view enrollment and performance data for existing contact-based workflows.
  • crm.objects.companies.sensitive.read: view enrollment and performance data for existing company-based workflows.
  • crm.objects.deals.sensitive.read: view enrollment and performance data for existing deal-based workflows.
  • crm.objects.custom.sensitive.read: view enrollment and performance data for workflows based on custom objects in an account.

Create a new workflow run

To create a new workflow run, you’ll need to send the following requests:
  • First, retrieve run inputs using a GET request to /automation/workflows-runs/2027-03-beta/run-inputs/{flowId}.
  • After retrieving necessary inputs, send a POST request to /automation/workflows-runs/2027-03-beta/run.

Retrieve run inputs

To retrieve workflow run inputs, make a GET request to /automation/workflows-runs/2027-03-beta/run-inputs/{flowId}. Replace {flowId} with the ID of the workflow. The response lists each required input in the requiredInputs array. Each input includes the actionIds of the workflow actions that use it.
  • requiredInputs: the inputs required to start a run.
  • tokenString: the name of the input. Use this value as the tokenString when you start a run.
  • fieldTypeDefinition: the data type of the input. This includes name, type, label, description, and propertyFieldType.
  • actionIds: the IDs of any workflow actions that use this input.
  • triggerObjectTypeId: the object type ID for the workflow’s trigger.
Example retrieve run inputs response

Start a manual workflow run

To start a new manual workflow run, make a POST request to /automation/workflows-runs/2027-03-beta/run. In the body of your request, include the workflow’s ID and a value for each required input. You can also include the CRM record that the run applies to. The workflow must be published (turned on) to run. If the request is successful, a 201 status code and the ID of the new run will be returned. In the following example, the request will run the workflow with the flowId of 001001. The new run will have a runId of 12121.

Retrieve a workflow run’s status

To check on the status of your workflow run, make a GET request to /automation/workflows-runs/2027-03-beta/run/{runId}. Replace {runId} with the ID returned by the start request. The enrollmentState will reflect the status of the run:
  • RUNNING: the run is in progress.
  • CANCELED: the run was canceled. Learn how to cancel a workflow run.
  • COMPLETED: the run finished.
  • FAILED: the run failed.
Example workflow run status response

Cancel a workflow run

To cancel a run, make a POST request to /automation/workflows-runs/2027-03-beta/run/unenroll. Identify the run by its workflow ID and CRM record. If the cancellation is successful, the response will return a 204 status code and no body.

Retrieve runs for a specific workflow

To check a workflow’s runs over a specified period of time, make a POST request to /automation/workflows-reporting/2027-03-beta/performance/query. Include the workflow ID, a start date, an end date, and a frequency. The response data will include the following:
  • startDate: the start of the requested range.
  • endDate: the end of the requested range.
  • frequency: the frequency that the results are grouped by.
  • counters: the performance data for each period that has data.
  • date: the start date of the period.
  • runsTotal: the total number of runs in the period.
  • currentlyRunningTotal: the number of runs that are still in progress.
  • completedTotal: the number of completed runs.
  • canceledEarlyTotal: the number of runs that were canceled before they finished.
  • failedTotal: the number of failed runs.
  • uniqueCrmObjectRunsTotal: the number of unique CRM records that had a run in the period.
In the following example, the request will retrieve the run data for the workflow with a flowId of 001001, from January 1st, 2026, to February 1st, 2026.

Retrieve all current workflow runs for a CRM record

To find all workflows that a CRM record is currently running in, make a GET request to /automation/workflows-reporting/2027-03-beta/current-runs/{objectType}/{objectId}. Replace {objectType} with an object type and {objectId} with the ID of the record. If the record has no current runs, the response has a 200 status code and an empty results array. The response will include:
  • results: current runs for the CRM record.
  • flowId: the ID of the workflow.
  • runId: the ID of the run.
Example retrieve workflow runs response
Last modified on November 30, 2026