Getting started with Power Automate

Sherin Amini
Sherin Amini
  • Updated

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 to 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 setup process.

  1. Log in to your Oneflow account as an administrator.
  2. From the side panel, select Marketplace.
Marketplace in Oneflow side panel
  1. Activate the Power Automate extension by clicking on the Enable button.
Power Automate in Marketplace
Enabling Power Automate extension

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 + Create to start a new flow. You can choose from several types of flows (Learn more).
  2. Enter a name for the flow, then select a trigger. To add a Oneflow trigger, search for "Oneflow" in the 'Search all triggers' field. Click Create to create the flow.
  3. Click the + button below the trigger event and select Add an action.
Add an action in Power Automate
  1. Search for Oneflow in the Search bar, then select a Oneflow action (e.g., Create a contract). The required fields will differ based on the action you select.
Selecting a Oneflow action
  1. In the 'Create a new connection' panel, enter a connection name, the API key you copied earlier, and your email address. Select an API URL (e.g., Production), then click 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.

Creating a new connection to Oneflow
  1. In the Parameters tab, select a workspace and a template from the dropdowns.
Selecting workspace and template

NOTE

  • Only workspaces and templates available to the user whose email was used for the connection will be displayed.
  • The templates shown are limited by the API token type. For instance, if you connect using a Power Automate API token, the dropdown will only show templates belonging to the "Power Automate" template group.
  1. Optionally, you can select one or more Advanced parameters to configure (e.g., data fields, contract name).
  2. You can now add more Oneflow actions. For instance, after a 'Create contract' action, you could 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, then select Create a contract.
Create a contract action in Power Automate
  1. In the Parameters tab, select a workspace and a template from the dropdowns.
  2. Workspace name: The name of the workspace in which your contract will be created.
  3. Template name: The template from which you want to create your contract.
  4. Optionally, select advanced parameters to configure, such as data fields or the contract name. You can also populate data fields during contract creation:
Configuring advanced parameters

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.

Populating data fields
Data field value mapping

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, then select Add Participant. You may need to select ‘See more’ to view the complete list of actions.
Add Participant action
  1. To populate the Contract Id field with dynamic content from the previous step, select the field, click the lightning bolt icon (⚡), and select “Contract Id” from the 'Create a contract' action in the dynamic content list.
Dynamic content icon
Selecting Contract Id from dynamic content
Contract Id field populated
  1. In the Add Participant window, fill in all required fields. The input fields will change depending on the participant type you choose:
Add Participant parameters

NOTE

If you 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 from your team who will be automatically added to your party.

NOTE

Field requirements for this action are dynamic. Please refer to our API documentation to better understand the participant and party models.

To add multiple participants under the same company-type party, the action will try to match an existing party by comparing fields like Party name, Party country code, and Party identification number. As long as you provide the same party data in multiple steps, Company type participants will be grouped into the same party.

Upload attachments

You can add attachments to your contract, such as an expanded PDF or a separate file, using the Upload attachments action.

  1. Click the + Add an action button.
  2. Search for Oneflow, then select Upload attachments. You may need to select ‘See more’ to view the complete list of actions.
Upload attachments action
  1. In the Upload Attachments pane, fill in all required fields:

    Contract Id: Use dynamic content to select the ID from the 'Create a contract' action.

    File: The body of the file. Only byte array format is supported; a base64 encoded string will not work. You must first use the base64ToBinary() function in an expression to transform a base64 string.

    File (file name): Name of the file, including the extension (e.g., `quotedetails.pdf`). The system will throw an error if the file name does not contain an extension.
    Upload As: `attachment` adds a regular file attachment, while `expanded_pdf` displays your PDF document's content in the contract's PDF section.
Upload attachments parameters

NOTE

Only one PDF section is allowed per contract. If the contract does not have an attachment section, but you try to upload an attachment, an error will occur. The same applies to expanded PDFs.

Set Data Field values

You can set Data Field values for existing contracts. You can read more about data fields in our Data fields article.

  1. Click the + Add an action button.
  2. Search for Oneflow, then select Update a data field. You may need to select ‘See more’ to view the complete list of actions.
Update a data field action
  1. In the 'Update a data field' window, fill in all required fields:

    Contract Id: Use dynamic content to select the ID from the 'Create a contract' action.

    Custom id: This is the `external-key` of the data field you want to update. You can find this in the template group settings in your Oneflow account.

    Value: The value you want to set for the data field.
Update a data field parameters

NOTE

Templates without a template group do not have data fields. Please ensure your template belongs to a template group if you want to use this action.

Publish a contract

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

  1. Click the + Add an action button.
  2. Search for Oneflow, then select Publish a contract. You may need to select ‘See more’ to view the complete list of actions.
Publish a contract action
  1. In the 'Publish a contract' window, fill in all required fields:

    Contract Id: Use dynamic content to select the ID from the 'Create a contract' action.

    Subject: The subject of the notification message that Oneflow will send to participants.

    Message: The body of the notification message.
Publish a contract parameters

NOTE

If a participant's delivery channel = 'sms', the system will send an SMS message. If the delivery channel = 'email', the system will send an email.

Triggers

When a contract is updated

  • In the "Update type" field, select the type of contract update that will trigger the flow (e.g., when a contract is signed).

    Selecting an update type for the trigger
  • Click + Add new item to add additional trigger conditions.
  • You may configure Advanced parameters to filter contracts by template groups.
    • Template group ID: Select the desired Oneflow template group from the dropdown.
    • Once selected, the trigger will only apply to contracts created with that template group.
Filtering by template group ID

Trigger events

Event Description
contract:decline When a contract’s state changes to ‘declined’.
contract:delete When a contract is deleted.
contract:publish When a contract’s state changes to ‘published’.
contract:sign When a contract’s state changes to ‘signed’.
contract:signature_reset When the signatures in a contract were reset after one or more signatories had signed it.
contract:signing_period_expire When the contract’s signing period has expired.
contract:signing_period_revive When the contract’s signing period has been renewed.
data_field: update When a data field’s value is updated.
participant:create When a participant is created.
participant:decline When a participant declines a contract.
participant:delete When a participant is deleted from a contract.
participant:first_visit When a participant opens the contract for the first time.
participant:sign When a participant signs the contract.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request