Use workflows to automate your marketing, sales, and service processes. Set enrollment criteria to enroll specific records or manually enroll your contacts. Add actions for your contacts, companies, deals, quotes, and tickets. You can also take action on associated records. For example, updating an enrolled contact’s associated company.
To test the workflows tool or the Workflows API, you can sign up for a developer portal. This will give you access to a sandboxed instance of the tool. Learn more about creating and using workflows.
Please Note:
- This API is currently in maintenance mode; there will not be any updates to the API and many features are not supported. For a list of supported actions, refer to the Supported Actions table.
- The Workflows API currently only supports contact-based workflows.
The Workflows API allows for full CRUD access to any workflow in a given portal. The most common use case for the API is to create a workflow for marketing automation. Then, enroll contacts in the workflow based on triggers in the external application.
You can also use webhooks in workflows to trigger notifications to external applications.. If polling the API becomes too much of a hassle while developing an integration with HubSpot, this is a great alternative.
For questions about using the Workflows API, connect with HubSpot's product team and other developers working in HubSpot on the HubSpot Developer's Forum.
When using this API, only certain actions are supported. Any actions not in the following list will be considered an UNSUPPORTED_ACTION.
- When using the Create a workflow API, if an UNSUPPORTED_ACTION is included, the workflow will not be created.
- When using the Get workflow API, if unsupported actions are included, the action type returned will be UNSUPPORTED_ACTION.
A list of supported actions can be found below:
Type | Definition |
---|---|
ADD_SUBTRACT_PROPERTY | Increase or decrease a value in a number type property for the enrolled contact. |
COPY_COMPANY_PROPERTY | Copy a property value from the enrolled contact's associated company to another property in the same contact. |
COPY_PROPERTY | Copy a property value of the enrolled contact to another property in the same record. |
CREATE_SFDC_TASK | Set a customized Salesforce task for the enrolled contact. |
DEAL | Create a new deal record. This deal will be associated with the enrolled contact. |
Send marketing emails that have been saved for automation to the enrolled contact. | |
LEAD_ASSIGNMENT | Assign the enrolled contacts to users equally within a selected team or between specified users. This action is only compatible with activated, paid users. |
NOTIFICATION | Send internal marketing emails that have been saved for automation to specified email addresses, or a contact property that stores an email address, including any custom properties. |
NOTIFICATION_STATION | Send an in-app notification to specified teams or users. |
SET_COMPANY_PROPERTY | Set a property value on the enrolled contact's associated company. |
SET_CONTACT_PROPERTY | Set a property value on the enrolled contact. |
SET_SALESFORCE_CAMPAIGN_MEMBERSHIP | Set a Salesforce campaign for the enrolled contact. |
SMS_NOTIFICATION | Send a text message to a HubSpot user or specified number. |
TASK | Create a new task. This task will be associated with the enrolled contact. |
TICKET | Create a new ticket record. This ticket will be associated with the enrolled contact. |
UPDATE_EMAIL_SUBSCRIPTION | Customize the subscription status of the enrolled contact. |
UPDATE_LIST | Add or remove contacts from a static list. |
WEBHOOK | Trigger a webhook to an external application. |
WORKFLOW_ENROLLMENT | Enroll the contact in another workflow. |