Angelica Angelis
Angelica Angelis
  • Updated

BEFORE GETTING STARTED

Ensure the HubSpot extension is already enabled and your Oneflow account is connected to HubSpot. See Getting started with HubSpot to learn more.

Workflows allow you to run a range of custom actions from app integrations whenever certain events occur in HubSpot (triggers). Oneflow × HubSpot supports a range of Oneflow actions to power your CRM workflows.

Prerequisites

Enable workflows in Oneflow

To use Oneflow actions in HubSpot, you’ll first need to ensure the Workflows extension in Oneflow is enabled in addition to the HubSpot extension.

  1. Login to Oneflow as an administrator, then navigate to the Marketplace.
  2. Select HubSpot Workflows under Sales and CRM and click Enable.

Create a workflow

INFORMATION

  • This feature is enabled by default for Oneflow’s enterprise customers. However, it can be enabled on-request for other customers.
  • To learn more about creating workflows, refer to HubSpot’s documentation.
  • To learn more on how using Oneflow actions in HubSpot workflows can streamline your CRM operations, see Workflows: Use cases.
  1. In HubSpot, go to Workflows, then click Create workflow > From scratch. Alternatively, select From Template, then proceed to step 6 to add Oneflow actions to the workflow.
  1. Select the HubSpot object that this workflow is based on (e.g., Contact-based, Company-based, Deal-based, etc.).
  2. Select Blank workflow under “How do you want this workflow to start?”.
  3. Click Next, provide a name for your workflow, then click Next again.
  4. Click Set up triggers and configure a HubSpot trigger of your choice.
    Select a trigger type (e.g., when an event occurs, when filter criteria are met, or based on a schedule), then configure the trigger to match your preferences. For instance, when the customer submits a form on a website.
  5. Click the + button to add an action that will run whenever the trigger criteria are met.
  6. Under Connected apps, select Oneflow. Select an action from the ones currently available.
    1. Create a contract
    2. Delete a contract
    3. Send a contract
    4. Get contract details
    5. Add participants to a contract
    6. Get contract list
    7. Download contract
    8. Fetch updates from contract
    9. Push updates to contract
  1. The configuration of the fields will be different depending on the Oneflow action you selected. Refer to the sections in this guide to learn how to configure the action.
  2. After configuring and saving the action, click Review and Publish and turn on the workflow.
  3. The Oneflow actions will run when the trigger criteria added to the workflow are met.

Create a contract

You can use this workflow action to create a Oneflow contract whenever the trigger criteria are met in HubSpot.

The following objects are currently supported for creating contracts through workflows.

  • Deal
  • Contact
  • Company
  • Ticket
  • Quote
  • Custom objects
  • Contract name: Enter a name for your Oneflow contract.
  • Oneflow user performing action: Refers to the actor performing this action. Enter the email address associated with your Oneflow account or the email of another user added to your Oneflow account.
INFORMATION
Ensure the Oneflow user performing this action has the necessary permission to create contracts.
  • Workspace: Oneflow contracts are saved in workspaces. Select a workspace from your Oneflow account to save your contract in.
  • Template: Oneflow contracts are created from a template that acts as the blueprint for the contract. Select a template from your Oneflow account to create your contract from.

Transferring line items to product tables

  • If you are creating a contract from a deal or a quote object in HubSpot, then the associated line items will be transferred to the product table in the Oneflow contract. Ensure your contract’s template contains only one product table.

Transferring data fields

  • If you have mapped HubSpot properties to Oneflow data fields in Two-way sync settings, the property values will be transferred to their mapped data fields when creating the contract via the workflow. To learn more, see Two-way sync & mapping.

NOTE

  • The output of the create contract workflow will be as follows for Deal, Contact, Company, and Ticket objects.
  • An external link to the HubSpot object (e.g., deal) will be added to all Oneflow contracts created via workflows.

Output fields

Attribute Description Field type Sample value
contract_id The unique identifier of the contract. number 243009
contract_name The name of the contract. text SpaceX deal #1

Get contract details

You can use this workflow action to retrieve the details of a Oneflow contract whenever the trigger criteria are met in HubSpot.

  • Oneflow user performing action: Refers to the actor performing this action. Enter the email address associated with your Oneflow account. This will correspond to the user retrieving the contract details.
  • Get contract ID by: To get contract details from Oneflow, you will need to provide the contract ID. There are two ways to get the contract ID.
    • Select contract ID: Automatically get the contract ID from a previous Oneflow action if it outputs the contract ID as an output field.
    • Enter contract ID: Manually copy and paste the contract ID from Oneflow.

