Overview
Template-based document generation in Zoho Writer allows you to automate the creation of personalized documents by connecting pre-designed templates with structured data sources such as spreadsheets, forms, CRMs, or APIs. Each template contains merge fields (placeholders) that dynamically populate with real data during generation. This enables users to produce contracts, invoices, proposals, letters, and more, at scale, without manual editing. Zoho Writer supports conditional logic, tables, and image merging, making it ideal for automating business documents efficiently and accurately.
Steps to Merge Documents in Zoho Writer
Step 1: Create or open a merge template
Design or open the merge template in Zoho Writer that will serve as your template. To create a merge template,
Click the File menu -> New Automation Template -> Merge template
Create from Scratch : to create a blank template
Create over PDF : to Mail Merge PDF Documents
Note : You can also convert your documents into a Merge Template using Automate tab -> Merge template.
Step 2: Select your data source
Access the "Automate" tab to choose your data source. Zoho Writer support data from Zoho Sheet, Zoho Forms, Zoho Creator, Zoho CRM, Zoho Books, Bigin, Zoho Projects. Select a data source from the options as shown in the image:
Step 3: Setup template with fields
To render merge fields as specific elements (like checkboxes, images, links, etc.) in Zoho Writer, you need to set the merge field types correctly while inserting them.
1. Insert Merge Fields
Add merge fields to personalize a document with information from the data source. Set the appropriate merge field type to determine how data is displayed or behaves in the final merged document.
2. Insert Advanced Merge Fields
Advanced Merge Fields enhance your merge templates by allowing you to add logic, conditions, and calculations to your documents. These fields go beyond simple placeholder replacements and enable dynamic content generation based on the structure and values of your data source.
3. Insert AutoFields
AutoFields are dynamic fields that automatically populate standard information in your document—like dates, page numbers, document metadata, or user details—without needing to manually enter them.
4. Insert Main Form Fields
A main form represents the primary record or entity in your data source. Each main form field corresponds to a unique entry (like a single person, invoice, or application). These fields pull in one-to-one data—meaning one record equals one document.
Example: If you're sending invoices, each customer name and address would come from main form fields.
A subform is a set of fields linked to the main form, designed to handle repeating data—that is, multiple entries related to a single main record. Subforms help create one-to-many relationships in your document. Subforms automatically belong to a main form and will repeat for each associated entry during the merge.
Repeat blocks usually a table row, paragraph, or group of fields — to repeat once per item in a list or subform from your data source.
Manually / On Trigger
Choose this option to run the merge manually by clicking 'Run Merge', or set up triggers in connected apps to automate the merge using a button, Deluge script, or API when specific app events occur.
- How to run merge from Zoho CRM
- How to run merge from Zoho Creator
- How to run merge from Zoho Projects
- How to run merge from Zoho Sprints
- How to run merge from Zoho Books
- How to run merge with Zoho Flow
-
On Form Submission
Automatically run the merge whenever someone submits a connected Zoho Form. You can email the generated document, let users download it, or send the data to Zoho Sheet. Learn more.
Scheduled / Date & Time
Set a specific time and date for the merge to run automatically, ideal for schedule tasks like sending reports or letters on specific date or time
-
External Trigger (via webhook)
Trigger merges programmatically via registered webhook
Select one of the available output options to proceed with the merge. Each option lets you control how the generated document is delivered, stored, or shared based on your workflow requirements.
1. Set up Simple Merge
Simple document automation is a set of prebuilt automation flows that allow you to generate documents using one template and then, store, email, send for signing, or send as fillable form. Simple merge Output options include:
2. Set up Advanced Merge
Advanced Automation Flow Builder lets you to design dynamic document workflows for complex requirements like generating (merge) documents, combining them into one, and then emailing or storing them, conditionally picking templates from a set of templates for document generation, dynamically routing the generated documents through different modes of distribution like emailing, sending for signature collection, performing post document generation actions like:
- Combining multiple generated documents into a single file before being sent for signing.
- Creating dynamic folders and storing the generated documents in them, and much more.
Step 6: Preview the merge
- Click Automate > Preview Merge to see how the document looks with actual data.
- Navigate through records to check formatting and correctness.
Step 7: Run the merge
- Click Automate > Run Merge
- How to Track Merge Progress and Handle Errors in Zoho Writer
Troubleshooting
Problem : In CRM Email merge template to send to a contact that includes the details of a Deal and I'd like to include the Product that's been added to the deal, but Product doesn't seem to be an option in the list of Merge Fields.
Cause : It is not possible to fetch the fields from products within contacts and you must have a custom lookup field added.
Solution: Creating a subform in the Deals module and list down the Products. You can also write a custom function to pull the details of the Product to fields within the Contacts/Deals module to include it in the email template.
Related Articles On
Merge Status & Control