Skip to main content

Overview

This tutorial shows you how to automate employment contract signing by sending contracts via SMS with Twilio when a new SharePoint List item is created. By integrating SharePoint List (for storing employee details), the SignatureAPI connector (for electronic signatures), Twilio (for sending SMS with the signing link), Outlook (for notifying HR when the contract is signed), and Power Automate (for orchestrating the workflow), you can eliminate manual errors and reduce delays in onboarding new employees.

What You’ll Learn

  • How to trigger a flow when a new SharePoint List item is created.
  • How to retrieve and pre-fill a DOCX contract template with employee details.
  • How to create and send a signature envelope via SMS using SignatureAPI and Twilio.
  • How to monitor the signing process and retrieve the signed document.
  • How to save the signed contract and notify HR automatically.

The Problem

HR departments often struggle with manually handling contracts, causing delays in onboarding. Common issues include:
  • Slow processing: Manual tasks create bottlenecks.
  • Errors: Mistakes from manual data entry.
  • Tracking difficulty: Challenges in monitoring signing status.

How Automation Helps

Automation simplifies this process by:
  • Automatically sending contracts to employees via SMS.
  • 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 for building workflows.
  • SignatureAPI account for electronic signatures.
  • Twilio account for sending SMS (make sure you have a phone number that can send SMS).
  • SharePoint List for storing employee details.
  • Outlook for sending notifications (other email providers also work).

Flow Overview

The automation process follows these steps:
  1. Trigger: A new SharePoint List item starts the flow.
  2. Data Retrieval: Get employee details and fetch the contract template from SharePoint.
  3. Signature Process: Create an envelope via SignatureAPI, add recipient details, and attach the contract template.
  4. SMS Delivery: Create a ceremony when the recipient is released, then send an SMS with the signing link via Twilio.
  5. Monitoring: Wait for the contract to be signed.
  6. Storage and Notification: Save the signed document in SharePoint and notify HR via email.
This use case has three flows:
  1. SharePoint List flow
Sharepoint List flow
  1. Send SMS flow
Send SMS flow
  1. Monitoring flow
Monitoring flow

Step-by-Step Tutorial

Follow these steps to automate your employment contract process using SharePoint List, SignatureAPI, Twilio, 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., first name, last 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}}
  1. 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]]
  1. Save your template.
Ensure placeholder keys match exactly with what you will use later in Power Automate. Keep your template simple and clear to avoid confusion during dynamic insertion.
Word Template Example

Step 2: Create the SharePoint List

Create a SharePoint List to store employee details.
  1. Visit Microsoft Lists and sign in.
  2. Click New List, then click Blank List. New List
  3. Rename the list and save it to the SharePoint Site. Rename List
  4. Add the following columns:
  • First Name (Text)
  • Last Name (Text)
  • Email Address (Text)
  • Phone (Text)
  • RecipientId (Text) Add Columns Add Columns
  1. Save and publish the list. Save List

Step 3: Set Up the Power Automate Flow

Now, create the automated workflow in Power Automate. This flow triggers whenever a new item is added to the SharePoint List.

3.1 Configure the Trigger

  1. Go to Power Automate and select Automated Cloud Flow.
  2. Name your flow, select When an item is created from the SharePoint connector, then click Create. Trigger
  3. Select the Site Address and the list you created earlier. Select List

3.2 Get File Content

  1. Add the Get file content using path action from the SharePoint connector.
  2. Select the document from SharePoint Documents. Get file content

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.
  3. Set an Envelope Title (e.g., employee first name) and a message using dynamic content.
  4. From the advanced options, set the Envelope Topics to twilio_agreement. This allows you to filter the other flows by this topic. You can use any string you want. Create envelope

4.2 Add the Recipient

Next, specify who will receive and sign the contract.
  1. Add the Add Recipient action from the SignatureAPI connector.
  2. Map Recipient Name and Recipient Email using dynamic content from the SharePoint List item.
  3. Set the Recipient Key (e.g., employee), matching your DOCX placeholders.
  4. From the advanced options, set Recipient Ceremony Creation to manual. This allows you to create a ceremony later in the flow. Add recipient

4.3 Update the SharePoint List Item with the Recipient ID

  1. Add the Update item action from the SharePoint connector.
  2. Select the Site Address and the list you created earlier.
  3. Select the Item ID from the previous step with dynamic content.
  4. Set the RecipientID to the RecipientID from the Add Recipient action. Update item

4.4 Attach the DOCX Contract Template

