Power of Automation :: Streamline Task Sync from Zoho Projects to Zoho Mail.
Hello Everyone,
A Custom function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it.
Requirement:-
One of our customers wanted to automate the process of adding the Tasks to Zoho Mail's To do list when a Task is created in Zoho Projects. This can be achieved using Task Custom Functions along with Workflow Rules in Zoho Projects.
Custom function code:-
paramMap = map();
paramMap.put("title", taskName);
paramMap.put("description", description);
paramMap.put("priority", priority);
HeadersMap = map();
HeadersMap.put("Accept", "application/json");
HeadersMap.put("Content-Type", "application/json");
response = invokeurl
[
type: POST
parameters: paramMap.toString()
headers: HeadersMap
connection: "XXXXX"
];
return "success";

Make sure to replace XXXXX with the Zoho Mail connection link name along with scopes: ZohoMail.tasks.READ and ZohoMail.tasks.WRITE.
Check this link to learn how to create the connection. Please find the screenshot of the parameters to be mapped and sample Task Workflow Rules.
We hope you found this post useful. If you have any questions, feel free to share them in the comments below.