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

    • New Field in CRM Product Module Not Visible in Zoho Creator for Mapping

      I created a new single-line field in the Products module in Zoho CRM. Zoho CRM and Zoho Creator are integrated, but the newly created field in CRM is not visible in Zoho Creator when I try to map fields.
    • Send WhatsApp voice messages from Bigin

      Greetings, I hope all of you are doing well. We're happy to announce this enhancement we've made to Bigin. Bigin's WhatsApp integration now supports audio messages, so you can record and send voice messages. This makes it easier to handle customer questions
    • Microsoft Teams now available as an online meeting provider

      Hello everyone, We're pleased to announce that Zoho CRM now supports Microsoft Teams as an online meeting provider—alongside the other providers already available. Admins can enable Microsoft Teams directly from the Preferences tab under the Meetings
    • I want to subscribe 1 professional user but the email only 250 per day?

      When I subscribe 1 professional user, I am only able to send 250 email per day? So less? Or is it typo, 2500 rather than 250? Any sale agent or friends can clear my doubt? Thank You
    • How to add a % Growth column for year-over-year comparison (2024 vs 2025)

      Hello, I am trying to build a monthly revenue comparison between 2024 and 2025 in Zoho CRM Analytics. My current setup is: Module: Deals (Affaires) Filter: Stage = Closed Won Date field: Closing Date Grouping: By Month Metrics: Sum of Amount for 2024,
    • How do you map a user picklist field to another user picklist field.

      In Zoho Projects, I'm trying to map a custom field (user picklist) in Task Details to a field (user picklist) in the Project Details. How do you get the two to map to each other? This is what I currently have that works for my other fields but doesn't
    • Explore Competitive 3D Scanner Prices at Protomont Technologies

      The genesis of Protomont Technologies emerged from the collaborative efforts of the founders in 2019, both the founders shoulder an enormous experience in the world of 3D Printing. Protomont Technology aims to craft your vision with creativity, empowering
    • New and improved API resources for Zoho Sign Developers

      Hello, Developers community! We know that for you, an API's real value depends on how quickly, easily, and reliably you can integrate the it with your application. That's why we're excited to talk about the recent improvements to our developer resources,
    • stock

      bom/bse : stock details or price =STOCK(C14;"price") not showing issue is #N/A! kindly resolve this problem
    • Project Approval Process Workflow

      Issue: When a new Project is created, there is lack of process/workflow that provides their manager a process to approve or review. Suggestion/Idea: Similar to “Workflow”, we need “Workflow” ability at Project level, where based on the criteria of the
    • Marketing Tip #5: Improve store speed with optimized images

      Slow-loading websites can turn visitors away. One of the biggest culprits? Large, uncompressed images. By optimizing your images, your store loads faster and creates a smoother shopping experience leading to higher sales. It also indirectly improves SEO.
    • Why can I not choose Unearned Revenue as an account on items?

      Hello, I do not understand why we don't have the ability to code an item to unearned revenue. It is not an uncommon situation to have in business. I understand that there is the Retainer invoice as an option, however that doesn't really work for us. Our
    • Form Submission Emails

      Is there a current delay with submission emails being sent? We've had 10-20 forms completed today but only a handful of emails.
    • Rules not working properly

      I created a rule to display certain fields on certain states. But it seems to be not working. It hides the fields even when I selected California, (which is a state that should show the fields when selected)
    • Notebook font size issue

      If I copy something from somewhere and paste it in my notebook, the font size becomes smaller.
    • Sign in process is beyond stupid. I'd rather plug my phone into USB and copy files than sign in to this POS.

      792 clicks and fields to fill in just to get into a 3rd rate app is too stupid for me.
    • Ampersand in URL parameter // EncodeURL does not work

      Hi Zoho, I have a url link with a parameter. The parameter is including ampersand in some cases (Can be "H&M" or "P&I") When trying to use %26 instead of "&"  (the result I get using EncodeURL()) I get H%26M instead of H&M in the parameter field. How can I solve this? Thanks! Ravid
    • how can we create in zoho crm a new contact when the looup does not find a similar existing one

      In forms/integrations/zoho crm / ne w record tab, contact name is to be mapped with my form contact name. When I go in biew edit/lookup configuration, I don t get the options (help dedicated page simply repeat the same info you get in the app) and does
    • Directory Websites

      Directories are a good website category to gain search engine traffic. Directories for a professional service category as an example can help their members in search results over their individual website. It would be nice to have a directory template
    • Manage Task on Mobile

      How do we manage our task on mobile devices? It seems that there should be a standalone mobile app to handle the new task features. The new features released in regards to Task management are great by the way! Now we need to bring that all together in
    • Set Default Payment Method & Default account

      Hi, I would like to know how to set the default payment method and default bank account when recording payments in zoho books. At present we have to change these fields everytime we record a payment, which leads to potential error and as we have a very
    • Customer Portal on Zoho Desk

      Hi, I'd like to know more about the items below I found when setting up the Customer Portal on Zoho Desk. Could someone help me explaining these in details? Especially the 2nd and 3rd point. Thanking you in advance! Permissions Customers can sign up for Customer Portal Customers can view tickets of their organization (contacts) Customers must register to access Customer Portal Display Community in Customer Self Service portal
    • Computer Showing Offline in Unattended Access

      I have a computer that was connected to the internet but showing offline in Assist. I tried uninstalling the program and deleting it from Zoho Assist the reinstalling and it still does not show up. I have been a user for several months and am not pleased with the lack of connectivity with Assist. If this continues I will have to find another product. The computer I reinstalled it on is not even showing up in Assist now. The name is NYRVLI-PC. Thanks
    • Closing Accounting Periods - Invoice/Posting dates

      Hi, I have seen in another thread but I'm unsure on how the 'transaction locking' works with regards to new and old transactions. When producing monthly accounts if I close December 24 accounts on 8th Jan 25 will transaction locking prevent me from posting
    • Zoho CRM Portal Error

      Hi, We’re experiencing an issue with the Zoho CRM Portal. When we try to access it, we receive an HTTPS connection error: net::ERR_CERT_COMMON_NAME_INVALID. If we proceed past that, we then get a 400 Bad Request error. Could you please help us resolve
    • Can we do Image swatches for color variants?

      We want to do something like the attached screenshot on our new zoho store. We need image swatches instead of normal text selection. We want to user to select an image as color option. Is this doable? I don't see any option on zoho backend. Please h
    • Integrating Zoho CRM EmbeddedApp SDK with Next.js — Initialization and Data Fetching Issues

      You can get an idea from my code I have given in end: First, I worked on a React project and tried the same thing — it worked. My goal was to import the Zoho script and then load contacts using the Zoho Widget SDK, which was successful in React. Now,
    • Script Editor not an option

      I am trying to apply a script to a sheet and Script Editor is not an option. I don't want to go outside Sheets to do this (like Creator) if it can be done inside Sheets.
    • monetizing the courses

      Can I add a price for course enrollment ?
    • Can we add zoho books features like invoices estemates etc on our zohocommerce website. When our customer login with their account they can able to see all books features in one place on zohocommerce?

      Can we add zoho books features like invoices estemates etc on our zohocommerce website. When our customer login with their account they can able to see all books features in one place on zohocommerce?
    • Copy paste from word document deletes random spaces

      Hello Dear Zoho Team, When copying from a word document into Notebook, often I face a problem of the program deleting random spaces between words, the document become terribly faulty, eventhough it is perfect in its original source document (and without
    • Create custom rollup summary fields in Zoho CRM

      Hello everyone, In Zoho CRM, rollup summary fields have been essential tools for summarizing data across related records and enabling users to gain quick insights without having to jump across modules. Previously, only predefined summary functions were
    • Download a file from within a zoho creator widget

      I have a widget running in Zoho Creator , it displays uploaded documents in a table file, and I have added a download link in the view. ( The widget is created with html, css and javascript). I do not succeed in getting the download working. Do I have
    • Taxes for EU B2B Transactions

      Currently, ZC doesn't seem to have a procedure for validating VAT numbers of businesses purchasing in another EU state, and removing local VAT is valid. This is essential for all inter EU B2B trade.
    • Unable to Receive Emails on Zoho Mail After Office 365 Coexistence Setup – Error: 553 Relaying Disallowed

      Hello, My domain name is bigniter.com, and I’ve been using Zoho Mail as my email service provider without any issues. Recently, I followed the steps outlined in the Zoho documentation to enable Coexistence with Office 365: 🔗 https://www.zoho.com/mail/help/adminconsole/coexistence-with-office365.html#multi-server
    • CRM Related list table in Zoho analytics

      In Zoho Analytics, where can I view the tables created from zoho crm related lists? For example, in my Zoho CRM setup, I have added the Product module as a related list in the Lead module, and also the Lead module as a related list in the Product module.
    • Candidate Registration/Invitation

      It would be great to include the 'invite' candidate functionality into some of the automation functions - ether through a custom function trigger or webhook or accessible through an email template.  Currently there is no way to add this functionality into any workflows or blueprint steps which, I find limits the ability to invite candidates to engage with us directly through our candidate portal. 
    • [Free Webinar] Learning Table Series - Creator for Infrastructure Management | A Partner-driven collaborative session

      Hello Everyone! We’re excited to invite you to another edition of Learning Table Series, where we showcase how Zoho Creator empowers industries with innovative and automated solutions. About the Learning Table Series The Learning Table Series is a free,
    • Where we can change the icon in social preview

      Hi, we changed our logo, and the image that appear in preview (ex : when we post a appointment link somewhere) is still our old logo. I did change our logo in the org setting. https://bookings.zoho.com/app/#/home/dashboard/settings/basic-info?clview=false
    • I have error AS101 when I try to add paypal@mydomain.com to Zoho

      Please help me with this. I tried to call the help line 4 times but don't get any response.
    • Next Page