Merge and store documents using Zoho Writer | Custom Functions | Zoho Sprints Help

Merge and store documents using Zoho Writer

You can now use template functions to merge and store documents using Zoho Writer. The document template is built using the fields being merged from Zoho Sprints. The in-built deluge functions deliver the values to the merge fields in the document, enabling you to create new Writer file while updating or creating respective Sprints modules. Learn about custom functions.

Notes
Prerequisites: Merging documents comes with a few prerequisites:
  1. You need to create writer template from scratch to facilitate the merge. Learn how to create writer template
  2. You need to add Zoho Writer as a connection in Zoho Sprints and Zoho Sprints as a connection in Zoho Writer to establish a secure interaction between the two applications. Learn how to add connection
  3. You should have subscribed to Premier, Enterprise or Zoho One plan. 

This capability is supported in the following modules:
  1. Project
  2. Sprint
  3. Epic
  4. Release
  5. Item
The pre-built template functions provide you with the necessary script to set up merging document. The following are the available template functions:
  1. Generate project document: Create a new writer document while creating or updating a Project
  2. Generate sprint document: Create a new writer document while creating or updating a Sprint
  3. Generate epic document: Create a new writer document while creating or updating an Epic
  4. Generate release document: Create a new writer document while creating or updating a Release
  5. Generate work item: Create a new writer document while creating or updating a Work Item
Notes
Note: This is only for document creation and not for updating existing documents in Zoho Writers.

Example

Info
Let's assume you are an online course creation platform and for each course your team creates a project. At the start of the project, you need to prepare a course outline and contents document with your team. Both your project creation and document creation process can be unified and the effort halved with the help of the merge document functions. All you need to do is, add Zoho Writer connection, create a writer template from scratch, select automate option, and use the gallery function in the Zoho Sprints. This will automate your document merge process.

Create Writer Template

You need to create a writer template from scratch to facilitate the merge document process. Add Zoho Sprints connection in your Writer to allow the interaction between the two.

To create writer template:
  1. Open Zoho Writer.
  2. Click the Create New button.
  3. Select Merge Template. Learn more

  4. Select Create from Scratch. A template will be created.
  5. Enter document name. The Automate option in the left navigation panel will be enabled.

  6. Select Automate.

  7. Click Add data source link. The data sources will be listed.

  8. Select Custom Data Sources.
  9. Select Gallery Function. The Sprint Functions will be listed.
  10. Click the Use button against the required function. The gallery function will appear.

  11. Click the Save and Link button. The required module will be linked to the template. The Manage Fields section will display the fields linked from the respective Zoho Sprints module.

 
The modules are linked as Main Fields and Subforms:
  1. Projects
    Main Fields: Project Module
    Subforms: Release, Sprint, Epic and Project users

  2. Release
    Main Fields: Release Module
    Subforms: Work Items

  3. Epic
    Main Fields: Epic Module
    Subforms: Work Items
  1. Sprints
    Main Fields: Sprint Module
    Subforms: Work Items, Meetings, and Sprint Users

  2. Work Items
    Main Fields: Item Module
    Subforms: Sub Items, Linked Items, Checklists, Meetings, and Log Hours

Merge document template function

To merge document using template gallery functions:
  1. Click on the setup icon to navigate to the Setup page.
  2. Select Automation .
  3. Select Custom Functions.
  4. Click the dropdown arrow on the Function button.
  5. Select Gallery Function.
  6. Hover on the required function.

  7. Click the Create button. The Create Custom Function window will appear.
  8. Enter Display Name
  9. Enter Function Name.
    Note: According to the general naming convention, function name cannot contain spaces.
  10. Select Category as Automation.
    Note:
    1. The Module, Description, Parameter Names, and Parameter Values are predetermined based on the logic of the probable scenarios. You can edit them if necessary.
    2. A parameter is a variable assigned to a value in a function.
    3. The parameter value is the information passed in the function. In other words, the parameter name is the container and the parameter value is the information contained in it. These allow you to build a logical script into which actual input data can be passed when the function is invoked.
    4. Replace file Name (Document Name), Template ID (Document Template ID), and Folder ID (Workdrive Folder ID). These are mandatory parameters under the custom parameters section.
      Template ID is the last part in the document URL (Example: https://writer.zoho.com/writer/open/t9j5a34906fe4d05640be97ec702cf1c4d6f)

      Folder ID is the last part in the folder URL (Example: https://workdrive.zoho.com/home/6oq3d00e1e07d58c64077b4f1ca4a777/teams/folders/0kfnse1e2feb6cc894c2eb49dc4d1d3b1987f)

  11. Select the Trigger Event at which the function needs to be executed. The trigger events are dependent on the module selected.
  12. Edit the existing script in the Deluge script builder to suit your requirement.

  13. Click Save to complete creating the function, or click Save and Execute to complete creating the function and execute it. The Zoho Writer document will be created in the respective Workdrive folder.

Notes
Note: Replace the writerconnection and the sprintconnection in the script with the respective connection link names within double quotes.