How to Create New Custom Functions using Deluge in Zoho Writer?

How to Create New Custom Functions using Deluge in Zoho Writer?

Overview

Custom functions are useful when a series of actions are to be executed after the document is merged, filled or signed, allowing you to automate custom workflows involving Zoho Writer Documents.

Custom Workflow Use Case

For example, after a quote document is merged in CRM, the custom function should:
  • Store the document in WorkDrive
  • Send it to the client via email
  • Update the send mail status at the CRM record level
Sample Script

Steps

Step 1: Open Deluge Editor

Open the Deluge Editor from your document or template. The Deluge editor can be accessed from all three automation templates in Zoho Writer—fillable, merge, and sign templates.
  • For Merge Templates: Choose the required Merge Output Option > Enable Execute Custom Function > Click Configure

  1. For Fillable Templates: Under On Submission, choose Trigger Webhook and Custom Function
  2. For Sign Templates: Go to Send for Sign > Enable Execute Custom Function > Click Configure
Step 2: Create a New Function
  • Use the Deluge script editor to write your custom logic.
  • Save the function for use in automation workflows.


Additional Notes

Built-in Functions in Deluge

Deluge provides many built-in functions to perform common operations like mathematical calculations, text manipulation, etc. These simplify coding tasks. Learn More

Writer Tasks in Deluge

Zoho Writer Integration Tasks are predefined actions that let you:
  • Merge templates
  • Store files
  • Trigger e-sign workflows
  • Connect to external systems
Learn More about Writer Deluge Tasks

InvokeURL Task to Call REST APIs

Deluge allows REST API calls using the invokeUrl task. For example, you can use it to push a document to Google Drive (since there's no native Google Drive task like WorkDrive).

See Examples for using invokeUrl in Deluge