How to trigger document merge when Zoho Sheet cell changes?
Overview
Businesses can enable automatic document generation in Zoho Writer whenever data changes in specific cells or columns within a Zoho Sheet. Instead of manually performing a merge, Zoho Sheet detects changes in specific cells and triggers a Writer Merge API call automatically. This enables hands-free generation of documents such as invoices, certificates, letters, and reports based on live sheet updates.
Prerequisites
- Create a merge template in Zoho Writer and prepare the template with the fields from Zoho Sheets.
- Open the Sheet,
Go to
Tools > Custom Functions > Create Custom Function.
In the Custom Function Editor, prepare the data map with key value pair, and then invoke the necessary
Merge APIs using the connection configured with the appropriate Writer scopes.
Refer to this page for more info on creating a custom function.
Steps
Open the Sheet, Go to
Tools > VBA Macros > Create Macro, give a name and description.
- In VBA Macro Editor
- Choose Sheet 1 on the left panel
- Choose the Event "OnChange"
Configure to call the custom function created in prerequisites.
Once the script is completed, whenever cell value changes Zoho Writer document merge will be executed.
Related Articles
- How to create connections (authtoken) to run custom function?
- How to create, run and record VBA macros?