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
|
To use the Power Automate x Oneflow integration, you will need to perform the following as a one-time setup process.
- Log in to your Oneflow account as an administrator.
- From the side panel, select Marketplace.
- 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
- In Power Automate, click + Create to start a new flow. You can choose from several types of flows (Learn more).
- 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.
- Click the + button below the trigger event and select Add an action.
- 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.
-
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.
- In the Parameters tab, select a workspace and a template from the dropdowns.
|
NOTE
|
- Optionally, you can select one or more Advanced parameters to configure (e.g., data fields, contract name).
- 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:
- In your flow, click + Add an action, search for Oneflow, then select Create a contract.
- In the Parameters tab, select a workspace and a template from the dropdowns.
- Workspace name: The name of the workspace in which your contract will be created.
- Template name: The template from which you want to create your contract.
- Optionally, select advanced parameters to configure, such as data fields or the 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:
- Click the + Add an action button.
- Search for Oneflow, then select Add Participant. You may need to select ‘See more’ to view the complete list of actions.
- 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.
- In the Add Participant window, fill in all required fields. The input fields will change depending on the participant type you choose:
|
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.
|
|
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.
- Click the + Add an action button.
- Search for Oneflow, then select Upload attachments. You may need to select ‘See more’ to view the complete list of actions.
- 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.
|
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.
- Click the + Add an action button.
- Search for Oneflow, then select Update a data field. You may need to select ‘See more’ to view the complete list of actions.
- 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.
|
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.
- Click the + Add an action button.
- Search for Oneflow, then select Publish a contract. You may need to select ‘See more’ to view the complete list of actions.
- 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.
|
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).
- 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.
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. |