Rename Document in Zoho Writer
Table of Contents
Description
The zoho.writer.documents.setName task allows you to rename a document. This task is based on the Zoho Writer Rename Document API.
Syntax
<response> = zoho.writer.documents.setName(<document_id>, <name>, <connection>)
where:
Params | Data type | Description |
<response> | KEY-VALUE | The response returned by Zoho Writer. It represents the status of the document rename. |
<document_id> | TEXT | The ID of the document which needs to be renamed. The document ID can be obtained from the URL of the document which needs to be renamed. The URL is in the following format: https://writer.zoho.com/writer/open/<document_id> |
<name> | String | Pass a String value through the name key inside the JSONObject. |
<connection> | TEXT | The connection's link name. Note:
|
Example
The following script renames the given document with given name.
document_id = "h36bc2a6c50b2754a405880c1d1679a5f5be9"; name = "Online Word Document"; response = zoho.writer.documents.setName(document_id, name, "writer_oauth_connection"); info response;
where:
response
"h36bc2a6c50b2754a405880c1d1679a5f5be9"
"Online Word Document"
"writer_oauth_connection"
Response Format
{ "result": "success", "name": "Online Word Document", "message": "Document has been renamed successfully." }