Zoho Flow custom function to get the "reason" a Zoho Sign document was declined.

Zoho Flow custom function to get the "reason" a Zoho Sign document was declined.

Hello,

I need help creating a custom function in Zoho Flow to return the "reason" a Zoho Sign document was declined.
Currently, when a Sign document is declined, the owner of the document is notified by email of the reason the document was declined, but the Signer only receives an email notification that the document was declined, with no reason. Without giving the reason their document was declined, how can a signer correct and resubmit the document?

I'm attempting to create a Flow that is triggered by a Sign document being declined, fetches the information from the document, then sends an email to the signer with the reason, the document was declined.

Sign process.
Document is sent to signer, once complete the document is forwarded to an approver who either approves or declines the document. Once the approver selects "Do not approve" they enter the reason the document was declined. 

Flow process
Trigger = Sign document declined
Decision = determine if the document is "TypeA" or "TypeB"
Fetch Document = Used to fetch email entered by the signer.
Custom Function = To fetch the "reason"
Email = Compose email to signer including the reason document was declined.

Looking through the history of the flow, the document declined trigger output is returning the following information.

	"request_status": "declined",
	"performed_by_email": "fake@mycompany.com",
	"performed_at": ##########,
	"country": "UNITED STATES",
	"reason": "Declined because I'll be amazed if this works",
	"activity": "Document has been declined",
Is it possible, using a custom function, to fetch the "reason" listed above?

Thank you in advance.

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now