> ## 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.

# Automate Contract Signing with SignatureAPI and Microsoft Power Automate

> This tutorial shows how to streamline contract signatures by integrating SignatureAPI with Microsoft Forms, Power Automate, OneDrive, Dataverse, and Outlook.

## Overview

This tutorial guides you through automating the employment contract process using SignatureAPI integrated with Microsoft tools such as Forms, Power Automate, OneDrive, and Dataverse.

You will build an automated workflow that begins when a new employee submits a form. The flow generates a personalized contract, sends it for signing using SignatureAPI, captures any information filled during signing, and stores the results automatically. HR is notified when the process is completed.

### What you'll learn

* How to fill a document template with data using SignatureAPI.
* How to set up signature and input fields in your document.
* How to send documents to multiple signers using SignatureAPI.
* How to collect additional information from signers during the signing process.
* How to send documents for signature and track their status.
* How to retrieve the signed document and save it.

### Tools you'll use

* **SignatureAPI** – to generate, send, and manage signing workflows. SignatureAPI handles document generation, signature requests, tracking, and document delivery.

<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>

* **Microsoft Power Automate** – to build and automate the workflow.
* **Microsoft Forms** – to collect employee information.
* **OneDrive** – to store your DOCX template and signed contract (other document repositories also work).
* **Microsoft Dataverse** – to store employee data.
* **Microsoft Outlook** – to send notifications (other email providers also work).

### Flow overview

The flow follows these steps:

1. **Trigger** – A Microsoft Forms submission starts the flow.
2. **Data Retrieval** – Employee details are pulled from the form, and the contract template is fetched from OneDrive.
3. **Signature Process** – An envelope is created in SignatureAPI, recipients are added, and the DOCX template is filled and sent.
4. **Monitoring** – The flow waits until all parties have signed.
5. **Storage & Notification** – The signed contract is saved to OneDrive, employee data is stored in Dataverse, and HR is notified by email.

Here’s what your final Power Automate flow will look like:

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/complete-flow.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=8494ad2dbd2d71a2aea9e3a587240f8b" alt="Flow" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/complete-flow.png" />
</Frame>

## Prepare the contract template

Begin by preparing your employment contract template in DOCX format. This template is used to generate personalized contracts.

You need to add two types of annotations to your document: **template fields** and **placeholders**.

**Template Fields**

Template fields insert data into the document before it is sent to recipients. These fields are marked with **double curly brackets**, for example: `{{employee.first_name}}`.

SignatureAPI replaces these fields with actual values when generating the document.

Learn more about [document templates](/docs/integrations/power-automate/documents/templates).

**Placeholders**

Placeholders mark where recipients should sign or enter information during the signing process. These are identified by **double square brackets**, for example: `[[employee_signature]]`.

