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

# Automating Employment Contracts with Microsoft Forms, SignatureAPI, and Microsoft Power Automate

> Automate employment contract signing when form submissions are received in Microsoft Forms

## Overview

This tutorial shows you how to streamline the employment contract process by automatically sending, signing, and storing contracts. By integrating **Microsoft Forms** (for data collection), **OneDrive** (for storing contract templates), and the **SignatureAPI connector** (for electronic signatures), you can eliminate manual errors and delays when onboarding new employees.

### What You'll Learn

* How to trigger a flow with a new Microsoft Forms response.
* Retrieving and pre-filling a DOCX contract template from OneDrive.
* Creating and sending a signature envelope using SignatureAPI.
* Monitoring the signing process and retrieving the signed document.
* Saving the signed contract and notifying HR automatically.

### The Problem

HR departments often struggle with manually handling contracts, causing delays in onboarding. Common issues include:

* **Slow processing** that delays new hire start dates.
* **Errors** from manual data entry across multiple documents.
* **Tracking difficulty** when monitoring signing status across teams.

### How Automation Helps

Automation simplifies this process by:

* Automatically sending contracts upon form submission.
* Using templates pre-filled with employee details.
* Tracking signature status and storing documents automatically.
* Informing HR instantly once contracts are signed.

## Requirements

Before starting, make sure you have:

* **Power Automate** to build workflows.
* **SignatureAPI account** for electronic signatures.
* **Microsoft Forms** for collecting employee information.
* **OneDrive** for storing your DOCX templates.
* **Outlook** for sending notifications (other email providers also work).

## Flow Overview

The automation process follows these steps:

1. **Trigger:** Microsoft Forms submission starts the flow.
2. **Data Retrieval:** Get employee details and fetch the contract template from OneDrive.
3. **Signature Process:** Create an envelope via SignatureAPI, add recipient details, and attach the DOCX.
4. **Monitoring:** Wait for the contract to be signed.
5. **Storage & Notification:** Save the signed document in OneDrive and notify HR via email.

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

<img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/forms-flow/complete-flow.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=221eec016617568e53a9d19cf18f3982" alt="Flow" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/forms-flow/complete-flow.png" />

## Step-by-Step Tutorial

Follow these steps to automate your employment contract process using Microsoft Forms, SignatureAPI, and Power Automate:

### Step 1: Prepare the Contract Template

First, create or update your employment contract template by adding placeholders for dynamic fields (employee details) and defining where the employee will sign.

**To prepare your template:**

1. Open your existing employment contract document (DOCX format) in Microsoft Word.
2. Identify each place where employee details should be dynamically inserted (e.g., name, email).
3. Insert placeholders using **double curly brackets** around descriptive keys. Examples:

* Employee first name: `{{employee.first_name}}`
* Employee last name: `{{employee.last_name}}`
* Employee email: `{{employee.email}}`

4. Define the location for the signature clearly by inserting a signature placeholder using **double square brackets**, e.g.:  `[[employee_signature]]`

**Example placeholder usage in your document:**

> *Dear `{{employee.first_name}}` `{{employee.last_name}}`,*
> *Please review and sign your employment contract below:*
> `[[employee_signature]]`

5. Save your template and upload it to **OneDrive** (or another preferred storage service).

**Important:**

* Ensure placeholder keys match exactly with what you'll use later in Power Automate.
* Keep your template simple and clear to avoid confusion during dynamic insertion.

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

### Step 2: Create the Microsoft Form

Create a Microsoft Form to collect the necessary employee details (First Name, Last Name, Email Address).

