How to programmatically set a reminder schedule for a Task on the date specified in "Due_Date" field?

How to programmatically set a reminder schedule for a Task on the date specified in "Due_Date" field?

I want to programmatically set up the reminder schedule for a Task that sends out an email reminder on the date specified in the "Due_Date" field. I've looked at the Zoho CRM Insert Record API and it looks like the TRIGGER key for "Remind_At" field requires the date and time to be in ISO8601 format. I have formatted the "due_date" field to be in this format, but what is the correct syntax to insert this information? I got an error in executing the following code snippet below.

Here's my code snippet:

newStartDate = phaseShiftStartDate.toDateTime("yyyy-MM-dd'T'HH:mm:ss'+00:00'").toString("yyyy-MM-dd'T'HH:mm:ss'+02:00'");
taskEventMap = {"Subject":"Robotic Process Automation (RPA) - Update Phase for Account " + accountId,"Due_Date":phaseShiftStartDate,"Remind_At":{"ALARM":"ACTION=EMAIL;TRIGGER=${newStartDate}}};

response = zoho.crm.createRecord("Tasks",taskEventMap);




      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


                                            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 WorkDrive Resources



                                                                      Zoho Campaigns Resources


                                                                        Zoho CRM Resources

                                                                        • CRM Community Learning Series

                                                                          CRM Community Learning Series


                                                                        • Tips

                                                                          Tips

                                                                        • 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