How to add attachments alone to the contact from which the document was sent?

How to add attachments alone to the contact from which the document was sent?

Scenario: I send the documents to Zoho Sign using the 'Send with Zoho Sign' button on the Contacts view page. Once the document is sent for signing, the document details and the attachments are added to the 'Zoho Sign Documents' module. I want the attachments alone to be added to the contact from which the document was sent. Can I do this using a workflow in CRM?
This code will attach the signed document to the record from which it was triggered. For example if you have sent from record 'A' in module 'XYZ', then the signed document will be added to this record 'A'.
  1. Open ZohoCRM page, then navigate to Setup -> Customization -> Workflow rules. Create a new Workflow for the Zoho Sign Documents module.
  2. 'On a record action' -> 'Edit'
  3. Click the checkbox for Repeat this workflow whenever a Zoho Sign documents is edited.
  4. Select 'Specific field(s) gets modified'
  5. When 'Document Status' is modified to 'the value' as Signed.
  6. For the condition'Which Zoho Sign documents would you like to apply the rule to?', select the value as All Zoho Sign Documents.
                                -->Click Next.
                                -->In the list of action, select function
  7. Select the value Create your own function.
  8. Name the function and create it.
  9. Edit the arguments in the function.
  10. Add the key name as 'requestId', in the value type in # and select 'Zoho Sign Documents' module with fields as 'Zoho Sign Document Id'.
  11. Use the below code in the function and replace your Zoho Sign connection name.
  12. For Creating connection -> Go to Setup -> Developer Space -> Connections -> Create new Connection -> Select 'Zoho OAuth' -> give connection name here -> Use the same 'Connection Link Name' in the function.
  13. Select the following scopes --> Zoho Sign.account.ALL, Zoho Sign.documents.ALL, Zoho Sign.setup.READ, Zoho Sign.templates.ALL
  14. Click Create and Connect.
  15. Save the function and the workflow rules.
  1. response = invokeurl
  2. [
  3.   url :"https://sign.zoho.com/api/v1/requests/" + requestId
  4.  type :GET
  5.  connection:"Use Connection Name here"
  6. ];
  7. requestObj = response.get("requests");
  8. info requestObj;
  9. if(requestObj.containKey("request_status"))
  10. {
  11.  reqStatus = requestObj.get("request_status");
  12.  info reqStatus;
  13.  if(reqStatus.equals("completed") || reqStatus.equals("expired") || reqStatus.equals("declined") || reqStatus.equals("recalled"))
  14.  {
  15.   requestId = requestObj.get("request_id");
  16.   actions = requestObj.get("actions");
  17.   document_ids = requestObj.get("document_ids");
  18.   email = "";
  19.   order = 1000;
  20.   for each  action in actions
  21.   {
  22.    if(action.get("action_type").equals("SIGN") && action.get("signing_order") < order)
  23.    {
  24.     order = action.get("signing_order");
  25.     email = action.get("recipient_email");
  26.     records = zoho.crm.searchRecords("Custom_Module_Name","(Email:equals:" + email + ")");
  27.     if(records.size() > 0)
  28.     {
  29.      leadid = records.get(0).get("id");
  30.      for each  document in document_ids
  31.      {
  32.       document_id = document.get("document_id");
  33.       fileResponse = invokeurl
  34.       [
  35.        url :"https://sign.zoho.com/api/v1/requests/" + requestId + "/documents/" + document_id + "/pdf"
  36.        type :GET
  37.        connection:"Use Connection Name here"
  38.       ];
  39.       zoho.crm.attachFile("Custom_Module_Name",leadid,fileResponse);
  40.      }
  41.      fileResponse = invokeurl
  42.      [
  43.       url :"https://sign.zoho.com/api/v1/requests/" + requestId + "/completioncertificate"
  44.       type :GET
  45.       connection:"Use Connection Name here"
  46.      ];
  47.      zoho.crm.attachFile("Custom_Module_Name",leadid,fileResponse);
  48.     }
  49.    }
  50.    break;
  51.   }
  52.  }
  53. }


      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          Zoho CRM Training Programs

          Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

          Zoho CRM Training
            Redefine the way you work
            with Zoho Workplace

              Zoho DataPrep Personalized Demo

              If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

              Zoho CRM Training

                Create, share, and deliver

                beautiful slides from anywhere.

                Get Started Now


                  Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                  BOOK A SESSION







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsRetailOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceForms for Solopreneurs
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit
                              Forms for Government
                              Intake FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic FormsInsurance
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsWufoo alternativeEncrypted Forms
                              Accessible FormsTypeform alternativeSecure Forms

                              WCAG

                                          Create. Review. Publish.

                                          Write, edit, collaborate on, and publish documents to different content management platforms.

                                          Get Started Now






                                                            You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                                Manage your brands on social media

                                                                  Use cases

                                                                  Make the most of Zoho Desk with the use cases.

                                                                   
                                                                    

                                                                  eBooks

                                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                                                   
                                                                    

                                                                  Videos

                                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                                                   
                                                                    

                                                                  Webinar

                                                                  Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                                   
                                                                    
                                                                  • Desk Community Learning Series


                                                                  • Meetups


                                                                  • Ask the Experts


                                                                  • Kbase


                                                                  • Resources


                                                                  • Glossary


                                                                  • Desk Marketplace


                                                                  • MVP Corner



                                                                    Zoho Sheet Resources

                                                                     

                                                                        Zoho Forms Resources


                                                                          Secure your business
                                                                          communication with Zoho Mail


                                                                          Mail on the move with
                                                                          Zoho Mail mobile application

                                                                            Stay on top of your schedule
                                                                            at all times


                                                                            Carry your calendar with you
                                                                            Anytime, anywhere




                                                                                  Zoho Sign Resources

                                                                                    Sign, Paperless!

                                                                                    Sign and send business documents on the go!

                                                                                    Get Started Now




                                                                                            Zoho TeamInbox Resources





                                                                                                      Zoho DataPrep Demo

                                                                                                      Get a personalized demo or POC

                                                                                                      REGISTER NOW


                                                                                                        Design. Discuss. Deliver.

                                                                                                        Create visually engaging stories with Zoho Show.

                                                                                                        Get Started Now










                                                                                                                            • Related Articles

                                                                                                                            • Document creation in Zoho Sign

                                                                                                                              Available in all plans and in all data centers Document creation in Zoho Sign allows users to draft or generate documents using AI without having to switch between applications. Let us assume you are a sales executive who wants a customised proposal ...
                                                                                                                            • How do I set up a callback function in CRM to add Zoho Sign document details?

                                                                                                                              Scenario: I have set up an automation in ZohoCRM to send documents to Zoho Sign. Each time I want to view the documents, I need to view them at Zoho Sign. It is difficult to view the document status this way. Can I set up a callback function in CRM ...
                                                                                                                            • Document ID

                                                                                                                              You can choose to include a unique Document ID in your documents that were sent out for signatures, if required. How to insert Document ID in documents Click Settings in the left navigation panel. Choose Account settings. Choose Sending options from ...
                                                                                                                            • Document completion

                                                                                                                              Once the document signature process has been completed, the sender can control who will receive email notifications with a signed copy and certificate of completion. How to control who receives email notifications upon document completion Click ...
                                                                                                                            • How to change the ownership of the document to an admin, irrespective of who sent the document?

                                                                                                                              Scenario: I have set up a workflow/automation in CRM to send documents to Zoho Sign. When the document is sent, the user who triggers the workflow will eventually be the owner of the document. I want to change the owner of the document to an admin, ...
                                                                                                                              Wherever you are is as good as
                                                                                                                              your workplace

                                                                                                                                Resources

                                                                                                                                Videos

                                                                                                                                Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                                eBooks

                                                                                                                                Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                                Webinars

                                                                                                                                Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                                CRM Tips

                                                                                                                                Make the most of Zoho CRM with these useful tips.



                                                                                                                                  Zoho Show Resources