Showing results for 
Search instead for 
Did you mean: 

Integrating Microsoft flow with DocuSign Rest API

Integrating Microsoft flow with DocuSign Rest API

Creating a DocuSign Envelope with document uploaded to document library is not straight process, we need to under go many steps. DocuSign connectors has lot of limitations. In this article I will show you how to create and send DocuSign Envelope with Document uploaded to Document Library &  dynamic content in Microsoft Flow.


Step 1:

Here I am using Item Created or Modified trigger on Document Library, Yes List trigger on Document library. (If You don’t find the document library just paste the document library name in the list name field)


Step 2:

Now add “Get file content” SharePoint Action


Dynamic content: File name with extension from when item created

Step 3:

Create a file in One drive in root folder with the file content from above step 2



Dynamic content:

  1. File name with extension from when item created.
  2. File content from Get file Action.


Step 4:


Dynamic content:

  1. ID from create file one drive
  2. Target type: “PDF”

You can skip step 3 & 4 if you have PDF conversion connector license. But in our case word document is uploaded in to document library and in some cases, they are using content types to create word documents in the document library.


Step 5:

Now PDF document is created at OneDrive in previous step, copy that file back to temp Folder in the same document library or different one.


Dynamic content:

  1. Name (When item is created or modified)
  2. File content (convert file)


Step 6:

Now PDF file is copied to Temp Location in SharePoint. Get that file content using get file content using path action


Dynamic content:

  1. Name (When item is created or modified) (.pdf is added manually)

Step 7:

Most Important step in this entire process, add compose action to convert File content Binary into Base64



Dynamic content:

  1. File content from Get file content using path in step 6

Step 8:

Now its time to push this document in to DocuSign using Rest API, Add Http action like this

Note: Here I am Using Dev Environment.


  1. Name (When item is created or modified)
  2. Output (Compose Action Output) Bytes in Base64
  3. Email & Name (I am using Item created by Name & Email)



Here i am mapping all the dynamic content from Flow and Sharepoint into JSON Body, This will directly send the email to the recipients. if you want to change it like save it in drafts just change the status to "Created" instead of Sent


Here i am Placing Signature & Date Tabs in Page 2 Right corner mage changes acording to that 

Please refer 

Adding Tabs to Envelopes


  "emailSubject": "Docusign REST API Integration with Flow",
  "emailBlurb": "Docusign REST API Integration with Flow",
  "status": "sent",
  "documents": [
      "documentId": "1",
      "name": "yourfilename.pdf",
      "documentBase64": "Replace_compose_output_here"
  "recipients": {
    "signers": [
        "email": "Replace_dynamic_email",
        "name": "Replace_Dynamic_Name",
        "recipientId": "1",
        "tabs": {
          "signHereTabs": [
              "xPosition": "490",
              "yPosition": "706",
              "documentId": "1",
              "required": "true",
              "pageNumber": "2"
          "dateSignedTabs": [
              "tabLabel": "todaysDate",
              "xPosition": "483",
              "yPosition": "765",
              "documentId": "1",
              "pageNumber": "2"

Some Ideas !!


  • You can Make use of content type based Documents and Populate Tabs on the doucment when it is saved 
  • Use AutoPlace Feature to replace your text fields with Docusign Tabs.
  • Using the auto-place feature (also called anchor-tagging) you can specify the location of your tabs based on content or "markers" contained within your documents.
  • "tabs": {
        "signHereTabs": [{
            "anchorString": "Please Sign Here:",
            "anchorXOffset": "1",
            "anchorYOffset": "0",
            "anchorIgnoreIfNotPresent": "false",
            "anchorUnits": "inches"
  • After Creating Envelope in Drafts, we can parse response and get the Envelope ID and based on our custom logic we can add recipients dynamically from REST API.


Status: New
Advocate IV

Hello can you share the template created?


Thank you,


New Member

Please let me know if providing the password in the header is a security issue?

If so, how to overcome it. (detailed steps will be really helpful)


I was not able to get the encrypted password (

New Member



Thanks for the content, it is very helpful for me as a beginner. I got the flow to run but..

The application i created in Docusign Demo states that OAuth is required for moving it to production.

A way to do this that i found in some videos is to create a custom connector with OAuth for each API - that seems a bit not the ideal solution - i´d rather work with flows like this one using the APIs directly via HTTP.


I got to check how this should work and did all the steps in Postman successfully, however its not clear to me how to make this work in Power Automate - does anyone have some info or know some how-to guide for this?



Regular Visitor
As few people mentioned here - Beginning August 16th, 2021, your apps will need to use OAuth 2.0 to pass go-live review. In September 2022 DocuSign will require all apps that use the DocuSign APIs to use OAuth 2.0. 
Can you provide any details how can we send envelop using this? I watched few videos but all uses browser to get the code that is send for authentication token. The issue is how to get that part in flow?