web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / View custom fields wit...
Power Automate
Unanswered

View custom fields with DocuSign: When an envelope status changes (Connect) Trigger

(0) ShareShare
ReportReport
Posted on by 14

Hi,

I’m working on a flow using the DocuSign: When an envelope status changes (Connect) trigger. My goal is to file a completed document on SharePoint, after pulling the custom fields in the envelope and assigning them as metadata fields. I’ve unit tested all parts of the flow, except I’m unable to recognize custom fields. I’m following the provided example (page 4).

 

Here's what my flow looks like:a.png

 

My Docusign Template has multiple custom fields, but they are not being returned when the flow triggers:

b.PNG

 

Oddly enough, the custom fields are showing up in the trigger output for RecipientStatus > "TabStatuses":

"TabStatuses": {
 "TabStatus": [
 {
 "TabType": "FullName",
 "Status": "Signed",
 "XPosition": "144",
 "YPosition": "1192",
 "TabLabel": "Name bcd3ee67-8ff1-47b6-9b09-26e4cd59bbe1",
 "TabName": "FullName",
 "TabValue": "test",
 "DocumentID": "1",
 "PageNumber": "2"
 },
 {
 "TabType": "Title",
 "Status": "Signed",
 "XPosition": "144",
 "YPosition": "1275",
 "TabLabel": "Title 184a7b62-ebdf-4ff2-bcbd-510331c6f5de",
 "TabName": null,
 "TabValue": "test",
 "DocumentID": "1",
 "PageNumber": "2"
 },
 {
 "TabType": "Custom",
 "Status": "Signed",
 "XPosition": "146",
 "YPosition": "1533",
 "TabLabel": "NDAType",
 "TabName": "MNDA;UNDA",
 "TabValue": "MNDA",
 "DocumentID": "1",
 "PageNumber": "2",
 "OriginalValue": "MNDA",
 "ListValues": "MNDA;UNDA",
 "ListSelectedValue": "MNDA",
 "CustomTabType": "List"
 },

 I was able to pull the fields from RecipientStatus using something like: 

triggerBody()?['DocuSignEnvelopeInformation']?['EnvelopeStatus']?['RecipientStatuses']?['RecipientStatus'][0]['status']

The issue is that the trigger fires every time an envelope is completed, and the arrays aren't always in the same order and I'd need to implement some extensive error checking or lookup, which isn't easy to do in Flow...

 

Has anyone successfully used the custom fields functionality of this trigger before? If I could pull the fields in the way shown by the docusign example (linked above), this flow would be way more reliable.

 

Thanks!

Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    on at

    Hi @NordKapp,

     

    Thanks for feedback.

    The issue could be reproduced by me.

    It seems that the custom field could not return a value using the function @triggerBody()?['customFields'][Region] as suggested in the doc.

    I will help confirm it on my side and back to you later.

     

    Best regards,

    Mabel

  • NordKapp Profile Picture
    14 on at

    Mabel (@v-yamao-msft)

    Thank you for looking into this issue! I'm looking forward to hearing more. I've also submitted a ticket with DocuSign support and am waiting to hear back from them.

     

    Best,

    NordKapp

  • Community Power Platform Member Profile Picture
    on at

    Any updates?

  • NordKapp Profile Picture
    14 on at

    I have a temporary workaround that involves pulling the xml data from the trigger, parsing it, and extracting the custom properties based on that. I'm still building it into my solution and will post when i've got it all figured out. Here's a short summary of the temporary workaround:

    1. Add an invisible custom field to your template that has some kind of unique identifier for your flow.

     

    2. In Flow, pull data from trigger using: Initialize variable (array) - custom expression: triggerOutputs().body.DocuSignEnvelopeInformation.EnvelopeStatus.RecipientStatuses.RecipientStatus[0]['FormData']['xfdf']['fields']['field']

    This pulls all of the custom fields for the first recipient into an array.

    3. repeat for each docusign recipient incrementing the bolded [0]

    4. Parse JSON for each array using this schema:

    {
     "type": "object",
     "properties": {
     "@@name": {
     "type": "string"
     },
     "value": {
     "type": "
     
    5. Use switch case, or conditional statatements to find your unique custom field from step 1 and decide whether to run the flow.
     
    6. Extract your other custom fields into variables from the parsed JSON
     
    Sorry for the brevity. I'll post screenshots when my final flow is working correctly. I had to pause this project and I'm hoping to complete it by early February.
  • Community Power Platform Member Profile Picture
    on at

    Thanks for the response! 

    I'll give this a shot and let you know how it goes. 

  • Community Power Platform Member Profile Picture
    on at

    I seem to constantly be getting this error 

     

    1.PNG

  • Verified answer
    NordKapp Profile Picture
    14 on at

    Would you please post the expression in the initiailze variable step?

    Also, they gave me two options for calling the custom fields, see full ticket text below:

     

    The trigger output expression ['customFields'] refers to Envelope Custom Fields rather than Document Custom Fields. Document Custom Fields are typically referred to as "tabs" rather than "custom fields" in both DocuSign Connect and the DocuSign API. You're headed in the right direction with the RecipientStatus section. Our scope of support for Flow is limited to the out-of-the-box triggers and actions, so we wouldn't typically be able to provide guidance on how to set up the trigger output expressions. That being said, I'd be happy to share the details of two methods we've identified for pulling the information.


    Method 1: Uses the “tabs” section of the event notification 
    Works only with text fields, Full Name, and Date Signed
    x = recipient position in the Connect message, starting at 0
    your_tab_name = field data label

    triggerOutputs() .body.DocuSignEnvelopeInformation.EnvelopeStatus.RecipientStatus.RecipientStatus[x]['tabs']['your_tab_name'] 

    Method 2: Uses the "FormData" section of the event notification.
    Works with all field types
    You can specify the field data to be retrieved either with the tab label or with its position (as a numeric value) in the FormData section of the event notification-- this example uses the tab label
    x = recipient position in the Connect message, starting at 0
    your_tab_name = field data label

    triggerOutputs() .body.DocuSignEnvelopeInformation.EnvelopeStatus.RecipientStatus.RecipientStatus[x]['FormData']['xfdf']['fields']['field’]['your_tab_name']['value’]



    Note: I went about this successfully using a slightly modified version of method 2

     

    Capture.PNG

     

    First I initialized two arrays with the following expressions:

    Array 1 (Recip1Fields Array):
    triggerOutputs().body.DocuSignEnvelopeInformation.EnvelopeStatus.RecipientStatuses.RecipientStatus[0]['FormData']['xfdf']['fields']['field']
     
    Array 2 (Recip2Fields Array):
    triggerOutputs().body.DocuSignEnvelopeInformation.EnvelopeStatus.RecipientStatuses.RecipientStatus[1]['FormData']['xfdf']['fields']['field']
     
    This is because we have two senders in our template. Note that the RecipientStatus starts at zero.


    Next, I initialized string variables for each of the custom fields I intended to pull out of the two arrays.

    Finally, I parsed the JSON in a loop:

    Capture2.PNGNDAType was my hidden ID field which I used to identify the template and decide whether to run the flow. I look for it in the Recip2Fields array and continue to run the flow if it's found.

    Capture3.PNG

     

    Next I repeat the process to locate all the other custom fields I care about in the Recip1Fields Array, using nested conditions:

     Capture4.PNG

     

    Note: The parse JSON Steps both used the same sample payload:

    {
     "type": "object",
     "properties": {
     "@@name": {
     "type": "string"
     },
     "value": {
     "type": "string"
     }
     }
    }

     

    Now you have all your string variables set and you can do any error checking you need to or finish your flow.

     

    Hope this helps. If you still have questions, the Docusign folks are very good.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard