Creating a Task that Repeats with Reminders via API (or deluge integration)
Hello,
I've been using the API to create tasks with reminders for a couple of years now and am familiar with the required structure of the 'Remind_At' property.
I am now trying to create a series of repeating Tasks and I would like the tasks to have reminders that are trigged on the Due Date at 6am pacific time.
I can use the following code to create a task that repeats but doesn't have reminders or I can also use the following code to create a task that has reminders but doesn't repeat. But as soon as I try to create the task with both I get an error that says the time I am providing for the remind at alarm is invalid. I'm assuming I have to use some other value for the 'TRIGGER' value of the alarm but I can't find any documentation regarding potential values.
- remindAt = { "ALARM":"FREQ=NONE;ACTION=EMAILANDPOPUP;TRIGGER=DATE-TIME:"+remindTime };
- repeat = { 'RRULE':'FREQ=YEARLY;INTERVAL=1;BYMONTH='+repeatMonth+';BYMONTHDAY='+repeatDay+';DTSTART='+dueDate+';UNTIL='+repeatEnd };
- taskData = {
- 'Owner': ownerID,
- 'Subject': 'Send Birthday Greeting to '+bd.get('name')+' for Birthday on '+bDateText,
- 'What_Id': zID,
- '$se_module': "Accounts",
- 'Due_Date': dueDate,
- 'Recurring_Activity': repeat,
- 'Remind_At': remindAt
- };
- info "{ \"data\": [ " + taskData.toText() + " ] }";
- newTask = invokeurl [
- url: zoho_api_url + "Tasks"
- type: POST
- parameters: "{ \"data\": [ " + taskData.toText() + " ] }"
- connection: "zoho_crm_api"
- ];
When I run that code I get the following error.
{
"code": "INVALID_DATA",
"details": {
"expected_data_type": "ALARM",
"api_name": "Remind_At",
"json_path": "$.data[0].Remind_At.ALARM"
},
"message": "invalid recurring reminder pattern",
"status": "error"
}
But if I remove one or the other of 'Recurring_Activity' or 'Remind_At' from the input data the Task creation does succeed. So there is no problem with anything in my code other than something in the value of the remind at trigger.
{ "ALARM": "FREQ=NONE;ACTION=EMAILANDPOPUP;TRIGGER=DATE-TIME:2022-11-02T06:00:00-07:00" }
What do I need to change so that the Task is created repeating once a year and with reminders on the due date at 6am?
Thanks for you help.
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Orchestly Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.