Creating workflow rules in Zoho CRM with Writer's mail merge tasks

Creating workflow rules in Zoho CRM with Writer's mail merge tasks

You can automate your Writer's mail merge tasks by creating Workflow rules in your Zoho CRM. Say, for example, you want to automate the merge and send task for every lead entry in your Zoho CRM account (merge every lead entry send an email notification to that lead automatically using workflow rules). The zoho.writer.mergeAndSend task will supply values to the merge fields inserted to a document, and send these merged documents individually to the email ID specified.
You need a Zoho CRM account with manage workflow permission to create a workflow rule and associate it with a custom function.

Let's see the steps in detail: 

Step 1: Create mail merge template in Zoho CRM

Before you get started, create a mail merge template with the required text and graphics. You can create mail merge templates in Zoho Writer and use CRM data (Leads, Accounts, Contacts, and Potentials) to create mail merge documents.
You can also create mail merge templates right inside Zoho CRM. Click here for detailed steps.

Step 2: Create a workflow in Zoho CRM

Workflow Rules in Zoho CRM, are a set of actions including email notifications, and field updates that are executed when specific conditions are met. You can create a workflow rule and set an action to automate Writer's Mail Merge Tasks. (Merge and email, merge and download, merge and store)
Click here for detailed steps on how to create a workflow rule in Zoho CRM and associate custom function as an instant action.

Once you chose custom function as an instant action, do the following:

  1. You need to write a new custom function in the Deluge script editor and associate with the Workflow rule to automate Writer's mail merge tasks.
  2. Choose "Write your own" option from the Configure Function pop-up. 
  3. In the following Create new function pop-up, enter a function name, display name, and select the module to associate the custom function. Click Next
  4. Now start writing your custom function in the Deluge script editor. Click here to find the steps to programming custom functions in the Deluge script editor.

Write your own custom function

You're creating a workflow rule to automate Writer's mail merge tasks including "Merge and Send", "Merge and Download", and "Merge and send for sign".
Click here to know more about the available Writer tasks.

Merge and Send

To merge a CRM record data with merge fields and send email automatically.
<response> = zoho.writer.mergeAndSend(<document_id>, <output_format>, <email_id>, <values_map>, <connection>);
A sample script to "Merge and send" task is shown in the screen below:

Merge and Store

To merge CRM record data and save the merge documents in Writer's folder automatically.
<response> = zoho.writer.mergeAndStore(<document_id>, <output_format>, <email_id>, <values_map>, <connection>);
A sample script to "Merge and Store" task is shown in the screen below:

Merge and Download

To merge CRM record data with merge fields and attach it to the CRM field.
<response> = zoho.writer.mergeAndDownload(<document_id>, <output_format>, <email_id>, <values_map>, <connection>);
Use the following sample code to attach a merged document to any CRM module.

A sample script to "Merge and Download" task is shown in the screen below:

Click here to learn more about the zoho.crm.attachFile task.

    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

            Get started with Zoho Sign

            in a few quick steps!

            Download Help Guide

                        Still can't find what you're looking for?

                        Write to us:



                          Zoho Marketing Automation

                            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 SalesIQ Resources

                                                    Zoho TeamInbox Resources

                                                            Zoho DataPrep 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

                                                                                      • Finish Merge

                                                                                        Finish Actions Email Notifications You can enable email notifications to get notified when the merge is initiated and completed. You will receive an email as shown below, once the merge is initiated with a link to track the status of the merge ...
                                                                                      • How to merge Writer templates using Zoho Flow?

                                                                                        We're working on a Zoho Flow-Writer integration to help you pick template documents from Writer, place merge fields on them and merge it with data from Zoho Services. Find below steps to merge Writer Documents and with Zoho Creator Form fields. ...
                                                                                      • Create Merge Templates

                                                                                        Overview ​An organization might require sending out many documents in bulk to clients, employees, and its customers, which would contain content common to all the recipients and personalized or unique information that varies from one recipient to ...
                                                                                      • Configure Workflow In Zoho Creator With Writer's Mail Merge

                                                                                        Integrate Creator and Writer to watch your merged documents created in Writer using the data from Creator. By integrating Creator with Writer, you can: Perform custom functions with Writer's mail merge by configuring workflows in Creator. Extract ...
                                                                                      • Configure output options

                                                                                        Output Options when merge is triggered manually or on schedule Merge as a new document Merge as a new document comes in handy when you want to make minor edits or personalisations to the merged document before sending it out to your clients or ...
                                                                                      Wherever you are is as good as
                                                                                      your workplace



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


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


                                                                                        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