Move to folder in Zoho Mail
Table of ContentsUp
Note:
- This task is applicable to all Zoho services, except Zoho Creator.
- Each time the zoho.mail.moveToFolder 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.moveToFolder 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.moveToFolder task is used to move an email from one folder to another in Zoho Mail. This task is based on a Zoho Mail API.
Syntax
<response> = zoho.mail.moveToFolder(<message_id>, <folder_id>/<folder_path>, <connection>);
where:
| Params | Data type | Description |
| <response> | KEY-VALUE | The status of the executed task. |
| <message_id> | NUMBER | The ID of the email that will be moved to the specified folder. Note: You can get the message_id from the Zoho Mail URL. The URL is in the following format: |
<folder_id>/ <folder_path> | NUMBER/ TEXT | The ID or path of the folder into which the email will be moved. Note:
|
| <connection> | TEXT | The link name of the Zoho Mail connection Note:
|
Example 1
The following script moves an email to the folder of ID - 6729326000000008021 in Zoho Mail:
response = zoho.mail.moveToFolder(6729326000001837113, 6729326000000008021, "mail_oauth_connection");
where:
response
6729326000001837113
6729326000000008021
"mail_oauth_connection"
Example 2
The following script moves an email to the folder with path - /inbox/folder1 in Zoho Mail:
response = zoho.mail.moveToFolder(6729326000001837113, "/inbox/folder1", "mail_oauth_connection");
where:
"/inbox/folder1"
"mail_oauth_connection"
Response Format
Success Response
The success response will be returned in the following format:
{
"message":"Action moveMessage is successful",
"status":"success"
}
Failure Response
The failure response will be returned in the following format:
{
"message":"Error while processing the request! Folder does not exist",
"status":"failure"
}