Output fields

Attribute Description Field type Sample values
contract_id The unique identifier of the contract. number 243009
contract_name The name of the contract. text SpaceX deal #1
contract_state The current status of the contract. text draft, pending, signed, overdue, declined, unknown
workspace_id The unique identifier of the workspace in Oneflow. number 431756
can_delete_contract Indicates whether the contract can be deleted. boolean true/false
can_download_contract Indicates whether the contract can be downloaded. boolean true/false
can_send_contract Indicates whether the contract can be sent to participants. boolean true/false
can_receive_attachments Indicates whether the contract can receive attachments. boolean true/false
can_receive_expanded_pdf Indicates whether the contract can display expanded PDFs. boolean true/false
can_receive_products Indicates whether the contract can receive products. boolean true/false
contract_state_updated_time The time at which the contract's status was last updated. text 2024-04-01T09:34:06+00:00
contract_update_time The time at which the contract's content was last updated. text 2024-03-28T03:58:39+00:00
published_time The time at which the contract was sent to participants and published. text 2024-03-28T03:58:39+00:00
signing_period_expiry_time The time until which the contract can be signed by participants. text 2024-11-01T09:34:06+00:00
contract_value The total monetary value of the contract. number 300
currency The currency of the contract. text SEK
lifecycle_state_updated_time The date and time at which the contract's lifecycle state was last updated. text 2024-03-17T11:38:15+00:00
lifecycle_contract_end_time The date and time at which the contract's lifecycle ends. text 2025-05-17T18:30:00+00:00
lifecycle_contract_start_time The date and time at which the contract's lifecycle begins. text 2024-04-17T11:38:15+00:00
lifecycle_notice_period_start_time The date and time at which the contract's lifecycle notice period begins. text 2024-05-17T00:00:00+00:00
lifecycle_state Keeps track of the contract status. To learn more, see Lifecycle state. text active

Delete a contract

You can use this workflow action to delete a Oneflow contract whenever the trigger criteria are met in HubSpot.

  • Oneflow user performing action: Refers to the actor performing this action. Enter the email address associated with your Oneflow account. This will correspond to the user deleting the contract.
  • Get contract ID by: To delete a Oneflow contract, you will need to provide its contract ID. There are two ways to get the contract ID.
    • Select contract ID: Automatically get the contract ID from a previous Oneflow action if it outputs the contract ID as an output field.
    • Enter contract ID: Manually copy and paste the contract ID from Oneflow.

Send a contract

You can use this workflow action to send an existing Oneflow contract to its participants whenever the trigger criteria are met in HubSpot.

  • Oneflow user role:
    • Contract creator: Sends the contract to participants as the contract creator.
    • Other user: In the User’s email field, enter the email of the Oneflow user who sends the contract to the participants.
  • Get contract ID by:
    • Select contract ID: Automatically get the contract ID from a previous Oneflow action if it outputs the contract ID as an output field.
    • Enter contract ID: Manually copy and paste the contract ID from Oneflow.
  • Subject: The subject for the contract signing invitation (max 150 characters).
  • Message: The message for the contract signing invitation (max 5000 characters).

Output fields

Attribute Description Field type Sample value
contract_link A link to the contract in Oneflow. text https://app.oneflow.com/contracts/7070583

Add participants to a contract

You can use this workflow action to add participants to an existing Oneflow contract whenever the trigger criteria are met in HubSpot.

  • Add new participant to contract as:
    • Contract creator: Add the participant to the contract as the Oneflow user creating the contract.
    • Other user: Add the participant to the contract as another user associated with your Oneflow account. If selected, enter the user’s email in Oneflow user performing action.
  • Get contract ID by:
    • Select contract ID: Automatically get the contract ID from a previous Oneflow action if it outputs the contract ID as an output field.
    • Enter contract ID: Manually copy and paste the contract ID from Oneflow.
  • Contract ID:
    • If Select contract ID: Select a property of the enrolled object.
    • If Enter contract ID: Enter the Oneflow contract ID.
  • Participant type:
    • Individual
    • Company
    • Colleague
    • Participant (to a specified counterparty via Party ID)
    • Company name / Company registration number when relevant
  • Add participants by:
    • By selecting properties
    • By entering details
    • Add associated contacts
  • Association label (only for Add associated contacts):
  • Participant first name, last name, phone number
  • Role in the contract:
    • Signatory
    • Influencer
    • Viewer
    • Organizer (only for colleague)

