Power of Automation: Automatically send an email to all portal users with today's list of Open tasks.

Power of Automation: Automatically send an email to all portal users with today's list of Open tasks.

Hello Everyone,


A Custom Function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as to 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 email all the portal users with their list of daily Tasks which are in open status along with details like Project name, Task name, Task URL, start date, due date, status. Sample email notification screenshot is attached for reference.

All you need to do is schedule the frequency for how often the below custom function should be executed. Here is the help document to know more about Schedule Functions.


Custom function code:-


projectParam = Map();

projectParam.put("status", "active");

getAllProjects = invokeurl
[

url : projectsEndpoint +portalId+"/projects/"

type : GET

parameters : projectParam

connection : "XXXXXXX"

];

if(getAllProjects.containKey("projects"))
{

projects = getAllProjects.get("projects");

usersParam = Map();

usersParam.put("user_type", "active");

getAllUsers = invokeurl
[

url : projectsEndpoint+portalId+"/users/"

type : GET

parameters : usersParam

connection : "XXXXXXX"

];

if(getAllUsers.containKey("users"))
{

users = getAllUsers.get("users");

for each user in users

{

userId = user.get("id");

taskParam = Map();

taskParam.put("status", "open");

taskParam.put("owner", userId);

taskParam.put("time", "today");

getAllTasks = invokeurl
[

url : projectsEndpoint + portalId+"/mytasks/"

type : GET

parameters : taskParam

connection : "XXXXXXX"

];

if(getAllTasks!="")

{

tasks = getAllTasks.get("tasks");

taskRow = "";

for each  task in tasks

{

taskRow = taskRow + "<tr> <td>" + task.get("project").get("name") + "</td> <td>" + task.get("name") + "</td> <td>" + task.get("link").get("self").get("url") + "</td>  <td>" + task.get("start_date") + "</td> <td>" + task.get("end_date") + "</td> <td>" + task.get("status").get("name") + "</td> </tr>";

}

sendmail

[

from :zoho.loginuserid

to : user.get("email")

subject :"Today's tasks"

message :"<html> <style> table, th, td { border:1px solid black; border-collapse: collapse; } </style> <body> <h2>Today's Tasks</h2> <table style=\"width:100%\"> <tr> <th>Project Name</th> <th>Task Name</th> <th>Task URL</th>  <th>Start date</th><th>Due date</th>  <th>Status</th></tr> " + taskRow + " </table> </body> </html>"

]

info taskRow;

}

}

}

}


Make sure to replace XXXXXXX with the Zoho Projects connection link name with scope ZohoProjects.Tasks.READ, ZohoProjects.portal.READ, ZohoProjects.Users.READ. Check this link to learn how to create the connection.  Please find the screenshot of sample schedule function attached for reference. 