Now, 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 Get file content using path action.
  3. Select the Envelope ID from the Create an Envelope action.
  4. Set the Document Title (e.g., “Employment Contract”).
  5. Ensure your DOCX template uses placeholders ({{employee.first_name}}, etc.) and map each field to the corresponding dynamic content. Add template

4.5 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. Add signature

4.6 Start the Signing Process

Trigger the sending of your envelope to the employee for signing.
  1. Add the Start Envelope action from the SignatureAPI connector.
  2. Select the appropriate Envelope ID using dynamic content. Start envelope

Step 5: Create the Ceremony and Send SMS

Create a second Power Automate flow that triggers whenever a recipient is released from the SignatureAPI connector.

5.1 Configure the Trigger

  1. Go to Power Automate and select Automated Cloud Flow.
  2. Select When a recipient is released from the SignatureAPI connector. Trigger

5.2 Filter by Envelope Topic

  1. In the trigger, set Topics to twilio_agreement. This ensures the flow only runs for envelopes created with this topic. Filter array

5.3 Get SharePoint List Items by Recipient ID

  1. Add the Get Items action from the SharePoint connector.
  2. Select the Site Address and the list you created earlier.
  3. From the advanced options, set the Filter Query to RecipientId eq 'Recipient ID' (where Recipient ID is the value from the trigger’s dynamic content). Also set the Top Count to 1. Get items

5.4 Get Item by ID

  1. Add the Get Item action from the SharePoint connector.
  2. Select the Site Address and the list you created earlier.
  3. In the Id field, insert an expression to get the Item ID from the previous step. Use this expression:
    first(body('Get_items')?['value'])?['ID']
    
    Get item

5.5 Create Ceremony

  1. Add the Create a ceremony (Custom Authentication) action from the SignatureAPI connector.
  2. In the Authentication Provider field, set the name of the SharePoint list you are using (e.g., “Super App Tutorial”).
  3. In the Authentication Data, add the following fields:
    • Authentication Method: SMS
    • Phone Number: The recipient’s phone number (selected from the SharePoint List item via dynamic content)
  4. Set the Recipient ID from the dynamic content. Create ceremony

5.6 Send SMS

  1. Add the Send Text Message (SMS) action from the Twilio connector.
  2. Set From to your Twilio phone number.
  3. Set To to the recipient’s phone number.
  4. Set Message to include the ceremony URL from the dynamic content. Send SMS

Step 6: Monitor and Finalize the Contract

Create a third Power Automate flow that triggers whenever a deliverable is generated from the SignatureAPI connector. This flow retrieves the signed contract, saves it to SharePoint, and notifies HR.

6.1 Configure the Trigger

  1. Go to Power Automate and select Automated Cloud Flow.
  2. Select When a deliverable is generated from the SignatureAPI connector. Trigger

6.2 Filter by Envelope Topic

  1. In the trigger, set Topics to twilio_agreement. This ensures the flow only runs for envelopes created with this topic. Filter array

6.3 Retrieve the Signed Contract

Once the contract is signed, automatically retrieve the completed document.
  1. Add the Get a Deliverable action from the SignatureAPI connector.
  2. Select the correct Deliverable ID using dynamic content. Get deliverable

6.4 Save the Signed Contract to SharePoint

Save the signed document for record-keeping.
  1. Add the Create File action (SharePoint connector).
  2. Select the Site Address and Folder Path.
  3. Set the File Name (ending in .pdf).
  4. Map File Content from the deliverable. Save file

6.5 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). Send email

Step 7: Test Your Automation

Finally, test the entire process end-to-end.
  1. Save all three Power Automate flows.
  2. Create a new item in the SharePoint List.
  3. Verify the following:
  • The ceremony is created successfully.
  • The SMS is sent to the employee.
  • The employee receives the SMS and signs the contract.
  • The signed contract saves successfully in SharePoint.
  • HR receives an email notification with the signed contract attached.
Use the following checklist:
  • Ceremony is created successfully.
  • SMS is sent to the employee.
  • Employee receives the SMS and signs the contract.
  • Signed document stored correctly in SharePoint.
  • 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 the dynamic content mappings in Power Automate.
  • File Access Issues: Verify permissions and file paths in SharePoint.
  • SMS Not Received: Confirm your Twilio phone number is SMS-enabled and the recipient’s phone number is in the correct format.
  • Ceremony Not Created: Verify that the Recipient Ceremony Creation is set to manual in the Add Recipient action, and that the recipient ID is correctly stored in the SharePoint List.

Additional Resources

Conclusion

By completing this tutorial, you have successfully automated the process of sending contracts for signature via SMS using Twilio, SignatureAPI, and Power Automate. This workflow ensures employees receive signing links directly on their phones, speeding up the contract process. Happy Automating!