Kaizen 215 - Workflow APIs - Part 3

Kaizen 215 - Workflow APIs - Part 3



Welcome back to another week of Kaizen!

Over the last couple of weeks, we’ve joined Zylker Cloud Services as they review and improve their workflows. In Part 1, we discovered and audited their sprawling workflow landscape. In Part 2, we learned how to use the Configuration API to understand valid triggers and actions, preventing errors before they happen.

Now, it is time to take action. Zylker has identified the "VP Alert - High Value Deal" workflow as a prime candidate for an update. It is old, has never run, and its logic might be too narrow. We will also explore how to create a new workflow from scratch to handle a new business requirement.

 STEP 5: Update an Existing Workflow 

From our audit in Step 2, we know that the existing ‘VP Alert - High Value Deal’ workflow (id: 4876876000016390024) hadn’t triggered even once. The original $50,000 threshold missed many valuable deals. Most winning opportunities actually land above $30,000. It has never executed, suggesting the criteria are too strict.

Let us use the Update Workflow Rule API to fix it. We'll change the criteria to trigger for deals greater than or equal to $30,000 and add an additional email notification.

 What you can and cannot update 

When working with the Update Workflow Rule API, not every field in a workflow is open for modification. Think of it like editing an existing automation blueprint. Some foundations are fixed, while others are flexible.

You can update:

  • Name and Description

  • Trigger : You can update triggers, but only within the same trigger type. For example, you can change a Record Action trigger from create to edit, but not from a Record Action trigger to a Score-based trigger. For more details on this, please refer to our detailed help documentation here.

  • Conditions and Criteria : add, remove, or refine them.

  • Actions : add new ones, remove existing ones, or update their configuration.

  • Status : activate or deactivate a workflow rule. 

What cannot be updated

There are a few key restrictions to remember:

  • You cannot change the module associated with the workflow.

  • You cannot switch trigger categories (e.g., from Record Action to Email Trigger).

  • You cannot retain unsupported actions when changing to a trigger that doesn’t support them. For instance, if you change a trigger from Edit to Delete, but keep an Assign Owner action, the update will fail, because “Assign Owner” isn’t valid for Delete triggers.

Updating an existing workflow is not about replacing everything. it is about editing precisely what needs to change.

Here is how to do it:

  • Fetch the workflow details using the Get Workflow Rule API. This gives the full structure,  including condition IDs, action IDs, and trigger details.

  • Identify what needs to change.

In this case, to fix the  “VP Alert - High Value Deal” workflow, we can update the Workflow rule to:

  • lower the threshold to $300,000

  • change the comparator to greater_than. 

To make the workflow more useful, Zylker has also decided to add a few new actions.

But before doing that, the developers needed to confirm which actions are supported for this workflow’s trigger type. That is where last week’s Configuration API comes in handy. Since we already know this is a Record Action trigger (create_or_edit), we can refer to the configuration response we explored in Part 2 to see which actions are valid. 

  {

                "api_name": "create_or_edit",

                "deprecated": false,

                "name": "CreateorEdit",

                "scheduled_actions_supported": true,

                "actions": [

                    "field_updates",

                    "assign_owner",

                    "add_tags",

                    "remove_tags",

                    "email_notifications",

                    "tasks",

                    "create_record",

                    "create_connected_record",

                    "add_meeting",

                    "webhooks",

                    "functions",

                    "circuits",

                    "flow"

                ]

},

 

The response clearly shows that email notifications, field updates, and tags are all supported for this trigger type. With that confidence, in addition to updating the condition, we can also add a 'Priority' tag to those records that trigger the Workflow. This makes the workflow more visible and actionable across the sales hierarchy.

Sample Request:

PUT {{api-domain}}/crm/v8/settings/automation/workflow_rules/4876876000016390024

