Create a flow with Power Automate

Christoffer Utterborn
Christoffer Utterborn
  • Updated

This article explains how to create flows through the Power Automate – Oneflow integration.

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 Playbooks.
    • Playbook 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