Advanced Deluge help needed with custom function and COQL limits

Advanced Deluge help needed with custom function and COQL limits

I have a scheduled function that takes a snapshot of specific metrics and saves them to a custom module. However I'm struggling with the limits of COQL.

I attach my full code, but an example of the issues I'm having is that it's erroring with a 'Limit Exceeded' error. I believe this is because the COQL can only handle 50 records  

Full error :
{ code: 'LIMIT_EXCEEDED' , details: {...} , message: 'value limit exceeded' , status: 'error' }
code : LIMIT_EXCEEDED
details : { by: 'where' , limit: 50 }
message : value limit exceeded
status : error

This is the section of code it's referring to :
  1. // === Step 4: Query using COQL with ID filter and BANT stages
  2. varBaseCrit = "'Committed, not Signed','In Quotation (Awaiting Proposal)','In Quotation (Awaiting Response)','In Quotation (Clarify Requirements)'";
  3. varBasePayload = Map();
  4. varBasePayload.put("select_query","SELECT Total_Amount, Stage, Closing_Date, Created_Time, Deal_Name FROM Deals WHERE Stage in (" + varBaseCrit + ") AND " + varIdClause);
  5. // Send the request
  6. varBaseResponse = invokeurl
  7. [
  8.     url :"https://www.zohoapis.eu/crm/v5/coql"
  9.     type :POST
  10.     parameters:varBasePayload.toString()
  11.     connection:"REDACTED"
  12. ];
  13. info varBaseResponse;
I have several of these sections throughout the code and the number of IDs in varIdClause has hit 54 which is why it's hit this limit.