{

    "workflow_rules": [

        {

            "description": "Notify sales leadership and track strategic opportunities",

            "name": "VP Alert - High Value Deal.",

            "conditions": [

                {

                    "sequence_number": 1,

                    "criteria_details": {

                        "criteria": {

                            "group_operator": "AND",

                            "group": [

                                {

                                    "comparator": "greater_than", // change in comparator operator

                                    "field": {

                                        "api_name": "Amount"

                                    },

                                    "value": "300000"   // Lowered threshold

                                },

                                {

                                    "comparator": "equal",

                                    "field": {

                                        "api_name": "Stage"

                                    },

                                    "value": "Negotiation/Review"

                                }

                            ]

                        }

                    },

                    "instant_actions": {

                        "actions": [

                            {

                                "type": "add_tags",

                                "module": "Deals",

                                "details": {

                                    "tags": [

                                        {

                                            "name": "Priority"

                                        }

                                    ],

                                    "overwrite": true

                                }

                            }

                        ]

                    },

                    "id": "4876876000016390025" // id of the condition to be updated

                }

            ]

        }

    ]

}

 

After this update, the workflow now triggers for any deal worth more than $300,000 in the Negotiation/Review stage. Apart from sending the email notifications and adding the follow up task, it also tags these deals as Priority.

 Edit vs Add: 

To edit an existing condition or action, include its existing id in your update payload. Zoho CRM will recognize it as an update to that object.

To add a new condition or action, simply omit the id. CRM treats any object without an ID as a new addition.

 STEP 6: Create a new Workflow Rule 

With the VP Alert - High Value Deal workflow now fixed and performing as expected, Zylker’s sales team quickly began to see results.
But their sales team noticed that deals often stall after proposals are sent, with no systematic follow-up. Zylker has hence refined the requirements for a new Workflow.

They want to automatically trigger follow-up actions when a high-value deal (above ₹30,000) is marked “Closed Lost” due to pricing reasons. This workflow must ensure that every lost opportunity is reviewed, tagged, and re-engaged after a cooling-off period. To achieve this, they want to create a workflow to be triggered whenever a deal’s Stage is updated to Closed Lost. It must perform the following actions:

  • Add tags Lost due to Pricing and Re-engagement Pending.

  • Send an email alert to the Sales team, with the details of the failed Deal, so they can look into the reasons.

  • After 30 business days, automatically create another “Lost Deal - Feedback” task to remind the owner to re-contact the customer for feedback, and for future opportunities. 

Before proceeding, Zylker makes an API call to the Workflow Configuration endpoint. This ensures that their chosen trigger type and actions are supported. From the response snippet below, it is clear that a field_update trigger supports scheduled actions and the required action types.

  {

                "api_name": "field_update",

                "deprecated": false,

                "name": "FieldUpdate",

                "scheduled_actions_supported": true,

                "actions": [

                    "field_updates",

                    "assign_owner",

                    "add_tags",

                    "remove_tags",

                    "email_notifications",

                    "tasks",

                    "create_record",

                    "create_connected_record",

                    "add_meeting",

                    "webhooks",

                    "functions",

                    "circuits",

                    "flow"

                ]

}

 

With these details validated, we can now move on to adding a new workflow for Zylker using the Create Workflow Rule API request.

Understanding the input JSON structure 

Every workflow definition follows the same hierarchy - defining when the rule runs, what conditions it checks, and which actions it performs.

The top-level input object contains a workflow_rules array. You must include just one workflow rule object per request. Each workflow rule defines its name, trigger type, and one or more condition blocks, each with its own criteria and actions.

Here is a breakdown of what is inside a single workflow rule:

{

  "workflow_rules": [

    {

      "name": "VP Alert - High Value Deal.",   //name of the workflow rule

      "description": "Notify leadership when high-value deals are lost due to pricing.",

      "module": { "api_name": "Deals" },   //module to which the workflow applies

      "execute_when": { ... },         //trigger configuration (e.g., on record edit, field update, etc.)

      "conditions": [

        {

          "sequence_number": 1,          // order of execution. this is the first condition

          "criteria_details": { ... },           // condition logic (criteria group)

          "instant_actions": { "actions": [ ... ] },  //instant actions executed instantly

          cheduled_actions": [              // schedules actions executed after a delay

            {

                      "execute_after": { ... },              // delay period for the scheduled action

                        "actions": [ ... ]

            }

          ]

        },

        {

          "sequence_number": 2,                      // second condition

          "criteria_details": { ... },

          "instant_actions": { "actions": [ ... ] }

        }

      ]

    }

  ]

}