Learn more about [placeholders](/docs/integrations/power-automate/places/positioning#placeholders).

In this tutorial, we will:

* Use **template fields** to fill in employee details.
* Define signature places for both the employer and the employee using **placeholders**.
* Add a text input place for the employer to enter the salary using a **placeholder**.

To prepare your template:

1. Open your existing employment contract (DOCX) in Microsoft Word.
2. Locate where employee details should be inserted (e.g., name, email).
3. Add template fields using **double curly brackets**, for example:
   * First name: `{{employee.first_name}}`
   * Last name: `{{employee.last_name}}`
   * Email: `{{employee.email}}`
4. Add placeholders for signatures using **double square brackets**, for example:
   * Employer signature: `[[employer_signature]]`
   * Employee signature: `[[employee_signature]]`
5. Add a placeholder for salary input: `[[salary_input]]`
6. Save the template and upload it to **OneDrive** (or another supported storage service).

<Note>In the example shown below, placeholders and template fields are colored blue for visibility. In your final document, we recommend coloring them white so they are hidden from recipients.</Note>

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/-zNb44iNHnnmKMui/docs/integrations/power-automate/guides/images/word/employee-template-salary.png?fit=max&auto=format&n=-zNb44iNHnnmKMui&q=85&s=7f0b3cbf570335e4d2529136bcdc1ce0" alt="Word Template Example" width="2880" height="1800" data-path="docs/integrations/power-automate/guides/images/word/employee-template-salary.png" />
</Frame>

## Create the Microsoft Form

We use Microsoft Forms to collect employee details such as name and email address.

1. Visit [Microsoft Forms](https://forms.office.com) and sign in.
2. Click **New Form**.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/forms/new-form.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=61bb548bbcaf1d160525910d98f9005e" alt="New Form" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/forms/new-form.png" />
</Frame>

3. Name your form and add the following required questions:
   * **First Name** (Text, required)
   * **Last Name** (Text, required)
   * **Email Address** (Text, required)
   <Frame>
     <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/forms/add-text-request.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=b00810dd5db883a4bde4a9b419cad2f0" alt="Add request" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/forms/add-text-request.png" />
   </Frame>
   <Frame>
     <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/forms/rename-form.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=6e68319299f24865714667ca6850effc" alt="Rename form" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/forms/rename-form.png" />
   </Frame>
4. Save and publish your form.
   <Frame>
     <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/forms/employee-form.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=30ed1627806a1983f8ed92cd72e58504" alt="Employee Form" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/forms/employee-form.png" />
   </Frame>

## Create the Dataverse table

We will store employee details in a Dataverse table.

1. Go to [Power Apps](https://make.powerapps.com) and sign in.
2. In the left menu, click on **"Tables"**.
3. Click **Start with a blank table**.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/dataverse/start-with-blank.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=1bf8e007abe94c1de1570164624fc577" alt="Start with a blank table" width="2880" height="1620" data-path="docs/integrations/power-automate/guides/images/dataverse/start-with-blank.png" />
</Frame>

4. Add the following columns, all with **Text** format and **Required**:
   * **First Name**
   * **Last Name**
   * **Email Address**
   * **Salary Amount**
   * **Signature Completion**
   <Frame>
     <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/dataverse/add-columns.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=d4b777b4dc991a9fa081a00c4d1c810e" alt="Add columns" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/dataverse/add-columns.png" />
   </Frame>
5. Rename the table:
   * Click **Properties**, then enter a new name (e.g., **Contracts**).
   * Change the **Primary column** to **Email Address**.
   * Click **Save and exit**.
   <Frame>
     <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/dataverse/rename-table.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=546161db27fd57100e595e556f6f3465" alt="Rename table" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/dataverse/rename-table.png" />
   </Frame>

## Build the Power Automate flow

Now that you have the contract template, the form, and the Dataverse table set up, create a Power Automate flow that runs whenever someone submits the form.

### Configure the trigger

Set up the flow trigger so it runs when a new form response is submitted.

1. Go to **Power Automate** and select **Automated Cloud Flow**.
2. Choose the trigger **"When a new response is submitted"** from the **Microsoft Forms** connector.
3. Click **Create**.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/trigger.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=6c0d55e2f5954cc42f614661dd53bc16" alt="Trigger" width="2880" height="1620" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/trigger.png" />
</Frame>

3. In the **Form Id** field, select your form from the dropdown.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/select-form.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=2961916bfa7fb72b4f43ab4e59a7b5cf" alt="Select form" width="2880" height="1620" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/select-form.png" />
</Frame>

### Retrieve form response details

Get the details submitted by the employee.

1. Add the **Get response details** action from the **Microsoft Forms** connector.
2. In the **Form Id** field, select the same form.
3. In the **Response Id** field, select **Response Id** from the trigger step.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/get-response-details.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=658c72c26f4da0a975fd51678e1fa14b" alt="Get response details" width="2880" height="1620" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/get-response-details.png" />
</Frame>

### Retrieve the contract template from OneDrive

Fetch the contract template stored in OneDrive.

1. Add **Get file content using path** from the **OneDrive** connector.
2. In the **File Path** field, select the DOCX template you uploaded.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/get-file-content.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=6c6e89d1772eba30eb5210e38c1cefd6" alt="Get file content" width="2880" height="1620" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/get-file-content.png" />
</Frame>

### Create an envelope

In SignatureAPI, an [Envelope](/docs/integrations/power-automate/envelopes/envelope) is a container that holds one or more documents to be sent to recipients. It defines and manages the signing process for those documents.

Start by creating the envelope in your flow:

1. Add the **Create an envelope** action from the **SignatureAPI** connector.
2. If this is your first time using the connector, you’ll be prompted to enter your SignatureAPI API key. Learn more about [authentication and connections](/docs/integrations/power-automate/authentication).
3. Set an **Envelope Title** and include a message to recipients. You can use dynamic data from earlier steps.
4. In **Advanced parameters**, set **Envelope Routing** to **Sequential**. This ensures the employer signs first, followed by the employee.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/create-envelope.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=0d821a15a8b681876cd8db9fcf7330ab" alt="Envelope routing" width="2880" height="1620" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/create-envelope.png" />
</Frame>

### Add the employer as a recipient

Add the first recipient, the **employer**.

1. Add the **Add a recipient** action from the **SignatureAPI** connector.
2. Rename the action to **Add a recipient – Employer** to keep things organized.
3. Set the **Recipient Name** and **Recipient Email** (e.g., "John Doe" and "[john.doe@example.com](mailto:john.doe@example.com)").
4. Set the **Recipient Key** field to `employer`. You’ll reference this key when assigning signature places.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/add-employer.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=e702d672add5114d2e697dc3affa9f41" alt="Add recipient employer" width="2880" height="1620" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/add-employer.png" />
</Frame>

### Add the employee as a recipient

Add the second recipient, the **employee**.

1. Add the **Add a recipient** action from the **SignatureAPI** connector.
2. Rename the action to **Add a recipient – Employee**.
3. Set the **Recipient Name** and **Recipient Email** using dynamic content from the **Get response details** step.
4. Set the **Recipient Key** field to `employee`.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/add-employee.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=334e5387988f312b23b5a9d5fc367120" alt="Add recipient employee" width="2880" height="1620" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/add-employee.png" />
</Frame>

### Add the contract template

Next, add your contract template to the envelope and populate it with employee data.

1. Add the **Add a Template – DOCX** action from the **SignatureAPI** connector.
2. In the **File Content** field, select the **File Content** output from the **Get file content using path** action (OneDrive).
3. (Optional) Set a **Document Title**.
4. Use the **Template Data** array to fill in the template fields. For each field, add a **Template Data Item** in `key: value` format.

For example, to fill the field `{{employee.first_name}}` with the value "Richard Roe", set the item as `employee.first_name: Richard Roe`.

You can use dynamic content from earlier steps to set values for each template field.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/add-template.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=d6b7ca10b3b81dc665dea905ae6c21ff" alt="Add template" width="2880" height="1620" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/add-template.png" />
</Frame>

### Add a signature place for the employer

When preparing the template, you set a placeholder `[[employer_signature]]` to indicate where in the document the employer will sign.

Now, add a **Signature place** to the document and associate this placeholder with the employer. Use the placeholder key `employer_signature` to identify the place in the document and the recipient key `employer` to identify the recipient.

1. Add **"Add a place – Signature"** action from the **SignatureAPI** connector. Rename it to **Add a place – Employer Signature** for clarity.
2. Set the **Place Key** field to the placeholder key used inside the document (without square brackets), for example, `employer_signature`.
3. Set the **Recipient Key** field to `employer`, matching the recipient key you set earlier.
4. Set the **Document ID** field to the **Document ID** from the previous **Add a Template – DOCX** action.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/add-employer-signature.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=5d4ba3d144fc7bfb62e7d55b2d4a74e5" alt="Add place employer" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/add-employer-signature.png" />
</Frame>

### Add the salary input for the employer

In a similar way, add a **Text Input Place** to link the `[[salary_input]]` placeholder in the document with the employer.

To access this value programmatically and add it to the Dataverse table later, capture this value by setting the **Capture As** field (in advanced parameters). Learn more about [captured values](/docs/integrations/power-automate/envelopes/captures).

1. Add an **Add a place – Text Input** action from the **SignatureAPI** connector. Rename it to **Add a place – Salary Input**.
2. Set the **Place Key** field to the placeholder key used inside the document (without the square brackets), for example, `salary_input`.
3. Set the **Recipient Key** field to `employer`, as before.
4. Set the **Document ID** field to the **Document ID** from the previous **Add a Template – DOCX** action.
5. To retrieve the value filled by the employer, set the **Capture As** field to `salary_input`. This allows you to retrieve this value later in the flow.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/add-salary-input.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=5fcb0420991a4ecead1c82da3abd902b" alt="Add place salary" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/add-salary-input.png" />
</Frame>

### Add a signature place for the employee

As you did for the employer, add a **Signature Place** for the employee.

1. Add **"Add a place – Signature"** action from the **SignatureAPI** connector. Rename it to **Add a place – Employee Signature** for clarity.
2. Set the **Place Key** field to the placeholder key used inside the document (without the square brackets), for example, `employee_signature`.
3. Set the **Recipient Key** field to `employee`, matching the recipient key you set for the employee.
4. Set the **Document ID** field to the **Document ID** from the previous **Add a Template – DOCX** action.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/add-employee-signature.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=cbedf8c94bf8c7348182dbfc363ae1ea" alt="Add place employee" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/add-employee-signature.png" />
</Frame>

### Start the signing process

This step indicates the envelope is ready to be sent for signing. At this point, the envelope is fully assembled and sent to recipients.

1. Add **"Start Envelope"** action from the **SignatureAPI** connector.
2. Set the **Envelope ID** field to the **Envelope ID** output of the **Create an Envelope** action.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/start-envelope.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=c45a39acdfd778e8b76db16e246ae763" alt="Start envelope" width="2880" height="1620" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/start-envelope.png" />
</Frame>

### Wait until all recipients have signed

Use the **Wait for envelope** action to pause the flow until all recipients have signed the document.

<Note>Use **Wait for envelope** only if you expect fewer than 100 pending envelopes at once, and if you expect recipients to sign soon, since Power Automate actions cannot run for more than 30 days. For more flexibility, consider the trigger [When a deliverable is generated](/docs/integrations/power-automate/guides/how-to/save-deliverables) instead.</Note>

1. Add **"Wait for envelope"** action from the **SignatureAPI** connector.
2. Set the **Envelope ID** field to the **Envelope ID** output of the **Create an Envelope** action.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/wait-envelope.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=aad3f736fb808104f535c0e58a7293ba" alt="Wait for envelope completion" width="2880" height="1620" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/wait-envelope.png" />
</Frame>

### Get the captured salary input

At this point in the flow, recipients have signed, the envelope is completed, and the deliverable (the signed document) is generated.

You can now retrieve the captured value from the salary input field the employer filled during the signing ceremony.

1. Add **Get a captured value** action from the **SignatureAPI** connector.
2. Set the **Envelope ID** field to the **Envelope ID** output of the **Create an Envelope** action.
3. In the **Capture Key** field, set the same key you used in the **Add a place – Text Input** action (in this case `salary_input`).

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/get-captured-value.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=53a9908d38e758889727466cfd929239" alt="Get captured value" width="2880" height="1620" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/get-captured-value.png" />
</Frame>

### Add a row to the Dataverse table

Now, add a row to the Dataverse table using the employee details and the captured salary amount.

1. Add **Add a new row** action from the **Micorosft Dataverse** connector.
2. In the **Table name**, select the table you created earlier (for example, **Employee Contracts**).
3. From the **Advanced parameters**, select the **Fields** to map to the employee details and the captured salary amount using dynamic content:
   * Set the **First Name**, **Last Name**, and **Email Address** from the Microsoft Forms' **Get response details** action.
   * Set the **Salary Amount** from the captured value in SignatureAPI's **Get a captured value** action.
   * Set the **Signed At** from SignatureAPI's **Wait for Envelope** action.
   <Frame>
     <img src="https://mintcdn.com/signatureapi-daf4ee54/UqiVROmDb8Tz-1YC/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/add-dataverse-row.png?fit=max&auto=format&n=UqiVROmDb8Tz-1YC&q=85&s=b98ce8c728e318a645eec673d1ab131c" alt="Add row" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/add-dataverse-row.png" />
   </Frame>

### Retrieve the signed contract

In SignatureAPI, the deliverable is a PDF containing the signed documents and the audit log. See an [example of a deliverable](/docs/integrations/power-automate/deliverables/audit-log). Retrieve the deliverable so you can save it later.

1. Add a **Get a deliverable** action from the **SignatureAPI** connector.
2. Set the **Deliverable ID** field to the **Deliverable ID** output of the previous **Wait for envelope** action.

<Warning>Use the **Deliverable ID** from the **Wait for envelope** step, not from **Create an envelope**, as the latter is always null (the deliverable is not generated yet).</Warning>

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/get-deliverable.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=feb228a4206bf6b50f21c818591d2cd8" alt="Get deliverable" width="2880" height="1620" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/get-deliverable.png" />
</Frame>

### Save the signed contract to OneDrive

Now, save the signed contract to OneDrive.

1. Add **Create File** action from the **OneDrive** connector.
2. Set the **File Name** field to your desired signed document name. You can use dynamic content from previous steps. Make sure to end it with `.pdf`.
3. Set the **File Content** field to the **File Content** output of the **Get a deliverable** action.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/save-file.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=7059577990feb6cb8b4ddacc54537711" alt="Save file" width="2880" height="1620" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/save-file.png" />
</Frame>

### Notify HR that the contract was signed

Finally, notify HR that the contract was signed and attach the signed document.

1. Add **Send an email (V2)** action from the **Outlook** connector.
2. Set the **To** field to the HR department email address.
3. Set the **Subject** and **Body** as you prefer, and use dynamic content from previous steps as needed.
4. Under **Attachments** in advanced parameters, set the attachment file name (ensure it ends with `.pdf`) and set the **Content** field to the **File Content** from the **Get a deliverable** action.

<Frame>
  <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/send-email.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=1537bc4bd872aee2b1e400f483c00400" alt="Send email" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/dataverse-flow/send-email.png" />
</Frame>

## Test Your Automation

Test the entire process end-to-end.

1. Save your Power Automate flow.
2. Submit a test response through your Microsoft Form.
3. Verify each step:
   * The form is submitted successfully.
   * The flow is triggered and the contract is sent to the employer.
   * After the employer fills the salary amount and signs, the employee receives and signs the contract.
   * A row is added to the Dataverse table with the employee details and captured salary amount.
   * The signed contract is saved in OneDrive.
   * HR receives an email notification with the signed contract attached.

## Conclusion

In this tutorial, you learned how to use SignatureAPI together with Microsoft Forms, Power Automate, OneDrive, and Dataverse to automate the employment contract process. You saw how to fill a document template, add signature and input fields, and send documents to recipients for signing.

You also learned how SignatureAPI captures additional data from recipients, tracks the status of the envelope, and provides a signed deliverable once the process is completed. The tutorial showed you how to automatically save signed contracts and employee details, streamlining your workflow.

With these steps, you can now use SignatureAPI to manage and automate other document signing processes in your organization.

## Keep Learning

* Learn about [document templates](/docs/integrations/power-automate/documents/templates).
* Learn about [other type of places](/docs/integrations/power-automate/places/place) like initials, dates, etc.
* Learn how to [customize your envelopes](/docs/integrations/power-automate/envelopes/envelope), set the language, and more.
* Learn more about [capturing signer input](/docs/integrations/power-automate/envelopes/captures).

**Happy Automating!**
