Zoho has now enabled:
β
Activate / Deactivate workflows using API
β
Schedule workflow activation & deactivation
This is extremely useful for real-world automation use cases π‘
π§© My Use Case
I created a scheduled automation that:
βοΈ Activates workflows in the morning
π Deactivates workflows in the evening
This gives full control over when workflows should run β something Iβve needed for months, and now I finally have the right path! π
π§βπ» Sample Deluge Code
Below is the code Iβm using to deactivate multiple workflow rules via API (can be scheduled easily):
workflowIds = List();
workflowIds.add("3719371000359745649");
workflowIds.add("3719371000359745731");
workflowIds.add("3719371000359745797");
workflowIds.add("3719371000364951166");
for each workflowId in workflowIds
{
workflowRulesList = List();
workflowRule = Map();
workflowRule.put("id", workflowId);
statusMap = Map();
statusMap.put("active", false); // set true to activate
statusMap.put("delete_schedule_action", false);
workflowRule.put("status", statusMap);
workflowRulesList.add(workflowRule);
finalMap = Map();
finalMap.put("workflow_rules", workflowRulesList);
WorkflowUpdate = invokeurl
[
type :PUT
parameters: finalMap.toString()
connection:"newcrm"
];
info WorkflowUpdate;
}
π Why This Matters
Better control over automations
Cleaner business logic
Perfect for time-based workflow management
Thanks
Saurav Nigota
Zoho Certified Developer || Shuraa Business Setup