Submit a ticket
Welcome
Login

Getting started with Power Automate

You can create flows in Power Automate that start based on Oneflow triggers (events), or run specific Oneflow actions in response to an event. This provides you with a powerful platform that lets you combine Oneflow’s contract management features with countless other apps and services.

Enable the extension

Prerequisites:
  • You need to be a Oneflow administrator to generate the API token.
  • If you are a non-admin user, contact your organization's Oneflow administrator for assistance.
  • To use the Power Automate integration you will need subscribe to the Essentials, Business, or Enterprise plans.

To use the Power Automate x Oneflow integration, you will need to perform the following as a one-time set up process.

  1. Log in to your Oneflow account as an administrator.
  2. From the side panel, select Marketplace.

  3. Activate the Power Automate extension by clicking on the Enable button.

    An API token will be displayed. Save the API token in a secure location for future reference.

Create a flow

  1. In Power Automate, click on + Create to create a new flow. There are different types of flows that can be created. Learn more.
  2. Enter a name for the flow, then select a trigger for your flow. To add a Oneflow trigger, search for "Oneflow" in the 'Search all triggers' field. Click on Create to create the flow.
  3. Click the + button below the trigger event and select Add an action.

  4. Search for Oneflow in the Search bar, then select a Oneflow action (i.e. Create a contract). The required fields will differ based on the action you select.

  5. In the 'Create a new connection' panel, enter a connection name, followed by the API key you copied earlier in the previous stage. Enter your email address, select an API URL (i.e. Production), then click on Create New.

    Production: Select this to use the latest stable version of the integration.

    Test: Select this if you wish to test out features in the integration.

  6. In the Parameters tab, select a workspace and a template from the dropdowns.

    Note:

    • Only workspaces and templates that are available in your connected Oneflow account will be displayed in the dropdowns.

    • Templates that are displayed in the dropdowns are limited by the API token type. For instance if you use a Power Automate token to connect your Oneflow account to Power Automate, then only templates belonging to the Power Automate template group will be shown.
  7. Optionally, you may select one or more Advanced parameters you wish to configure in your action (i.e. data fields, setting a contract name).

  8. You can now proceed to add more Oneflow actions (similar to Step 4). For instance, after a Create contract action, you may add an action to add participants to the contract.

Actions

Create a contract

Here's what you need to do to create a new contract flow using the Create a contract action:

  1. In your flow, click + Add an action, search for Oneflow in the search bar, then select Create a contract.

  2. In the Parameters tab, select a workspace and a template from the dropdowns.

  3. Workspace name: The name of a workspace in which your contract will be created.
  4. Template name: The template from which you want to create your contract.

  5. Optionally, you may select one or more Advanced parameters you wish to configure in your action (i.e. data fields, setting a contract name). You can also populate data fields during contract creation:

By clicking on the dropdown in the first field, select a data field to populate, and insert a value in the Data field Value field.

Note:

This action will only show workspaces and templates available to the user whose email you used to create the connection.

Add participants

Once your contract is created, you can add participants. Let's create the next step in our flow:

  1. Click the + Add an action button.
  2. Search for Oneflow in the search bar, then select Add Participant. You may need to select ‘See more’ to view the complete list of actions.

  3. To populate the Contract Id field with the ID of the contract created from the previous action in the flow, select the Contract Id field and click on the lightning bolt icon ⚡. From the dropdown list, select “Contract Id” under the Create a contract action.

  4. In the Add Participant window, fill in all required fields.You can add three types of participants to your contracts, and depending on the type you choose, the input fields for this action will change:

Note:

If you decide to fill in the Party Country Code (under Advanced Parameters), ensure it contains only an ISO code. Otherwise, an error will occur. Learn more.

  • Company: a participant associated with a counterparty.
  • Individual: a participant who represents themselves.
  • Ownerside: a participant who is a member of your team. will be automatically added to your owner-side party.
Note:

Field requirement is dynamic for this action, depending on the fields and values you select. Please refer to our API documentation to better understand participant and party models.

