Choose where you’d like to start

Create Tag in Zoho Mail

Note: This task is applicable to all Zoho services, except Zoho Creator.

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:

ParamsData typeDescription

<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:

  • In view of stopping new authtoken generation, a Zoho OAuth connection with appropriate scopes is mandatory for new integration tasks (created after the deadline specified in the post) to work as expected. Existing integration tasks will continue to work with or without the connections parameter unless the authtoken is manually deleted from accounts.
  • The scope required for this task as mentioned by Zoho Mail API is tags.
  • Refer to this post for the list of Zoho services that support the connections page.
  • Learn more about connections

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"
    }

Related Links

Get Started Now

Execute