Choose where you’d like to start

Mark or Unmark Favorite Document in Zoho Writer

Description

The zoho.writer.documents.favorite task marks or unmarks the document as favorite. This task is based on the Zoho Writer Make/Remove Favourite API.

Note: Applicable to all services except Zoho Creator.

Syntax

<response> = zoho.writer.documents.favorite(<document_id>, <operation_type>, <connection>)

where:

ParamsData typeDescription
<response>KEY-VALUEThe response returned by Zoho Writer. It provides the details of the user who favorited the document.
<document_id>TEXT

The ID of the document to be favorited.

The document ID can be obtained from the URL of the document which needs to be favorited.

The URL is formatted as follows:
https://writer.zoho.com/writer/open/<document_id>

<operation_type>BOOLEAN

1. If you would like to make the document as favorite, pass the value as true.

2. If you would like to remove the document from favorites, pass the value as false.

<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 favorites the given Writer document.

document_id = "h36bc2a6c50b2754a405880c1d1679a5f5be9";
operation_type = "true";  //true|false
response = zoho.writer.documents.favorite(document_id, operation_type, "writer_oauth_connection");
info response;

where:

response
The KEY-VALUE response returned by Zoho Writer. It represents whether the document has been favorited or not.
"h36bc2a6c50b2754a405880c1d1679a5f5be9"
The TEXT that represents the ID of the document in Zoho Writer
"true"
The BOOLEAN that represents whether the documents needs to be favorited or not.
"writer_oauth_connection"
The TEXT that represents the name of the connection.

Response Format

{
  "result": "success",
  "modified_by": {
    "email_id": "amelia@zylker.com",
    "profile_photo": "https://contacts.zoho.com/file?t=user&ID=1308724&fs=thumb",
    "user_id": "1308724",
    "display_name": "Amelia"
  },
  "is_favourite": true,
  "message": "The document has been added to your favourites."
}

Related Links

Get Started Now

Execute