Output fields

Attribute Description Field type Sample value
participant_count Contains the total number of participants in the contract. number 2
participants Contains the participant names added to the contract. text Jane Doe, John Doe

Get contract list

You can use this workflow action to retrieve a list of Oneflow contracts created from an object (e.g., a deal) whenever the trigger criteria are met in HubSpot.

NOTE
If these fields are left blank, they will be populated with the values of the object the workflow was created from (e.g., deal, contact, company).

Add HubSpot object ID by (optional): Refers to the way in which the object ID is retrieved.

  • Select the HubSpot object ID: Automatically get the object ID by selecting a property of the enrolled object.
  • Enter the HubSpot object ID: Manually enter the object ID (e.g., deal ID, company ID, contact ID).

HubSpot object ID (optional)

  • If Select HubSpot object ID: Select a property of the enrolled object (e.g., deal Record ID).
  • If Enter HubSpot object ID: Enter the ID manually.

Get HubSpot object type by (optional)

  • Select the HubSpot object type: Automatically from a property of the enrolled object.
  • Enter the HubSpot object type: Manually add the object type (Deal, Company, Contact).

HubSpot object type (optional)

  • If Select HubSpot object type: Select a property of the enrolled object.
  • If Enter HubSpot object type: Enter the object type manually (e.g., Deal).

Output fields

Attribute Description Field type Sample value
contract_1_id The unique identifier of the first contract in the list. number 243009
contract_1_name The name of the first contract in the list. text SpaceX deal #1
contract_2_id The unique identifier of the second contract in the list. number 243012
contract_2_name The name of the second contract in the list. text SpaceX deal #2
contract_3_id The unique identifier of the third contract in the list. number 243011
contract_3_name The name of the third contract in the list. text SpaceX deal #3
contract_4_id The unique identifier of the fourth contract in the list. number 243014
contract_4_name The name of the fourth contract in the list. text SpaceX deal #4
contract_5_id The unique identifier of the fifth contract in the list. number 243016
contract_5_name The name of the fifth contract in the list. text SpaceX deal #5
contract_6_id The unique identifier of the sixth contract in the list. number 243017
contract_6_name The name of the sixth contract in the list. text SpaceX deal #6
contract_7_id The unique identifier of the seventh contract in the list. number 243015
contract_7_name The name of the seventh contract in the list. text SpaceX deal #7
contract_8_id The unique identifier of the eighth contract in the list. number 243019
contract_8_name The name of the eighth contract in the list. text SpaceX deal #8
contract_9_id The unique identifier of the ninth contract in the list. number 243020
contract_9_name The name of the ninth contract in the list. text SpaceX deal #9
contract_10_id The unique identifier of the tenth contract in the list. number 243021
contract_10_name The name of the tenth contract in the list. text SpaceX deal #10
contracts_count The total number of contracts in the list. number 10

Download contract

  • Get contract ID by:
    • Select contract ID: Automatically retrieve the Contract ID from a previous Oneflow action, if it provides the Contract ID as an output field.
    • Enter contract ID: Manually enter the contract ID from Oneflow.
  • Contract ID:
    • If Select contract ID: Select a property of the enrolled object.
    • If Enter contract ID: Enter the Oneflow contract ID.
  • Save contract PDF to parent object record:

NOTE

The object the contract is attached to will vary depending on the selected value in the “Save contract PDF to parent object record” field.

  • Choose a value: The contract’s PDF is uploaded to the HubSpot File Manager, but not attached to any object.
  • Yes: Attach the contract PDF to the object the contract was created from, and specify where to store the PDF (attachments or file field).
  • Select the HubSpot object used to create the contract: Select the HubSpot object type the contract was created from. All supported HubSpot objects are available.
  • Attach contract to:
    • Attachments section: The contract gets attached to the attachment section of the object.
    • [File fields]: The contract gets attached to the file field of the object.
  • No: The contract will be attached to an associated object instead of the one it was created from.
    • Select associated object type to save contract PDF: Choose from Deal, Company, Contact, or Ticket associated with the parent object.

      For example, if the contract was created from a Deal and you select “Contact,” the contract PDF will be attached to the Contacts associated with that Deal.

    • Specify association label (Optional): If provided, the file will only attach to objects matching that label.

      For example, if “Contact” is selected and the association label is decision_maker, the file will only attach to Contacts with the decision_maker label. If no label is specified, the contract will attach to all associated Contacts.

    • Attach contract to:
      • Attachments section: The contract is attached to the attachment section of the object.
      • [File fields]: The contract PDF gets attached to the file field of the object.