Associative vs. Non-Associative Actions 

Every workflow rule performs one or more actions like sending an email, creating a task, or updating a field, etc. These actions fall into two broad categories: associative and non-associative.

Type

Description

Example Actions

Non- Associative Actions

These are defined inside the workflow rule itself. They do not need to exist beforehand. You can configure their details directly within the workflow payload.

Create record, schedule a call, add a meeting, convert records, social actions, create record on email received, assign owner,

Associative Actions

These are reusable actions created separately in CRM and referenced by their IDs. They can be used across multiple workflows and other automation tools.

Field updates, Email notifications, tasks, Webhooks, Add/Remove tags

 

When you create or update a workflow via API, the associative actions require you to pass their existing action IDs. These IDs can be fetched using the corresponding Actions APIs : Field Updates, Email Notifications, Webhooks, and Tasks. In the coming weeks of Kaizen, we will take a closer look at each of these Actions APIs. We will see how to create, manage, and delete them within your workflow automation strategy.

Sample Request:

POST {{api-domain}}/crm/v8/settings/automation/workflow_rules

{

    "workflow_rules": [

        {

            "execute_when": {

                "details": {

                    "trigger_module": {

                        "api_name": "Deals",

                        "id": "4876876000000002181"

                    },

                    "criteria": {

                        "comparator": "equal",

                        "field": {

                            "api_name": "Stage",

                            "id": "4876876000000002565"

                        },

                        "type": "value",

                        "value": "Closed Lost"

                    },

                    "repeat": false,

                    "match_all": false

                },

                "type": "field_update"

            },

            "module": {

                "api_name": "Deals",

                "id": "4876876000000002181"

            },

            "description": "Triggers tasks, tags, and follow-up reminders for high-value deals lost due to pricing",

            "name": "Lost Deal due to Pricing - Follow Up",

            "conditions": [

                {

                    "sequence_number": 1,

                    "instant_actions": {

                        "actions": [

                            {

                                "name": "Lost Deal - Feedback",

                                "id": "4876876000016794047",

                                "type": "tasks"

                            },

                            {

                                "details": {

                                    "module": {

                                        "api_name": "Deals",

                                        "id": "4876876000000002181"

                                    },

                                    "over_write": false,

                                    "tags": [

                                        {

                                            "name": "Lost due to Pricing",

                                            "id": "4876876000016794071",

                                            "color_code": "#658BA8"

                                        },

                                        {

                                            "name": "Re-engagement pending",

                                            "id": "4876876000016794075",

                                            "color_code": "#879BFC"

                                        }

                                    ]

                                },

                                "type": "add_tags"

                            },

                            {

                                "name": "Deal Lost Alert",

                                "id": "4876876000016794062",

                                "type": "email_notifications"

                            }

                        ]

                    },

                    "scheduled_actions": [

                        {

                            "execute_after": {

                                "period": "business_days",

                                "unit": 30

                            },

                            "actions": [

                                {

                                    "name": "Lost Deal - Feedback",

                                    "id": "4876876000016794047",

                                    "type": "tasks"

                                }

                            ]

                        }

                    ],

                    "criteria_details": {

                        "criteria": {

                            "group_operator": "AND",

                            "group": [

                                {

                                    "comparator": "greater_equal",

                                    "field": {

                                        "api_name": "Amount",

                                        "id": "4876876000000002557"

                                    },

                                    "type": "value",

                                    "value": "30000"

                                },

                                {

                                    "comparator": "equal",

                                    "field": {

                                        "api_name": "Reason_For_Loss__s",

                                        "id": "4876876000002440001"

                                    },

                                    "type": "value",

                                    "value": "Price"

                                }

                            ]

                        }

                    }

                }

            ]

        }

    ]

}

 

