> ## Documentation Index
> Fetch the complete documentation index at: https://signatureapi-daf4ee54.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Power Automate Quickstart

> Create a consent form from a DOCX template and send it for signature in Power Automate

## Overview

In this quickstart, we'll create a Dummy Consent form from a docx template and send it to a recipient for signature using Power Automate and SignatureAPI.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/completed-flow.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=75845919bb82dc57b773396bd729a3df" alt="" width="2880" height="1624" data-path="docs/integrations/power-automate/images/quickstart/completed-flow.png" />
</Frame>

### What you'll learn

* How to fill a document template with data using SignatureAPI.
* How to send documents for signature and track their status.
* How to retrieve the signed document and save it.
* How to use the Dashboard to read emails while in test mode.
* What the signing experience looks like.

## Getting Everything Ready

Before building the Power Automate flow, let's make sure we have everything ready.

### Get Your Test API key

<Card title="Get Your Free Test API Key" icon="key" href="https://accounts.signatureapi.com/sign-up">
  Sign up for a free account to get your test API key. Use it to generate non-binding envelopes and test your integration with SignatureAPI.
</Card>

To get started, sign up for a free test [API key](/docs/integrations/power-automate/authentication). Test API keys let you create test envelopes, great for trying out your workflows. Envelopes in test mode:

* Don’t send emails to recipients, but you can see them in the Email area of your dashboard.
* Are not legally-binding, so no legal obligations arise during testing.
* Are free.