We hope you found this post useful. If you have any questions, feel free to share them in the comments below.


    Access your files securely from anywhere

          Zoho Developer Community




                                    Zoho Desk Resources

                                    • Desk Community Learning Series


                                    • Digest


                                    • Functions


                                    • Meetups


                                    • Kbase


                                    • Resources


                                    • Glossary


                                    • Desk Marketplace


                                    • MVP Corner


                                    • Word of the Day



                                        Zoho Marketing Automation
                                                • Sticky Posts

                                                • Project Billing with the Staff Hours Method in Zoho Projects

                                                  The Staff Hours Billing Method in Zoho Projects allows you to bill your clients based on the actual time spent by each team member on a project, at the rate set for each user. This is useful for projects where different skill sets are needed and service
                                                • Tip 37: Time Log Restriction in Zoho Projects

                                                  Timesheet in Zoho Projects helps you big time in entering log hours for the tasks and issues and approving them. Now, with the new Time Log Restriction option, you can set daily and weekly log hour limits. You can restrict users from entering extra log hours than the permissible limit. The limits are restricted to 24 hours per day and 168 hours per week by default based on business hours. To customize, navigate to Task & Timesheet settings under Portal Configuration in Zoho Projects setup and enable
                                                • Organize and Track Phases with Phase Custom Views

                                                  Phase Custom Views let you filter and display phases based on specific criteria. This helps you focus on what’s most relevant for you and your team. Filter phases using criteria such as budget, status, and more. Share views with specific users or teams
                                                • Create Your Own Issue Management System

                                                  Effective issue management is a cornerstone of project success. Every bug or issue, no matter how small, needs to be tracked and resolved in time to maintain project momentum. In this post, we’ll explore how an issue management system in Zoho Projects
                                                • Time Log Reminder

                                                  Tracking the time spent on tasks and issues is one of the most important functions of a timesheet. However, users may forget to update the time logs because they have their own goals to achieve. But, time logs must be updated at regular intervals to keep


                                                Manage your brands on social media



                                                      Zoho TeamInbox Resources

                                                        Zoho DataPrep Resources



                                                          Zoho CRM Plus Resources

                                                            Zoho Books Resources


                                                              Zoho Subscriptions Resources

                                                                Zoho Projects Resources


                                                                  Zoho Sprints Resources


                                                                    Qntrl Resources


                                                                      Zoho Creator Resources



                                                                          Zoho Campaigns Resources


                                                                            Zoho CRM Resources

                                                                            • CRM Community Learning Series

                                                                              CRM Community Learning Series


                                                                            • Kaizen

                                                                              Kaizen

                                                                            • Functions

                                                                              Functions

                                                                            • Meetups

                                                                              Meetups

                                                                            • Kbase

                                                                              Kbase

                                                                            • Resources

                                                                              Resources

                                                                            • Digest

                                                                              Digest

                                                                            • CRM Marketplace

                                                                              CRM Marketplace

                                                                            • MVP Corner

                                                                              MVP Corner





                                                                                Design. Discuss. Deliver.

                                                                                Create visually engaging stories with Zoho Show.

                                                                                Get Started Now


                                                                                  Zoho Show Resources


                                                                                    Zoho Writer Writer

                                                                                    Get Started. Write Away!

                                                                                    Writer is a powerful online word processor, designed for collaborative work.

                                                                                      Zoho CRM コンテンツ






                                                                                        Nederlandse Hulpbronnen


                                                                                            ご検討中の方





                                                                                                  • Recent Topics

                                                                                                  • DataPrep Bigquery Connection failed

                                                                                                    Hello everybody, I want to create a connnection beetwen Bigquery and Dataprep but when I try to connect my project I got this error Loading tables has failed. Table list fetched from the data source expired.
                                                                                                  • Can I add Conditional merge tags on my Templates?

                                                                                                    Hi I was wondering if I can use Conditional Mail Merge tags inside my Email templates/Quotes etc within the CRM? In spanish and in our business we use gender and academic degree salutations , ie: Dr., Dra., Sr., Srta., so the beginning of an email / letter
                                                                                                  • Organization-Tiered Support in Zoho Corp Help Center

                                                                                                    Dear Zoho Team, Greetings! As the focal point for all Zoho-related matters in our organization, we would like to request the implementation of an organization-tiered support structure in the Zoho Corp Help Center (Zoho's internal Zoho Desk). This feature
                                                                                                  • HTTP Error 500 when creating E-Mail Draft with API

                                                                                                    Hi, I tried to create an email draft for a ticket using the Zoho Desk API (v1); however, I continuously receive HTTP Error 500: An internal server error occurred while performing this operation. I've tried both curl and Python implementations, but neither
                                                                                                  • Recording overpayment?

                                                                                                    So a customer just overpaid me and how do I record this? I can't enter an amount that is higher than the invoice amount. Eg. Invoice is $195 and he sent $200. He's a reccuring customer so is there a way to record so that he has a $5 advance for future invoice?
                                                                                                  • Function #10: Update item prices automatically based on the last transaction created

                                                                                                    In businesses, item prices are not always fixed and can fluctuate due to various factors. If you find yourself manually adjusting the item rates every time they change, we have the ideal time-saving solution for you. In today's post, we bring you custom
                                                                                                  • Calculate BMI

                                                                                                    Hello, Could you please help me with the following calculation: Height registration is in feet & inches. Weight registration is in pounds & LBS. I want to calculate the BMI for example: //Calculate pounds dec = row.Today_s_Weight_st_lbs.toDecimal() * 100; num = row.Today_s_Weight_st_lbs.toLong() * 14; pounds = (dec +  num); //Calculate inches dec1 = X.Height_ft_ins.toDecimal() * 100; num1 = X.Height_ft_ins.toLong() * 12; inches = (num1 + dec1); //BMI Calculation row.BMI = (pounds  *  0.45)  /  ((inches
                                                                                                  • Zoho Recruit - Blueprint and ZIA

                                                                                                    If I activate the Blueprint for Jobs in Zoho Recruit, Zia disappears for matching canddiates, why is that?
                                                                                                  • E-mails duplicados

                                                                                                    Ao enviar e-mails, uma das contas de nossos usuários, mostra dois e-mails enviados iguais. Como faço para exibir somente um e-mail enviado? Obrigado,
                                                                                                  • Zoho Creator - Install app from Gallery takes too long

                                                                                                    I'm trying to install the 'Volunteer Portal' from the app Gallery of Zoho Creator. It has been busy installing the app for over 2 hours now. It might be okay, but how long is something like that supposed to take? I never installed anything from that Gallery
                                                                                                  • Why Trident?

                                                                                                    Maybe a strange question, but I was wondering why Trident is being developed. It looks fine and is working better and better, but I can't see what you want to achieve what isn't already in Zoho Mail? Zoho mail is already an (webbased I suppose) app that
                                                                                                  • Email não baixa nem anexa arquivos

                                                                                                    Boa tarde. Não consigo baixar, visualizar nem anexar arquivos no e-mail Zoho. Já baixei a permissão para o Chrome, mas não adiantou. Tentamos no Windows 7 e 10, e mesmo assim não baixa nada. Somente pelo app do celular consigo baixar. O que posso fazer?
                                                                                                  • Email zoho não baixa nem anexa arquivos

                                                                                                    Não consigo baixar, visualizar nem anexar arquivos no e-mail Zoho. Já baixei a permissão para o Chrome, mas não adiantou. Não baixa nada. Somente pelo app do celular consigo baixar. :(
                                                                                                  • Problem adding emails to my account / Email Address already exists or associated in another Organisation

                                                                                                    Hello, I am trying to create 3 emails that I previously deleted, but it gives me the message that you see on the screen below, I tried to write to support but I still have no response, what else can I do?
                                                                                                  • "Processing"

                                                                                                    Hi, All emails outgoing are showing "processing", any issues? Thanks
                                                                                                  • For each loop with available time slots

                                                                                                    I am very new to Deluge, and this question was unable to be answered by Zoho Creator tech support upon request. Task at hand: I have a Form with 4 fields: - Date Start - Date End - Dropdown: Time Start: contains time slots (12:00PM, 12:15PM, etc) - Dropdown:
                                                                                                  • Auto forward after moving email from spam to inbox

                                                                                                    Auto forward is generally working fine, however it does not forward mails landed in the spam folder. I can move important mails from spam back to inbox, is it possible to automatically forward them once they are in inbox? Obviously I can manually forward
                                                                                                  • Projects Task List Bars not Showing

                                                                                                    Im in my Projects template and the grey bar for the Task Lists is not showing and the tasks cannot join to it. I have it open in a job and it works. Anyone know why its not showing in the template?
                                                                                                  • Restriction in assigning signer fields for the "Approver" role in APIs and internal integrations

                                                                                                    Hi, Zoho Sign's intended design is offering two actions to the recipient - Needs to sign (if you wish your recipient to add information to the document; signature, for instance) or Approver (someone who has to approve the content of the document and must
                                                                                                  • Searching Notes & Attachments

                                                                                                    Is it possible to have the search in CRM search the Notes and Attachments for key words
                                                                                                  • no me llegan los correos a Zoho mail

                                                                                                    No puedo recibir correos pero sí enviarlos, ya hice la modificación de MX y la verificación de teléfonos, qué es lo que ocurre? gracias
                                                                                                  • 553 Relaying disallowed SMTP Error: data not accepted

                                                                                                    I am configuring my website to use my zoho mail for my contact form. I am using phpmailer but this exits with the following error: SMTP ERROR: DATA END command failed: 553 Relaying disallowed SMTP Error: data not accepted. Mailer Error: SMTP Error: data
                                                                                                  • Rebrand your CRM with the all-new custom domain mapping setup

                                                                                                    UPDATES TO THIS FEATURE! 19th Jan, 2024 — Custom domain mapping has been made available for portal users in Zoho One and CRM Plus. 23rd June, 2023 — Custom domain mapping has been made available for all users, in all DCs. Hello everyone! We are elated
                                                                                                  • 'Find duplicates using :'

                                                                                                    I just discovered (and thought I would share) that you can import candidates to Zoho Recruit and define the field you want to use to find duplicates. I have used the email address all this time. But I think a better field to find duplicates is a contact's
                                                                                                  • Territory management and roles hierarchy

                                                                                                    Hi everyone, we are facing a problem with territory management. Our roles hierarchy is quite simple: - Area sales managers - Sales executives (reporting to Area sales managers) - Backoffice "Sales executives" can see only accounts/contacts/etc based on
                                                                                                  • DataPrep Bigquery Connection failed

                                                                                                    Hello everybody, I want to create a connnection beetwen Bigquery and Dataprep but when I try to connect my project I got this error Loading tables has failed. Table list fetched from the data source expired.
                                                                                                  • Can Send Emails But I am not Receiving emails in Zoho Account

                                                                                                    Hello, I have configured a Zoho email account for the domain pentexqatar.com and I can send emails but am not receiving any emails in Zoho account. can I please let me know what could be the issues? Thank You
                                                                                                  • Disable Multiple Submissions by same Employee

                                                                                                    Dear All, I am creating a form to be filled by employees. Is it possible to restrict submission of the form if that employee has already submitted it once?
                                                                                                  • Whatsapp Notification For Cliq

                                                                                                    We have integrated WhatsApp Business into Zoho CRM, and messages are coming through to the CRM. However, I want a notification message to be sent to the data owner in Cliq when a new message arrives. This doesn't seem possible through rules. Is there
                                                                                                  • Zoho Books Sandbox environment

                                                                                                    Hello. Is there a free sandbox environment for the developers using Zoho Books API? I am working on the Zoho Books add-on and currently not ready to buy a premium service - maybe later when my add-on will start to bring money. Right now I just need a
                                                                                                  • Prefill Zoho Bookings form fields when using 'Email Booking URL' button in Zoho CRM

                                                                                                    I'm utilizing the 'Email Booking URL' button in Zoho CRM, linked to the 'Contacts' module. After the contact sets the meeting details and receives the email, I want the Zoho Bookings form to automatically pre-fill with their information (name, email,
                                                                                                  • Call Counter

                                                                                                    For context, our Leads Page is configured with three separate phone number fields. This allows us to store multiple contact numbers for each lead. We've also integrated a click-to-dial feature in our CRM system, which enables us to make calls directly
                                                                                                  • Power of Automation :: Incorporate your desired tasklist into a new project automatically

                                                                                                    Hello Everyone, A custom function is a software code that can be used to automate a process and this allows you to automate a notification, call a webhook, or perform logic immediately after a workflow rule is triggered. This feature helps to automate
                                                                                                  • How to delete Inactive users?

                                                                                                    We want to delete inactive users from our system, but went you deactivate still the names are shown at the inactive section. How to get really rid off these names? Thanks for your response! Fabian van den Barselaar
                                                                                                  • Events disappearing in Calendar

                                                                                                    To reproduce the bug: 1.- Add a new event in Calendar 2.- Type any name for the Event 3.- Click "Create" 4.- The event appears 5.- Click on the event to open it 6.- Optional: Edit the event 7.- Click OK 8.- After two seconds, the event disappears Now, click on another day and then come back to the inserted event's day. The event appears.
                                                                                                  • Variable time for consultation.

                                                                                                    We would like to be able to not set a predefine time for the consultation. We wont be using this for the customer it's going to be use internaly to keep track of workers on the road that have appoiment and installation. Something in the line of a FSM
                                                                                                  • Integration Zoho Books in CRM

                                                                                                    Hi, I integrated the CRM with Books. This allows me to display accounting documents assigned to a customer directly in the CRM. This is a very convenient option. Unfortunately, I can't find a solution to properly set permissions for my sales department.
                                                                                                  • Scheduling Actions by Date and Reusing Webhooks in Journey Builder

                                                                                                    Hello, I’m trying to use the Journey Builder feature, but I noticed that it only allows scheduling actions forward in time, not based on a specific date. It would be very helpful if we could schedule actions ahead of time based on predefined date fields.
                                                                                                  • New Customization options in the module builder: Quick Create and Detail view

                                                                                                    Hello everyone, We have introduced two new components to the module builder: Quick create and Detail view. The Quick Create Component It is a mini form used to create a record and associate it to the parent record from a lookup field. For example, if you have a Deals lookup in the Contacts module, then you can associate existing deals or create a deal and associate it with the contact. You can customize this Quick Create form by adding standard as well as custom fields. There is no limit to the number
                                                                                                  • Project Change Orders and Additions

                                                                                                    We are in the process of migrating from QuickBooks Online to Zoho Books. We have Zoho One and like the ability to sync all of our data across everything. And I like that projects work in a way that's less dumb than QuickBooks. I'm trying to figure out
                                                                                                  • Next Page