The execute_when defines when the workflow should fire.

  • type = field_update means this rule runs when a field’s value changes.

  • criteria : Stage = Closed Lost so the rule triggers whenever the Stage field is updated to Closed Lost.

  • repeat = false ensures it will not trigger multiple times for the same record. 

In simple terms: “Whenever a deal is marked as Closed Lost, run this workflow.” The criteria_details section refines the trigger. The workflow only runs when the Amount ≥ ₹30,000 AND Reason for Loss = Price.

The instant_actions section inside the conditions array has the actions to be executed immediately when the criteria are met.

  • Add Tags : labels the record for easy filtering and reporting.

  • Send Email Alert : notifies the sales team instantly about the lost deal.

The scheduled_actions defines what happens after some time has passed. In this case, after 30 business days. Here, the workflow automatically creates a “Lost Deal - Feedback” task, reminding the deal owner to follow up with the customer to get feedback, and for future opportunities.

The criteria_details defines which records the workflow applies to. In this case, the rule applies to the records that satisfy the following conditions:
  1. The Amount is greater than or equal to ₹30,000, and  

  2. The Reason for Loss is “Price.”  

By combining these elements, this workflow achieves a full closed-loop follow-up system.

Conclusion:  

Zylker’s updated and new workflows make their automation smarter and more responsive. They are now able to spot key deals and ensure lost opportunities are revisited.  

And this is just the beginning. There are countless use cases you can build with workflows. We have included many examples in our Postman collection. Please check them out to get more out of the Workflow APIs. If you have a unique scenario you would like us to address, or a specific automation challenge you are facing, please let us know! We will address them in the upcoming weeks.


We hope you are now well on your way to mastering Workflow APIs. Share your thoughts in the comments or write to us at support@zohocrm.com.