Learn more about [test API keys](/docs/integrations/power-automate/authentication#test-vs-live-mode).

### Prepare the Template

Before building the Power Automate flow, let's look at the DOCX document we'll use as our template. You can [download it here](https://pub-9cb75390636c4a8a83a6f76da33d7f45.r2.dev/dummy-consent.docx) and open it in Microsoft Word.

In the document, we've added fields like `{{personName}}` and `{{companyName}}`. These placeholders will be replaced with actual data when the document is generated.

We've also included a conditional statement `{{if showStatement}}` that will insert the text "THIS IS A NON-BINDING..." only if the `showStatement` value is set to `true`.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/template-1.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=be5f3e6e378aea2be97f480f850f12ed" alt="" width="2880" height="1800" data-path="docs/integrations/power-automate/images/quickstart/template-1.png" />
</Frame>

On the second page, we've added a signature placeholder `[[consentor_signature]]` for the recipient's signature (we'll refer to the recipient as "Consentor" in this example).

For visibility, we've made the placeholder font blue in this example, but we recommend setting the font color to white so it remains hidden in the final document.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/template-2.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=e921f16d501e38dcac40238e1550eeb8" alt="" width="2880" height="1800" data-path="docs/integrations/power-automate/images/quickstart/template-2.png" />
</Frame>

## Building the Power Automate Flow

In Power Automate, create a new **Instant cloud flow**. Give it a name and choose **Manually trigger a flow** as the trigger.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/trigger.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=b81523d95c5fd91e48f556125ebf1b1e" alt="" width="2880" height="1624" data-path="docs/integrations/power-automate/images/quickstart/trigger.png" />
</Frame>

### Download the Template

We'll use Power Automate's HTTP action to download the template from a URL. Alternatively, you can store and retrieve the template from OneDrive, Dropbox, or another file source.

* Add a new **HTTP** action to your flow.
* Set the **Method** to `GET`.
* In the **URI** field, enter `https://pub-9cb75390636c4a8a83a6f76da33d7f45.r2.dev/dummy-consent.docx`.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/download-template.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=29ddf7137011f5c7f39ab81b5b6179f3" alt="" width="2880" height="1624" data-path="docs/integrations/power-automate/images/quickstart/download-template.png" />
</Frame>

This action will download the template file, which we'll use later when adding a template to the envelope.

### Create an Envelope

Next, we'll create an envelope using SignatureAPI. An envelope is a container for the documents and recipients involved in the signing process.

* Add the **Create an envelope** action from SignatureAPI to your flow.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/create-envelope-1.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=86927ce286babdc3508f1a7edac01341" alt="" width="2880" height="1620" data-path="docs/integrations/power-automate/images/quickstart/create-envelope-1.png" />
</Frame>

* If you're using SignatureAPI for the first time, you'll need to create a new connection:
  * For **Connection Name**, use any name you prefer (e.g., **SignatureAPITest**).
  * In **API Key**, enter your SignatureAPI key, which you can find in the SignatureAPI Dashboard under **Settings > API Keys**.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/create-connection.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=0996f7ec37583089c33f43234a9be5e6" alt="" width="2880" height="1620" data-path="docs/integrations/power-automate/images/quickstart/create-connection.png" />
</Frame>

Once connected, configure the **Create an envelope** action:

* Set the **Envelope title** and **Envelope message**. These will be visible to the recipient.
* In the **Advanced Options**, you can set localization settings (language, time formats, time zones) and other advanced features.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/create-envelope-2.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=c61f0bbeae1c9a83d10475892d5f50c5" alt="" width="2880" height="1620" data-path="docs/integrations/power-automate/images/quickstart/create-envelope-2.png" />
</Frame>

### Add a Recipient - Signer

Now, we'll add the signer recipient to the envelope.

* Add the **Add a recipient - Signer** action from SignatureAPI to your flow.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/add-recipient-1.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=522ff26b4422c9f7f90410e165c4dff7" alt="" width="2880" height="1624" data-path="docs/integrations/power-automate/images/quickstart/add-recipient-1.png" />
</Frame>

Configure the **Add a recipient - Signer** action:

* **Recipient Name**: Enter the recipient's name (e.g., `John Doe`).
* **Recipient Email**: Enter the recipient's email address (e.g., `john@example.com`).
* **Recipient Key**: Use the same key you used in the signature placeholder in your template (in this case, `consentor`).
* **Envelope ID**: Select the **Envelope ID** output from the **Create an envelope** action.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/add-recipient-2.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=1e156470df92d6486aaec279ec6d89b3" alt="" width="2880" height="1620" data-path="docs/integrations/power-automate/images/quickstart/add-recipient-2.png" />
</Frame>

### Add the Template to the Envelope

We'll now add the DOCX template to the envelope.

* Add the **Add a template - DOCX** action from SignatureAPI to your flow.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/add-template-1.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=f20ab8a169ce50ec6ea6862e1dd3c188" alt="" width="2880" height="1624" data-path="docs/integrations/power-automate/images/quickstart/add-template-1.png" />
</Frame>

Configure the **Add a template - DOCX** action:

* **File Content**: Set this to the **Body** output of the **HTTP** action we used to download the template.
* **Envelope ID**: Select the **Envelope ID** output from the **Create an envelope** action.
* **File Format**: Keep this as `docx`.
* **Template Data**: For each field or conditional in your template, add a new **Template Data Item** as a `Key: Value` pair in the **Template Data**. The **Key** being the field name (without the `{{ }}`) and the **Value** being the data you want to insert. This will be used to populate the template.

  * To fill the `personName` field with `John Doe`, add the following item: `personName: John Doe`

  * To fill the `companyName` field with `Doe Enterprises, LLC`, add the following item: `companyName: Doe Enterprises, LLC`.

  * To set the conditional `showStatement` to `true`, add the following item: `showStatement: true`.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/add-template-2.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=0bd95245d871f9dd193813691718698b" alt="" width="2880" height="1620" data-path="docs/integrations/power-automate/images/quickstart/add-template-2.png" />
</Frame>

* For the `companyName` field, set the **Value** to `Doe Enterprises, LLC`.

* For the conditional `showStatement`, set the **Value** to `true`.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/add-template-2.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=0bd95245d871f9dd193813691718698b" alt="" width="2880" height="1620" data-path="docs/integrations/power-automate/images/quickstart/add-template-2.png" />
</Frame>

### Add the Signature Place

Now that we've set up the envelope template, we'll add the signature place to the document.

* Add the **Add a place - Signature** action from SignatureAPI to your flow.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/add-signature-1.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=8034f1f0e041da6d4e6d29f593c7ce94" alt="" width="2880" height="1624" data-path="docs/integrations/power-automate/images/quickstart/add-signature-1.png" />
</Frame>

Configure the **Add a place - Signature** action:

* **Place Key**: Enter the place key you used in the signature placeholder in your template (in this case, `[[consentor_signature]]`).
* **Recipient Key**: Select the **Recipient Key** output from the **Add a recipient - Signer** action.
* **Document ID**: Select the **Document ID** output from the **Add a template - DOCX** action.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/add-signature-2.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=47d18a5661259920de9a8edd75c7114f" alt="" width="2880" height="1620" data-path="docs/integrations/power-automate/images/quickstart/add-signature-2.png" />
</Frame>

### Start the Envelope

Now that we've set up the envelope with the recipient and template, we'll start the signing process.

* Add the **Start an envelope** action from SignatureAPI to your flow.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/start-envelope-1.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=c15e04aefe45f261b7f63b8ce2ef1dd8" alt="" width="2880" height="1624" data-path="docs/integrations/power-automate/images/quickstart/start-envelope-1.png" />
</Frame>

Configure the **Start an envelope** action:

* **Envelope ID**: Select the **Envelope ID** output from the **Create an envelope** action.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/start-envelope-2.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=27b2bcd69b4c0347cb6d3f2ac9c265bc" alt="" width="2880" height="1620" data-path="docs/integrations/power-automate/images/quickstart/start-envelope-2.png" />
</Frame>

### Wait for the Envelope to Complete

After starting the envelope, we need to wait until all recipients have signed and the signed document is ready.

* Add the **Wait for envelope** action from SignatureAPI to your flow. This action pauses the flow for up to 30 days until the process is complete.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/A2M2EMKFzt1MfKWy/docs/integrations/power-automate/images/quickstart/wait-envelope-1.png?fit=max&auto=format&n=A2M2EMKFzt1MfKWy&q=85&s=0efbb79b477dfbc2ac898a5cd26f8a09" alt="" width="2880" height="1624" data-path="docs/integrations/power-automate/images/quickstart/wait-envelope-1.png" />
</Frame>

Configure the **Wait for envelope** action:

* **Envelope ID**: Select the **Envelope ID** output from the **Create an envelope** action.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/A2M2EMKFzt1MfKWy/docs/integrations/power-automate/images/quickstart/wait-envelope-2.png?fit=max&auto=format&n=A2M2EMKFzt1MfKWy&q=85&s=3563a0e55c2a547705a0ce0f5b5d05d6" alt="" width="2880" height="1620" data-path="docs/integrations/power-automate/images/quickstart/wait-envelope-2.png" />
</Frame>

### Retrieve the Deliverable

Once the envelope is complete and the deliverable is generated, we'll retrieve it. The deliverable is a tamper-proof document that includes the signed document and the audit log.

* Add the **Get a deliverable** action from SignatureAPI to your flow.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/get-deliverable-1.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=67720c5b89b8b6b42b5f94be3bfa4dfb" alt="" width="2880" height="1624" data-path="docs/integrations/power-automate/images/quickstart/get-deliverable-1.png" />
</Frame>

Configure the **Get a deliverable** action:

* **Deliverable ID**: Select the **Deliverable ID** output from the **Wait for envelope** action.

> **Important:** Use the **Deliverable ID** from the **Wait for envelope** action, not from the **Create an envelope** action, because the latter does not contain the completed deliverable.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/get-deliverable-2.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=f3cc1527ed530b889effeb5693324bf5" alt="" width="2880" height="1620" data-path="docs/integrations/power-automate/images/quickstart/get-deliverable-2.png" />
</Frame>

The **Get a deliverable** action outputs a **File Content** property containing the PDF file of the deliverable. You can use this **File Content** in any Power Automate action that accepts files, such as OneDrive's **Create file** action.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/get-deliverable-3.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=5644b629a959d0922bdc53a23ef2d762" alt="" width="2880" height="1624" data-path="docs/integrations/power-automate/images/quickstart/get-deliverable-3.png" />
</Frame>

## Running the Flow

In Power Automate, click on **Test** to run your flow. The flow will start running. If everything is set up correctly, you should see green checkmarks on all steps up to **Start an envelope**. The **Wait for envelope** action will be in a waiting state until the envelope is completed and the deliverable is generated.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/run-test-1.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=7852a9182639d7e2e5785d27aec1c619" alt="" width="2880" height="1624" data-path="docs/integrations/power-automate/images/quickstart/run-test-1.png" />
</Frame>

### Sign the Envelope

The envelope has been sent to the recipient, John Doe, at `john@example.com`.

Since we're using a test API key, real emails are not sent. However, you can preview the email in the SignatureAPI Dashboard.

* Log in to your SignatureAPI Dashboard.
* Navigate to the **Envelopes** list and select your newly created envelope.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/sign-envelope-1.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=c4d0c3a2974a7e4be3826b00bed06e0e" alt="" width="2880" height="1620" data-path="docs/integrations/power-automate/images/quickstart/sign-envelope-1.png" />
</Frame>

In the envelope details, scroll down to the **Emails** section and click on the email sent to John Doe.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/sign-envelope-2.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=eb87a91862be4723208b8abaa928c248" alt="" width="2880" height="1620" data-path="docs/integrations/power-automate/images/quickstart/sign-envelope-2.png" />
</Frame>

You can preview the email to see how it would appear to the recipient.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/sign-envelope-3.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=bc0470f8cdfc2a1e8c30d7f86ec729b3" alt="" width="2880" height="1620" data-path="docs/integrations/power-automate/images/quickstart/sign-envelope-3.png" />
</Frame>

Click on the blue button in the email preview to access the signing ceremony as John Doe.

### Sign the Document as John Doe

You'll now experience the signing process from John Doe's perspective. Go through the signing ceremony and sign the document.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/sign-document-1.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=f84256fcd500f74619c8c7ca54a7b1f0" alt="" width="2880" height="1620" data-path="docs/integrations/power-automate/images/quickstart/sign-document-1.png" />
</Frame>

### Verify the Envelope Status

After signing, return to the SignatureAPI Dashboard to check the status of the envelope and ensure that everything is progressing smoothly.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/A2M2EMKFzt1MfKWy/docs/integrations/power-automate/images/quickstart/verify-envelope-status.png?fit=max&auto=format&n=A2M2EMKFzt1MfKWy&q=85&s=97e58395208916d8a5ee566597862583" alt="" width="2880" height="1620" data-path="docs/integrations/power-automate/images/quickstart/verify-envelope-status.png" />
</Frame>

### Check the Power Automate Flow

Go back to your flow run in Power Automate. If the steps are still processing, wait a few minutes or refresh the page. The deliverable may take a few minutes to generate.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/5kf_xnmgDccjHgkV/docs/integrations/power-automate/images/quickstart/success-flow.png?fit=max&auto=format&n=5kf_xnmgDccjHgkV&q=85&s=7ed02e3b0718eb5400a452edafd51ddc" alt="" width="2880" height="1620" data-path="docs/integrations/power-automate/images/quickstart/success-flow.png" />
</Frame>

Once the flow has completed successfully, you can go to OneDrive (or whichever app you used to store the deliverable) to download and view the final document.
