DocuSign Envelope to Dataverse and SharePoint
When a DocuSign envelope is completed, the flow extracts the signed document and form-field values, stores the PDF in SharePoint, records the agreement and key fields in Dataverse, and notifies the owner in Teams. Turns completed DocuSign signatures into governed records automatically.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow turns completed DocuSign signatures into governed records automatically. On a daily schedule it polls DocuSign for envelopes that reached Completed status, downloads the combined signed PDF, reads the envelope's form-field (tab) values, archives the PDF to a SharePoint document library, records the agreement and key metadata in a Dataverse table, and notifies the owner in Microsoft Teams.
Why it matters: signed agreements often live only inside DocuSign. Capturing the PDF and structured metadata in SharePoint + Dataverse makes them searchable, reportable, and retained - without manual filing.
Ships Off (demo).
Use Case
A finance or operations team that signs agreements through DocuSign wants every completed envelope filed and logged the moment it is signed - the PDF archived to SharePoint, the metadata captured in Dataverse for reporting, and the owner notified in Teams.
Flow Architecture
Daily Recurrence
RecurrenceRuns once per day (built on the supported SearchListEnvelopes poll rather than the untyped webhook trigger).
Initialize Trace & Config
Initialize variableMints a guid() correlation id and binds the DocuSign account, SharePoint site + library, Teams group/channel, and lookback days; composes the from-date filter.
Search Completed Envelopes
DocuSign - SearchListEnvelopesLists envelopes with status Completed within the window (top 50).
For Each Envelope
Apply to eachGets the combined signed PDF (GetDocumentsV2) and the form-field values (GetEnvelopeDocumentFields), stores the PDF to the SharePoint library, records the agreement + metadata in Dataverse, and posts an HTML summary to Teams.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_DocuSignAccountId | String | 00000000-0000-0000-0000-000000000000 | DocuSign account GUID used as accountId on all DocuSign actions. |
| flowlibs_SharePointSiteURL | String | https://your-tenant.sharepoint.com | SharePoint site that hosts the agreement library. |
| flowlibs_AgreementLibrary | String | /Shared Documents | Server-relative path of the document library where signed PDFs are archived. |
| flowlibs_TeamsGroupId | String | <your-team-id> | Teams group (team) ID for the owner notification. |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Teams channel ID where the notification is posted. |
| flowlibs_LookbackDays | String | 7 | How many days back to search for completed envelopes. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| DocuSign | shared_docusign | SearchListEnvelopes GetDocumentsV2 GetEnvelopeDocumentFields |
| SharePoint | shared_sharepointonline | CreateFile |
| Microsoft Dataverse | shared_commondataserviceforapps | CreateRecord |
| Microsoft Teams | shared_teams | PostMessageToConversation |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Schedule / trigger
- Change the recurrence, or swap to the DocuSign CreateHookEnvelopeV3 webhook trigger for near-real-time processing.
- Library & metadata
- Point the library env var at any library; add columns and set them from the form-field values returned by Get Form Field Values.
- Field mapping
- Extend Record Agreement In Dataverse to write specific DocuSign tab values into new columns.
- Filtering
- Adjust the lookback days, or add recipientEmailId / envelopeTitle / customFieldName filters to the search.
- Downstream
- Trigger provisioning or approval flows off the new Dataverse record.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01From-date filter
Lower bound for the completed-envelope search.
EXPR.02PDF file name
Names the archived PDF by title + envelope id.
EXPR.03Completed date (fallback)
Completed timestamp with a fallback.
EXPR.04Archived SharePoint URL
The link to the archived PDF for the record + notification.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.