Additional Reading:

  1. Workflow APIs - Part 1 - Auditing Workflows
  2. Workflow APIs - Part 2 - Find out what actions and triggers are supported for each module


    • Recent Topics

    • Gmail is ramping up its email sender policy from November 2025

      Hello marketers, As you may be aware, Gmail introduced a guideline for bulk senders starting February 2024. If not, here's a quick refresher straight from Google: After this policy was announced first in 2023 and soft-implemented in February 2024, we
    • Collapsible Sections & Section Navigation Needed

      The flexibility of Zoho CRM has expanded greatly in the last few years, to the point that a leads module is now permissible to contain up to 350 fields. We don't use that many, but we are using 168 fields which are broken apart into 18 different sections.
    • Gmail is ramping up its email sender policy as of November 2025

      Hello marketers, As you may be aware, Gmail introduced a guideline for bulk senders starting February 2024. If not, here's a quick refresher straight from Google: After this policy was announced first in 2023 and soft-implemented in February 2024, we
    • Good news! Calendar in Zoho CRM gets a face lift

      Dear Customers, We are delighted to unveil the revamped calendar UI in Zoho CRM. With a complete visual overhaul aligned with CRM for Everyone, the calendar now offers a more intuitive and flexible scheduling experience. What’s new? Distinguish activities
    • Deluge Error Code 1002 - "Resource does not exist."

      I am using the following script in a Custom Button on a Sales Return. Basically, the function takes the information in the sales return (plus the arguments that are entered by the user when the button is pushed) and creates a return shipping label via
    • Zoho Analytics Export API

      Hi Team, I’m working on some integration tasks and wanted to confirm if it’s possible to retrieve a Zoho Analytics table as JSON data using a Deluge script. I’ve already stored my custom data from multiple sources and combined it into a single source.
    • Enhance Sign CRM integration

      Hello all, I'm working on a custom Deluge script to enhance the integration between Zoho CRM and Sign by using a writer merge template for additional flexibility. I want to replicate the post-sign document integration that exists between CRM and Sign
    • Items Below Reorder Point Report?

      Is there a way to run a report of Items that are below the Reorder Point? I don't see this as a specific report, nor can I figure out how to customize any of the other stock reports to give me this information. Please tell me I'm missing something s
    • Item images

      Can we get an "On hover" expanded image for items please ?
    • Ability to Create and Manage YouTube Video Chapters in Zoho Social

      Hi Zoho Social Team, How are you? We would like to request an enhancement to Zoho Social that would allow users to create and manage YouTube video chapters directly within the platform. Currently, Zoho Social does not support manually adding chapters
    • What happens to my current site SEO if i opt for zoho creator?

      I have an existing website and I need to use Zoho creators for the rapid creation of my webpage creation. Currently, my IT team is creating the web pages, but I am concerned about the SEO of my current website if I shift to zoho will i loose it all?
    • Automatic Portal invite

      We have numerous customers we move through a blueprint in deals, when they get to a certain point we need to give them portal access, how can this be done through deluge or a workflow?
    • Preview Emails with Merge Fields before sending

      Hello, Are there plans to preview an email with merge fields before sending out? Currently, all you see in the preview are the merge field values, but before I send out the email I want to make sure the merge is working. Also, the saved emails only show
    • User Filter not selecting All Items

      We are encountering 2 issues when using the user filter. When users are trying to search using the filter option, the OK button is grayed out. Users have to unselect or make a change before it filters properly. 2. When filtering and the OK button works,
    • Support Nested JavaScript Variables in PageSense Pop-up Targeting

      Hello Zoho PageSense Team, I hope you're doing well. I’d like to request a feature enhancement for the PageSense pop-up targeting functionality. Current Limitation: Currently, PageSense pop-ups can be triggered using simple JavaScript variables. However,
    • Cannot Invert Axis for Rankings

      Hi there I want to be able to create a ranking graph in Analytics/BI, with 1 at the top of the Y axis, but I am unable to invert the axis. Super simple example in Excel below. Higher rankings need to be higher up on the graph to give the correct visual
    • How to copy value from a single line field into a picklist field within a module's subform?

      Hello there, I have a single line field in a module's subform. I would like the value in the field to automatically update a picklist field within the same subform (both have items with the same names). Is this possible via function? Unfortunately, workflows
    • Committed Stock and To Be Received Stock via API?

      Is it possible to retrieve Committed Stock and/or To Be Received Stock for an Item via the API? I want to use this information for calculating the amount of inventory needed to be purchased.
    • Creating Email template that attaches file uploaded in specific field.

      If there's a way to do this using Zoho CRM's built-in features, then this has eluded me! I'm looking to create a workflow that automatically sends an email upon execution, and that email includes an attachment uploaded in a specific field. Email templates
    • Marketer’s Space - Automate a Personalized Holiday Workflow with Zoho Campaigns

      Hello marketers, Welcome back to another post in Marketer’s Space! From Thanksgiving through Christmas, you have a flurry of opportunities to connect with your audience. In this post, we’ll see how you can plan an entire month-long automated workflow
    • Zoho Inventory Custom Field Update

      Hello All, In this post I am describing how can we Update the Custom Field Value in Zoho Inventory. // Get Org ID orgid = organization.get("organization_id"); // Field Value resvp = ifnull(item.get("purchase_rate"),null); // Record ID iid = item.get("item_id");
    • Sorting columns in Zoho Projects

      Hi, In project management best practice, sorting columns (ascending, descending) is an important tool. Sorting dates to see the order of tasks starting, sorting on priority or even on planned hours is a must for an efficient project control. Currently,
    • Zoho CRM - Calendar Cards View - Let Users Decide What Is Displayed On Calendar Entries

      Imagine planning your week of face-to-face meetings across three counties. You’re trying to group appointments by location to make the best use of your time, but Zoho CRM’s calendar doesn’t show where each meeting is happening. You’re left trying to remember
    • Explore the Redesigned Quotes Module in Zoho Billing

      Dear users, We’re excited to introduce a refreshed look for the Quotes details page in Zoho Billing! This update brings you a more efficient user interface experience without changing your existing workflow. We've enhanced layouts with organized tabs,
    • Updating custom fields in Zoho Projects

      Hi I am wondering if anyone has experience with custom fields in Zoho Projects. I am struggling to update the field using either deluge or the api endpoint. My code is: //custom_Map = map(); custom_Map = {"UDF_DOUBLE_1":"0.27"}; update_Map = map(); update_Map.put("custom_fields",custom_Map.toList());
    • Zoho Inventory - How to pay a supplier up front then receive multiple deliveries

      How do we manage situations where we pay a supplier up front, then the receive the products in increments? Example Workflow: Create Purchase Order > Receive Bill for full amount > Receive Items 2 or more deliveries. Currently, once a Bill is created against
    • Pin multiple columns and adjust column widths in CRM subforms

      Hello all, Subforms act as secondary forms or tables in which you can associate multiple line items to a primary record and thereby ensure more structured and comprehensive data organization. We've made some recent enhancements to subforms. Here's what's
    • Zoho Books | Product updates | November 2025

      Hello users, We’ve rolled out new features and enhancements in Zoho Books. From translating email notification templates to the new transaction locking restrictions, explore the updates designed to enhance your bookkeeping experience. Making Tax Digital
    • How can I add or change the active customer in Zoho Projects?

      I'm trying to change the customer in an active Zoho project. Is it possible to add or change the customer?
    • Almacenamiento

      Hola, Quisiera saber como podría hacer para bajar el almacenamiento de 5gb a mis usuarios, en otras palabras los quiero ir limitando de la cuota real, y luego ir agregando poco a poco la cantidad hasta llegar a los 5gb que me dan en el plan free. 
    • What happens when someone clicks 'unsubscribe' in a zoho CRM email

      Hello, As per, i am going round in circles trying to find an answer to these 2 question. I have an email template that has an unsubscribe link in the footer in zoho CRM. First, what happens when someone clicks it - where does the contact get unsubscribed
    • Nimble enhancements to WhatsApp for Business integration in Zoho CRM: Enjoy context and clarity in business messaging

      Dear Customers, We hope you're well! WhatsApp for business is a renowned business messaging platform that takes your business closer to your customers; it gives your business the power of personalized outreach. Using the WhatsApp for Business integration
    • Zoho CRM - Scheduled Reports Which Contain Chart

      Hi Zoho CRM Team, I'm requesting that the Report Export and Scheduling feature be enhanced to include a chart, if one has been created on a report. At the moment I have a report which shows Sales This Week by Deal Owner and a pie chart at the top of the
    • 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
    • Cadences

      I have just started using Cadences for follow-up up email pipeline. Is it just me or do you find the functionality very basic? For example, it will tell me (if I go looking for it) if someone has replied to a follow-up and been unenrolled; but it won't
    • Canvas View in Zoho Recruit

      Is it possible or would it be possible to have the new 'Canvas View' in Zoho Recruit?
    • Zoho Inventory - Move Orders

      Quick question about Move Orders... Why is there no status to say something like "Draft", "In Progress" and "Completed", similar to Transfer Orders? I'm assuming that when something needs to be moved it should be planned in Inventory, executed and then
    • Kaizen #215 - Workflow APIs - Part 3 - Create and Update Workflow Rules

      Welcome back to another week of Kaizen! Over the last couple of weeks, we’ve joined Zylker Cloud Services as they review and improve their workflows. In Part 1, we discovered and audited their sprawling workflow landscape. In Part 2, we learned how to
    • 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.
    • Issue in Zoho People Regularization – Incorrect Hour Calculation

      I have noticed that when applying attendance regularization in Zoho People for previous dates, the total working hours are not calculated correctly. For example, even if the check-in is 10:00 AM and check-out is 6:00 PM, the system shows an incorrect
    • Next Page