Choose where you’d like to start

Generate Fillable Link

Table of Contents

Note: Applicable to all services except Zoho Creator

Description

The zoho.writer.generateFillableLink task merges your document and generates prefilled fillable links to collect data. This task is based on the Zoho Writer Merge and Share Fillable link API.

Syntax

<response> = zoho.writer.generateFillableLink(<document_id>, <merge_detail>, <optional_settings>, <connection>)
ParametersData typeDescription
<response>KEY-VALUEThe response returned by Zoho Writer. It provides the merged document's details, fillable link for each record, and the merge status.
 
<document_id>TEXTThe document ID can be obtained from the URL of the document from which fillable links should be generated post-merge. The URL is formatted as follows:
https://writer.zoho.com/writer/open/<document_id>
 
<merge_detail>KEY-VALUESpecify the input for the merge: It can be JSON, CSV file, or a URL.
<optional_settings>KEY-VALUEThe optional parameters you can send to the merge and share fillable link task according to your preference.
<connection>TEXT

The connection's link name.
Note:

  • To prevent new authtoken generation and ensure new integration tasks (created after the deadline specified in the post) work as expected, a Zoho OAuth connection with appropriate scopes is mandatory. Existing integration tasks will continue to work, with or without the connections parameter, until you manually delete the authtoken from Zoho Accounts.
  • Add relevant scopes from the Zoho Writer API when creating the connection.
  • Refer to this post for a list of Zoho services that support the Connections page.
  • Learn more about connections.

You can provide the <merge_detail> in any one of these formats:

Key

Value

Description

merge_data

JSONObject

Pass a string value throughthe data key as a JSON Array.

merge_data_csv_content

File

Provide the required CSV content in your API request body.

merge_data_json_content

File

Provide the required JSON content in your API request body.

merge_data_csv_url

URL

Provide the required CSV URL in your API request body.

merge_data_json_url

URL

Provide the required JSON URL in your API request body.

<optional_settings>
 

test_mode

Boolean (true/false)

Using this parameter, you can test the Merge APIs without consuming any credit points. The output file will contain a watermark as it is used only for testing purpose.

Test mode limit: 50 merges per day for an organization.

Example

The following script generate prefilled fillable links for the given records

document_id = "po5uobda049e043544b13a9956f6d2cedc67b";
                mp = Map();
                mp.put("InvoiceNo","34267");
                mp.put("InvoiceDate","24 Apr 2024");
                mp.put("InvoiceAmount","$300");
                data_map = Map();
                data_map.put("data", mp);
                merge_detail = Map();
                merge_detail.put("merge_data", data_map);
                optional_settings = Map();
                optional_settings.put("test_mode", false);
                response = zoho.writer.generateFillableLink(document_id, merge_detail, optional_settings, "writer_oauth_connection" );
                info response;

Usecase

Say you're generating a list of fillable form with the list of service requests to a field technician. After completing each request, they collect the feedback and signatudres from the customer, record a brief description of the type of work carried out, and save the form. After completing all of their assignments for the day, the technician submits the form.

document_id = "po5uobda049e043544b13a9956f6d2cedc67b";
                mp = Map();
                mp.put("Service", "Laptop Request");
                mp.put("Technician", "Zylker");
                mp.put("Request Created", "Jan 10, 2024");
                mp.put("Status", "Completed");
                data_map = Map();
                data_map.put("data", fields)
                merge_detail = Map();
                merge_detail.put("merge_data", data_map);
                optional_settings = Map();
                optional_settings.put("test_mode", false);
                response = zoho.writer.generateFillableLink(document_id, merge_detail, optional_settings, "writer_oauth_connection" );
                info response;

 

Response Format

Success Response:

The success response will be returned in the following format:

{
"merge_report_data_url": "https://writer.zoho.com/writer/api/v1/merge/job/<jobId>/data",
"merge_report_url": "https://writer.zoho.com/writer/v1/mailmerge/job/<jobId>",
"records": [
{
"data": {
"InvoiceNo": "12345",
"InvoiceDate": "27 May 2022",
"InvoiceAmount": "$100",
"id": "0e002287-7c45-4188-af9f-65*****”
},
"fillable_link": "https://writer.zoho.com/writer/open/ponazfea04477109f4681a831e7177d96bc40/fill",
"status": "inprogress"
}
],
"status": "inprogress"
}

Related Links

Get Started Now

Execute