Suppose you want to add multiple participants under the same Company-type party. The action will try to automatically match it with an already created one by comparing fields like Party name, Party country code, and Party identification number. As long as you fill in the same party data in multiple action steps, Company type participants will end up in the same party.

Upload attachments

You can add attachments to your contract, like an expanded PDF or just an attached file using the Upload attachments action.

  1. Click the + Add an action button.
  2. Search for Oneflow in the search bar, then select Upload attachments. You may need to select ‘See more’ to view the complete list of actions.
  3. In the Upload Attachments pane, fill in all required fields: Contract Id: To populate the Contract Id field with the ID of the contract created from the previous action in the flow, select the Contract Id field and click on the lightning bolt icon ⚡. From the dropdown list, select “Contract Id” under the 'Create a contract' action.

    File: the body of the file that is attached. Only byte array format is supported; base64 encoded string will not work, so you must first use the base64ToBinary function in the flow to transform your base64 string.

    File (file name): name of the file. It should always come with the file extension. Example: quotedetails.pdf. The system will throw an error if the file name does not contain an extension.

    Upload As: attachment is a regular file attachment in your contract, while expanded_pdf displays your PDF document's content in the contract's PDF section.
Note:

Only one PDF section is allowed for a contract. If the contract does not have an attachment section, but you try to upload an attachment, the system will throw an error. The same goes for expanded PDFs.

Set Data Field values

You can set Data Field(s) values for existing contracts too. You can read more about data fields in a separate article - Data fields

  1. Click the + Add an action button.
  2. Search for Oneflow in the search bar, then select Update a data field. You may need to select ‘See more’ to view the complete list of actions.
  3. In the Update a data field window, fill in all required fields:
    Contract Id: To populate the Contract Id field with the ID of the contract created from the previous action in the flow, select the Contract Id field and click on the lightning bolt icon ⚡. From the dropdown list, select “Contract Id” under the Create a contract action.
    Custom id: custom id of the data field you want to update. custom id are equal to external-key of the data field. **You can find them in template group settings in your Oneflow account. 
    Value:** Value you want to set for the data field in question.


Note:

Templates without a template group don't have data fields. Please make sure your template belongs to a template group if you want to use this action.

Publish a contract

If you feel your contract is ready for signature after completing the previous steps, you can use the Publish a contract step to send it to all recipients.

  1. Click the + Add an action button.
  2. Search for Oneflow in the search bar, then select Publish a contract. You may need to select ‘See more’ to view the complete list of actions.
  3. In the Publish a contract window, fill in all required fields.
    Contract Id: To populate the Contract Id field with the ID of the contract created from the previous action in the flow, select the Contract Id field and click on the lightning bolt icon ⚡. From the dropdown list, select “Contract Id” under the Create a contract action.
    Subject: the subject of the message that Oneflow will send to participants.
    Message: the message body of the notification.
Note:

If delivery channel = 'sms', the system will send an SMS message to them. The system will send an email message if the delivery channel =''email'' respectively.

Triggers

When a contract is updated

  • Update type item - 1: Select the type of contract update as a condition for the trigger event. For instance, when a contract is signed.

  • Click on + Add new item to add additional update type conditions.

  • You may configure Advanced parameters to filter contracts by template groups.
    • Template group ID: Select the preferred Oneflow template group from the dropdown.
    • Once selected, the trigger will only apply to contracts created with the selected template group.

Trigger events

EventDescription
contract:declineWhen a contract’s state changes to ‘declined’.
contract:deleteWhen a contract is deleted.
contract:publishWhen a contract’s state changes to ‘published’.
contract:signWhen a contract’s state changes to ‘signed’.
contract:signature_resetWhen the signatures in a contract were reset after one or more signatories had signed it.
contract:signing_period_expireWhen the contract’s signing period has expired/ended.
contract:signing_period_reviveWhen the contract’s signing period has been renewed.
data_field: updateWhen the data field’s value is updated.
participant:createWhen a participant is created.
participant:declineWhen a participant declines a contract.
participant:deleteWhen a participant deletes a contract.
participant:first_visitWhen a participant opens the contract for the first time.
participant:signWhen a participant signs the contract.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.