How to Set Up Custom Workflows with Deluge Script in Zoho Writer?

How to Set Up Custom Workflows with Deluge Script in Zoho Writer?

Overview

Custom Functions in Zoho Writer allow you to add automation, logic, and integrations to document workflows. Using Deluge scripts, you can program actions to occur immediately after a document is merged, filled, signed, PDF combined or when a workflow is completed.

Where can custom functions be used in automation?

You can execute a custom function in Zoho Writer at various stages of a document workflow:
  • After the merge is complete
  • After the merged document is stored
  • After a user submits a fillable document
  • Once the document signing process is complete
These trigger points allow you to automate follow-up actions such as storing files, updating records, notifying stakeholders, or integrating with other apps and services.

Prerequisites (while using API)

Before using Merge and Email, Merge and Sign, Sign, or Combine and Store APIs, ensure you access the 'Automate' panel from the Writer UI at least once before sending the API request.

Steps to Configure Custom Actions

Step 1: Open Deluge Editor
  • For Merge Templates: Choose the required Merge Output Option > Select Configure Execute Function to open the Deluge editor.

  1. For Fillable Templates: Under "On Submission", choose Trigger Webhook and Custom Function.
  1. For Sign Templates: Select Send for Sign > Enable Execute Custom Function > Configure.

Step 2: Choose or Create a Function
  • Create a new custom function using Deluge scripting.

  1. Or, use a prebuilt function from the gallery

Step 3: Create a Connection

Connections are used to authenticate requests sent to external services and can be integrated into Custom Functions in Zoho Writer. They enable you to retrieve data from other services directly into your document workflows.

To use a connection in a custom function:
  1. You must create the connection that links Zoho Writer with the external service.
  2. Then, write a custom function that uses this connection to fetch or send data as needed.
To know how to create a connection, refer to this help link.

Step 4: Save & Link the Function
  • After writing the Deluge script, click Save & Link to associate the function with the relevant output event (e.g., After Merge).

Limitations of Deluge Custom Functions

Limitation
Description
Execution Timeout

Max 5 minutes per function execution.
Max 40 seconds per invoke url task.

File handling size
Max upto 20MB
Recursive Calls

Recursion is not supported.

No Multi-threading

Scripts run sequentially; parallel execution isn't allowed.

Frequently Asked Queries

1. Can I execute Custom Functions on templates/documents shared with me?
Yes. The function executes using the creator's authorization and access rights.

2. How to create a dynamic table and pull subform records using Deluge?
Refer to
this article for details on handling subform data.

3. Can I trigger a Deluge function after an approval workflow is completed?
Yes. In your merge template, choose
Merge > Send for Approval, enable Execute Custom Function, and configure it to move the document to Zoho Contracts.

4. How can I attach a merged document to a CRM record?
Use
Merge & Store > After Merge > Execute Custom Function and configure using the Attach to CRM Record gallery function.

Troubleshooting

Error/Symptom

Possible Cause

Recommended Solution

Error R6000 during merge

Syntax error in Deluge script

Use colon instead of comma when mapping merge_data.
Example: merge_values.put("merge_data", {"data": mp});
Refer to this article for error details.

Images from Inventory not showing

Inventory image URL not accessible

Upload image to WorkDrive via Deluge, get public URL, and use that in merge field.
Refer to this article for more details.
Error R3000 when merging and saving to WorkDrive

Missing scope

Include WorkDrive.files.ALL for WorkDrive folders in OAuth scopes



        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 FormsEnterpriseOnline Data Collection Tool
                                Embeddable FormsBankingBegin Data Collection
                                Interactive FormsWorkplaceData Collection App
                                CRM FormsCustomer ServiceAccessible Forms
                                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

                                Intake FormsLegal
                                Mobile App
                                Form DesignerHR
                                Mobile Forms
                                Card FormsFoodOffline Forms
                                Assign FormsPhotographyMobile Forms Features
                                Translate FormsReal EstateKiosk in Mobile Forms
                                Electronic Forms
                                Drag & drop form builder

                                Notification Emails for FormsAlternativesSecurity & Compliance
                                Holiday FormsGoogle Forms alternative GDPR
                                Form to PDFJotform alternativeHIPAA Forms
                                Email FormsFormstack alternativeEncrypted Forms

                                Wufoo alternativeSecure Forms

                                TypeformWCAG


                                      All-in-one knowledge management and training platform for your employees and customers.

                                                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


                                                                        • Desk Community Learning Series


                                                                        • Digest


                                                                        • Functions


                                                                        • Meetups


                                                                        • Kbase


                                                                        • Resources


                                                                        • Glossary


                                                                        • Desk Marketplace


                                                                        • MVP Corner


                                                                        • Word of the Day


                                                                        • Ask the Experts


                                                                          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

                                                                                                                                  • Configure workflow in Zoho Books with Writer's mail merge

                                                                                                                                    Overview Use Zoho Writer with Zoho Books to create branded PDFs and automate document generation from your Books data. You can either use the Zoho Writer Templates extension in Zoho Books for one‑click document generation, or configure ...
                                                                                                                                  • Configure workflow in Zoho Sprints with Writer's mail merge

                                                                                                                                    The integration between Zoho Sprints and Zoho Writer simplifies the process of document generation, making it more efficient for teams managing projects. By utilizing template functions, you can create dynamic document templates that pull in data ...
                                                                                                                                  • How to Create a Connection via Deluge in Zoho Writer?

                                                                                                                                    Overview Deluge connections in Zoho Writer allow you to securely integrate external services using authentication protocols. These connections can be leveraged in custom functions to retrieve or send data across platforms, enabling powerful ...
                                                                                                                                  • How to Configure Document Workflows in Zoho Writer

                                                                                                                                    Overview Zoho Writer’s Document Workflows streamline how documents are reviewed and approved within your team. Workflow Types: Review Workflow – Collect peer feedback. Approval Workflow – Obtain formal sign-off. Review + Approval Workflow – ...
                                                                                                                                  • What are the limits in document automation in Writer

                                                                                                                                    Ask AI to explain this: ChatGPT | Perplexity | Claude Overview The below table shows the document automation limits in Writer and their respective eligibility for increase or decrease via add-ons. Feature Limit Template and Document Generation Limits ...
                                                                                                                                    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