Zoho CRM Workflow Automation: Activate & Deactivate Workflows Using API

Zoho CRM Workflow Automation: Activate & Deactivate Workflows Using API

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