Create Tag in Zoho Mail
Table of Contents
Note:
- This task is applicable to all Zoho services, except Zoho Creator.
- Each time the zoho.mail.createTag integration task is executed, it triggers an API request in the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
- Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if zoho.mail.createTag integration task is placed inside a for each task that iterates five times, the number of external calls consumed will be five, even though the task appears only once in the script.
Overview
The zoho.mail.createTag task is used to create a tag with the specified color in Zoho Mail.
Syntax
<response> = zoho.mail.createTag(<tag_name>, <color>, <connection>);
where:
| Params | Data type | Description |
| <response> | KEY-VALUE | The response that represents the status of the executed task. |
| <tag_name> | TEXT | The name of the tag that will be created. |
| <color> | TEXT | The color (in hex code) of the tag that will be created. |
| <connection> | TEXT | The link name of the connection. Note:
|
Example
The following script creates a tag - blog in Zoho Mail:
response = zoho.mail.createTag("blog", "#FF6F61", "mail_oauth_connection");
where:
response
The KEY-VALUE response that represents the status of the executed task.
"blog"
The TEXT that represents the name of the tag that will be created.
"#FF6F61"
The TEXT that represents the color (in hex code) of the tag that will be created.
"mail_oauth_connection"
The TEXT that represents the link name of Zoho Mail oauth connection.
Response Format
Success Response
The success response returned is of the following format:
{
"message":"Action createLabel is successful",
"status":"success"
}
Failure Response
The failure response for existing tag name will be returned in the following format:
{
"message":"Label blog already exists",
"status":"failure"
}