Fetch updates from contract

You can use this workflow action to fetch the latest supported updates from a Oneflow contract and apply them to the mapped HubSpot properties.

Use this action when data fields and line items are updated in Oneflow and you want HubSpot to stay in sync. For example, use it when editable Oneflow data fields are changed during the contract process and those values should be reflected in HubSpot.

  • Oneflow user role: Select who should perform the fetch action.
    • Contract creator: Fetches updates as the user who created the contract.
    • Other user: Fetches updates as another active user in your Oneflow account.
      • Oneflow user performing action: If you selected Other user, enter the email address of the Oneflow user performing the action.
  • Contract ID: Automatically retrieve the contract ID from a previous Oneflow action, if that action provides the contract ID as an output field. You can also manually enter the contract ID from Oneflow.

What gets updated

HOW IT WORKS

The workflow trigger determines which HubSpot object records (for example, which deals) are enrolled in the workflow. When the fetch action runs, the contract ID identifies the Oneflow contract to fetch updates from. Oneflow then applies the fetched values to the mapped HubSpot properties for the enrolled object record.

The action can update:

  • Mapped HubSpot properties with values from Oneflow data fields.
  • HubSpot deal line items with supported product updates from the Oneflow contract.

Error scenarios

  • If the contract cannot be found, the action fails.
  • If the selected Oneflow user is invalid or does not have the required access, the action fails.
  • If a mapped HubSpot record, property, or line item can no longer be found, the affected update may fail.
  • If a value cannot be synced because it does not match the expected format, such as an invalid date format, the action returns an error message.
  • If some values are updated successfully but others cannot be synced, the action returns a partial sync error message explaining what failed. This can happen when a mapped property is unavailable or a value is in an unsupported format. To view the error logs, go to View > Action logs > and select Event details.

NOTES

  • Product and line item updates are supported for contracts connected to HubSpot deals.
  • This action fetches updates from one contract at a time.

Push updates to contract

You can use this workflow action to push updates from HubSpot to an existing Oneflow contract whenever the trigger criteria are met in HubSpot.

This is useful when a HubSpot record is updated after the Oneflow contract has already been created and is in draft stage, and you want the contract to reflect the latest mapped HubSpot values automatically.

  • Oneflow user role: Select who should perform the update in Oneflow.
    • Contract creator: Updates the contract as the user who created the contract.
    • Other user: Updates the contract as another active user in your Oneflow account.
  • Oneflow user performing action: If you selected Other user, enter the email address of the Oneflow user who should perform the update.
  • Contract ID: Automatically retrieve the contract ID from a previous Oneflow action, if that action provides the contract ID as an output field. You can also manually enter the contract ID from Oneflow.

What gets updated

HOW IT WORKS

The workflow trigger determines which HubSpot records are enrolled in the workflow. When the push action runs for an enrolled object record (for example, for specific deals), Oneflow uses the contract ID to identify the contract to update, then pushes the enrolled HubSpot object record's mapped property values to the matching Oneflow data fields.

The action can update:

  • Mapped Oneflow data fields with values from HubSpot properties.
  • Product table rows in the Oneflow contract from HubSpot deal line items, where product syncing is supported and the mappings are valid.

Error scenarios

  • If the contract cannot be found, the action fails.
  • If the selected Oneflow user does not have the required permissions, the action fails.
  • If product updates cannot be processed because of missing or invalid product table mappings, the action returns an error message explaining what needs to be corrected.
  • In some cases, mapped data fields may be updated successfully even if product table updates fail.

WARNING

Signed and declined contracts cannot be updated by this action.

NOTES

  • Product table updates are supported for contracts connected to HubSpot deals. If the contract uses multiple product tables, the line items must be mapped to the correct Oneflow product tables.
  • This action updates one contract at a time.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request