1. Visit [Microsoft Forms](https://forms.office.com) and sign in.

2. Click **New Form**.

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

3. Name the form and add these required questions:

* **First Name** (Text, required)
* **Last Name** (Text, required)
* **Email Address** (Text, required)

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

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

4. Save and publish your form.

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

### Step 3: Set Up the Power Automate Flow

Now, create the automated workflow in Power Automate, triggered whenever a form is submitted.

#### 3.1 Configure the Trigger

Set the flow trigger to run whenever your form is submitted.

1. Go to **Power Automate** and select **Automated Cloud Flow**.

2. Choose the trigger **When a new response is submitted** (Microsoft Forms).

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

3. Select the form you created earlier.

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

#### 3.2 Retrieve Employee Details

Next, retrieve the employee details submitted through the form.

1. Add the action **Get response details**.
2. Select your form (**Form ID**) and the response (**Response ID**) from Dynamic Content.

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

#### 3.3 Retrieve Contract Template from OneDrive

Fetch your employment contract template stored in OneDrive.

1. Add **Get File Content using Path** from the OneDrive connector.
2. Select the DOCX template stored in your OneDrive.

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

### Step 4: Set Up the Signature Process

In this step, you will configure SignatureAPI to create, send, and track the signature process.

#### 4.1 Create a SignatureAPI Envelope

Begin by creating an envelope to hold your contract and signature process.

1. Add the **Create an Envelope** action (SignatureAPI connector).
2. If prompted, authenticate your connection using your SignatureAPI key from the [SignatureAPI Dashboard](https://dashboard.signatureapi.com/settings/api-keys).
3. Set an **Envelope Title** (e.g., employee name) and email message using dynamic content.

   <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/forms-flow/create-envelope.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=5c39e5d54219533801081e54a76b7c32" alt="Create envelope" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/forms-flow/create-envelope.png" />

#### 4.2 Add the Recipient

Specify who will receive and sign the contract.

1. Add the **Add Recipient** action.
2. Map **Recipient Name** and **Recipient Email** using form details (Dynamic Content).
3. Set the **Recipient Key** (e.g., `employee`), matching your DOCX placeholders.

   <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/forms-flow/add-recipient.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=1842da9b7b7065cf44b7204367bfadbc" alt="Add recipient" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/forms-flow/add-recipient.png" />

#### 4.3 Attach the DOCX Contract Template

Attach your contract template to the envelope and populate it with employee details.

1. Add the **Add a Template - DOCX** action.
2. Select **File Content** from the OneDrive action.
3. Set the **Document Title** (e.g., "Employment Contract").
4. Ensure your DOCX template uses placeholders (`{{employee.first_name}}`, etc.) and map each field to the corresponding dynamic content from your form.

   <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/forms-flow/add-docx-template.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=d977927c71c1b7d9248c6913bca06e60" alt="Add template" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/forms-flow/add-docx-template.png" />

#### 4.4 Define Signature Placement

Specify where the employee should sign on the document.

1. Add the **Add a Place - Signature** action.
2. Set the **Document ID** using dynamic content.
3. Use the placeholder (e.g., `[[employee_signature]]`) from your DOCX template.
4. Set the **Recipient Key** using dynamic content.

   <img src="https://mintcdn.com/signatureapi-daf4ee54/yHtZTKXNhyUIhAl9/docs/integrations/power-automate/guides/images/powerautomate/forms-flow/add-signature.png?fit=max&auto=format&n=yHtZTKXNhyUIhAl9&q=85&s=3e1322db5fa341056e0e226be87e8689" alt="Add signature" width="2880" height="1624" data-path="docs/integrations/power-automate/guides/images/powerautomate/forms-flow/add-signature.png" />

#### 4.5 Start the Signing Process

Send your envelope to the employee for signing.

1. Add the **Start Envelope** action.
2. Select the appropriate **Envelope ID** using dynamic content.

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

### Step 5: Monitor and Finalize the Contract

Configure your flow to wait for the signing to complete, retrieve the signed contract, and notify HR.

#### 5.1 Wait for Signature Completion

Pause the flow until the employee signs the contract.

1. Add the **Wait for Envelope Completion** action.
2. Select the correct **Envelope ID** using dynamic content.

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

#### 5.2 Retrieve the Signed Contract

Once signed, automatically retrieve the completed document.

1. Add the **Get a Deliverable** action.
2. Select the correct **Deliverable ID** using dynamic content.

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

#### 5.3 Save the Signed Contract to OneDrive

Save the signed document for record-keeping.

1. Add the **Create File** action (OneDrive connector).
2. Set the folder path and filename (ending in `.pdf`).
3. Map **File Content** from the deliverable.

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

#### 5.4 Notify HR via Email

Automatically inform HR that the contract has been signed and saved.

1. Add the **Send an Email** action (Outlook connector).
2. Configure the email recipient (HR), subject, and message.
3. Attach the signed contract file from dynamic content. Use the **File Content** from the **Get a Deliverable** action, and set the filename (ending in `.pdf`).

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

### Step 6: Test Your Automation

Finally, test the entire process end-to-end.

1. Save your Power Automate flow.
2. Submit a test response through your Microsoft Form.
3. Verify:

* Contract is sent to the employee.
* Signature process initiates correctly.
* Signed contract saves successfully in OneDrive.
* HR receives an email notification with the signed contract attached.

*Use the following checklist:*

* [ ] Contract sent successfully.
* [ ] Employee receives and signs contract.
* [ ] Signed document stored correctly in OneDrive.
* [ ] HR receives email notification with attachment.

## Troubleshooting & FAQ

### Common Issues

* **API Key Errors:** Ensure your SignatureAPI key is correct and authenticated.
* **Dynamic Content Mapping:** Double-check that placeholder names in your DOCX file match exactly with dynamic content mappings in Power Automate.
* **File Access Issues:** Verify permissions and file paths in OneDrive.

### Frequently Asked Questions

* *What if the contract is not sent?*
  Check your SignatureAPI dashboard for errors, and verify the recipient details are mapped correctly from the form response.

* *Can I adapt this for other document types?*
  Yes. This method works for any automated document-signing workflow, such as NDAs, vendor agreements, or offer letters.

* *Can I collect additional fields in Microsoft Forms and use them in my contract template?*
  Yes. Add new questions to your Microsoft Form, then insert matching placeholders (e.g., `{{employee.department}}`) in your DOCX template. In the **Add a Template - DOCX** action, map each new placeholder to the corresponding form response using Dynamic Content.

## Best Practices & Security

* Always securely manage API keys.
* Regularly check flow runs in Power Automate for any errors.
* Document any flow or template changes for future reference.

## Additional Resources

* [SignatureAPI Documentation](https://signatureapi.com/docs)
* [Microsoft Forms Help](https://support.microsoft.com/forms)
* [Power Automate Community](https://powerusers.microsoft.com/t5/Microsoft-Power-Automate/ct-p/MPACommunity)

## Conclusion

By completing this tutorial, you have successfully automated the process of sending, signing, and managing employment contracts. This workflow frees your HR team from repetitive tasks and ensures new employees have a smooth onboarding experience.

**Happy Automating!**