How can I fix this - is there a solution ?
      • Recent Topics

      • email signature

        How do you add an email signature
      • Email Forwarding | How to Enable and Disable Email Forwarding on a Non-Admin User Account

        Email Forwarding Issue: Enable and Disable Email Forwarding
      • Ask the Experts 31: Improving support performance with reports and dashboards

        Hello everyone, Join us for the next Ask the Experts (ATE) session! Ask the Experts is an opportunity to connect with people who have deep knowledge of Zoho Desk. Let's look at the topic we're focusing on this month. Just as we rely on the right tools
      • Product updates in Zoho Workplace applications | June 2026

        Hello Workplace Community, Let’s take a look at the new features and enhancements that went live across all Workplace applications for the month of June. Zoho Mail Alphanumeric support for attachment extensions in rule conditions Attachment extension
      • Biggest supported size of a note

        I'm still testing this ZOho Notebook before purchasing a premium licence and can't work with large notes. I store personal vocabulary in two 13,000-word / 83200-character notes. Same poor experience with PC, Web, and mobile apps: Is there an application
      • I need help lease Email

        I' not getting an email replay when someone open a ticket
      • Sigma function call hangs forever from Desk widget — app_install_id/encapiKey are null

        Calling ZOHODESK.request() from the widget to invoke a Sigma DRE function URL hangs forever (never resolves, never rejects, no error) until client timeout. Tried with merge fields app_install_id={{sigmaInstallId}}/{{installationId}} and encapiKey={{enCapApiKey}}
      • Draft quotes, sales orders, and raise invoices for services in CRM

        Create Quotes, Sales Orders, and Invoices for Services in Zoho CRM You can now draft Quotes, and Sales Orders as well as raise Invoices for services in Zoho CRM. And how is that possible? By filling out the Service subform in your Quotes, Sales Orders
      • Error Code 2945 , PATTERN_NOT_MATCHED

        Hi, I am trying out Zoho Creator API.  However, I always get the following <response>     <code>2945</code>     <message>PATTERN_NOT_MATCHED</message> </response> However, error code list error as Invalid Ticket. I do not know what is wrong. 
      • Action Required: Allowlist New IP Ranges for the EU Data Center

        Dear Users, We are adding new IP ranges for the Zoho Analytics EU data center (https://analytics.zoho.eu) If you connect Zoho Analytics to cloud databases (both Live Connect and import), such as Amazon RDS, Amazon Redshift, or Microsoft Azure, you must
      • Is there a way to see a total of time agents spend on ticket today in Analytics?

        I am trying to see if there is a way to look at and add the total amount of time agent have entered into tickets in desk TODAY, like a running total, not every time entry so it would show John smith 1:55:20 total Bob smith 4:20:22 total etc
      • Tips & Tricks #3: Zoho CRM - Agentes en la página de inicio

        Hola a todos, Vuestros Agentes realizan un trabajo muy útil. Encuentran información como clientes potenciales importantes, oportunidades de venta y actualizaciones relevantes. Sin embargo, hasta ahora no era posible ver esa información directamente en
      • Automating CRM backup storage?

        Hi there, We've recently set up automatic backups for our Zoho CRM account. We were hoping that the backup functionality would not require any manual work on our end, but it seems that we are always required to download the backups ourselves, store them,
      • 'Pinned' notes feature of a pipeline record

        Hi team, Could you please implement a feature which will allow users to pin different notes so that they will appear at the very top of the notes tab in a pipeline record. Sometimes we have a wide range of notes on a record which means more important
      • Associate emails from both primary and secondary contacts to deal

        We need to associate emails from multiple contacts to a deal. Please advise how this can be achieved. At present, only emails from primary contacts can be associated. Thanks
      • #PitStop3: Share & Collect Payment using Zoho Invoice

        We have reached another milestone in our journey. Post #15 to #20 weren't just about sharing invoices, they were about building a payment workflow that works for you, your customers and your business. Here's a quick wrap of what we covered in this segment:
      • Suggestions for Improving the Deluge Development Experience

        Hello, I would like to share some ideas that could significantly improve the Deluge development experience, especially for partners and developers building larger solutions across the Zoho ecosystem. Some key areas that would add a lot of value: Deluge
      • Enhancement announcement: Mitigate mailbox clutter using the new field: "Sync emails from"

        Dear Customers, We hope you're well! We are here with a minor enhancement in email integration in Zoho CRM. Emails have become the primary mode of communication these days. Because of which mailboxes are getting overly cluttered day after day. To help
      • Zoho CRM Sandbox now supports integrations

        Hello everyone, We are now expanding Zoho CRM Sandbox to support integrations with other Zoho products. You can connect, configure, and validate the behavior of your integrated tools within a safe, isolated environment - testing end-to-end without touching
      • Building Toppings #8 - Using widgets to extend the Bigin UI

        Hello Biginners, In our previous forum post, we explored schedules and workflow functions and learned how to automate real-time and time-based actions inside a topping. In this post we'll look at how to embed custom UI components inside Bigin using widgets.
      • Tip #81 – Turn every session into a story with Session Highlights – 'Insider Insights'

        Hello Zoho Assist Community! Picture this: your team wraps up dozens of remote support sessions every week. Each one involved troubleshooting, tools, fixes, and back-and-forth with customers. But when it's time to review what actually happened across
      • Zoho CRM APIs

        Hello, I think as a developer, it is very important to have the ability to manage, develop, and execute functions directly from my local development environment (for example, VS Code). Zoho CRM should have a way to create, deploy, and manage functions
      • 🎙️ Ask The Experts: Get Your Bigin Questions Answered Live

        We've seen so many thoughtful questions from our #BiginnersClub community over the years. While we're always happy to help here, we're excited to introduce a new way for you to connect with us directly. Join us for Ask The Experts, a one-hour live fireside
      • Postcode problems

        So we were very pleased to see we could limit shipping with postcodes. Brilliant. Unfortunately we have discovered It does not seem fit for purpose. In the UK we write postcodes in various ways Examples BH217NL BH21 7NL Bh217nl bh217NL and many more ways
      • Certain items certain shipping

        Me again it would be helpful to have different shipping for different categories. Our example are salt. Delivery is free but have a minimum delivery. Pickup is cheaper so it has its own category- pickup.
      • Cookies Consent Management in Webforms

        Hello Everyone! We are excited to introduce Cookie Consent Management for webforms. Read on to learn more. Webforms are online forms embedded on websites that allow users to submit data and create records in Zoho CRM. These forms utilize cookies to track
      • Payment links in Bigin just got supercharged

        Greetings, We're happy to announce major enhancements to the Payments feature in Bigin. As you may already know, Bigin supports Payments integration, which enables you to create and send payment links directly from Bigin to your customers. It also allows
      • Disable Spam filter

        Hi Support Team, Please disable spam filter for https://desk.zoho.in/support/keboli. Some spam ticket ids: #102, #103, #104
      • I just signed up

        Hi, I have just signed up for the domain griffithcgenterprises.com. I would like to make two adjustments: If possible, I would prefer a 5 GB hosting/email plan instead of the current 10 GB option, as I believe that should be sufficient for my needs at
      • History tab stuck loading indefinitely on Android (v2.22.0)

        History tab stuck loading indefinitely on Android (v2.22.0) — server returns 500 on visitorhistoryviews Hi all, I'm running into an issue where the History tab in the SalesIQ Android app (v2.22.0) never loads — it just spins indefinitely. Screenshots
      • Não consigo enviar e receber e-mail

        Estou tendo problema de envio e recebimento de e-mail (meu e-mail é ands....lisi.com.br) Esta mensagem foi criada automaticamente pelo software de entrega de e-mails. Uma mensagem que você enviou não pôde ser entregue a um ou mais destinatários. Este
      • إلغاء الإشتراك

        أريد إلغاء الإشتراك نهائياً.
      • Opening two notes at once in the Mac app

        Just like the title says - I want two notes open the same time on my Mac Air. AI search seems to think I have the option to open one window, then click on a second one. But of course if one window is open I can't see the others. It also recommended using
      • Department Customization Copy/Paste

        Hello! I love the new customization of the layouts, rules and templates! However, we have several "departments" that operate similar and as I'm updating either ticket layout or workflow rules, I'm finding that I have to do it in each department. I would
      • How do you import mail from Thunderbird into ZOHO mail

        Hi, We have Thunderbird on our Apple Macs and want to transfer the emails from this to our shiny new Zoho mail account. I know using Outlook on a PC you can zip the .eml files up and upload them into specific folders on your ZOHO mail account using this form: mail.zoho.com/mail/jsp/importFolder.jsp However as Thunderbird use mbox files I'm not sure how to do it. Can anyone let me know if they have migrated mail from Thunderbird to Zoho mail and how they did it. I have many folders and emails to transfer
      • How to Open .mbox file in Gmail with Attachments?

        Gmail offer users to backup INBOX folder in .mbox file format via Google Takeout Feature. Howver there is no such option to Restore Gmail MBOX. Thus I would like to suggest you to choose an alternate approach i.e. MBOX to Gmail Wizard. This utility will open .mbox file in Gmail with attachments.  Steps to open MBOX file in Gmail are; Run MBOX to Gmail Wizard Click Add File and add .mbox file. Enter your Gmail login credentials. Click Convert button. Finished! This is how you can open MBOX file in
      • Poor Zoho Support

        Been trying to reach support via telephone and email. The support has always been slow to respond but now its been two weeks without a return call. I have even sent them screen shots of the problem I've having with no results. Is anyone had the same problem.
      • Desk Contact Name > split to First and Last name

        I am new to Zoho and while setting up the Desk and Help Center, I saw that new tickets created or submitted from the Help Center used the Contact Name field. This would create a new Contact but put the person's name in the Last Name field only. The First
      • SalesIQ operators will not receive any messages if customers do not answer the Pre-Chat questions in Flow Controls.

        Hi Zoho SalesIQ Team, I am reaching out to report a issue regarding the Brands > Flow Controls SalesIQ operators will not receive any messages if customers do not answer the Pre-Chat questions in Flow Controls and continue sending messages without completing
      • Add Comprehensive Accessibility Features to Zoho Writer

        Hello Zoho Writer Team, We hope you are doing well. We would like to submit a feature request to enhance Zoho Writer with a full set of accessibility tools, similar to the accessibility options already available in the Zoho Desk agent interface. 🚧 Current
      • Next Page