Choose where you’d like to start

Get All Fields in Zoho Writer

Description

The zoho.writer.getAllFields task is used to fetch all the fields present in a Zoho Writer document. This task is based on the Zoho Writer Get All Fields API.

Note: Applicable to all services except Zoho Creator.

Syntax

<response> = zoho.writer.getAllFields(<document_id>, <connection>);

where:

ParamsData typeDescription
<response>KEY-VALUEThe response returned by Zoho Writer. It represents the list of all fields inserted into the specified document.
<document_id>TEXT

The ID of the document from which the fields need to be fetched.

The document ID can be obtained from the URL of the document from which the fields need to be fetched.

The URL is in the following format:
https://writer.zoho.com/writer/open/<document_id>

<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

 

Example

The following script fetches all the fields in a given Writer document.

response = zoho.writer.getAllFields("al296XXXXXXXXXXXXXXXXXXXXXXXXXXXa516c", "writer_oauth_connection");

where:

response
The KEY-VALUE response returned by Zoho Writer. It represents the number of fields fetched and their respective metadata.
"al296XXXXXXXXXXXXXXXXXXXXXXXXXXXa516c"
The TEXT that represents the ID of the document in Zoho Writer.
"writer_oauth_connection"
The TEXT that represents the name of the connection.

Response Format

{
  merge : [
    {'id':'Name','display_name':'Name','type':'text'},
    {'id':'Email','display_name':'Email','type':'email'},
    {'id':'Products','display_name':'Products','type':'related_list', 
        fields:[
            {'id':'Products.Products_name','display_name':'Products.Products Name','type':'text'},      
            {'id':'Products.Products_code','display_name':'Products.Products Code','type':'number'},
        {'id':'Products.Products_category','display_name':'Products.Products Category','type':'text'}
            ]
    },
    {'id':'Mobile','display_name':'Mobile','type':'number'},
    .....
    ],  
 sign: {
    "Recipient1": {
        "job_title": "" 
        "Agree_term_and_conditions": ""
    }
    "Recipient2": {
        "company_name": "",
        "Address": ""
    }
}
}

Related Links

Get Started Now

Execute