I keep getting a max number of requests error in my function

I keep getting a max number of requests error in my function

There was a change in how report automation is made and it caused us having to create a custom function in zoho expense. I'm trying to grab all expenses of the month from each user and create a report. However, I'm getting too many API Calls error. How am i able to fix that? try used a try-catch but I was still getting the same error. This is my current code, there are over 100 users.

  1. userList = List();
  2. currentMonth = zoho.currentdate;
  3. firstDay = currentMonth.eomonth(0);
  4. lastDay = currentMonth.eomonth(-1).addDay(1);
  5. headerUser = Map();
  6. headerUser.put("X-com-zoho-expense-organizationid","643169496");
  7. usersresponse = invokeurl
  8. [
  9. url :"https://www.zohoapis.com/expense/v1/users"
  10. type :GET
  11. headers:headerUser
  12. connection:"adminexpense"
  13. ];
  14. users = usersresponse.get("users");
  15. for each  person in users
  16. {
  17. userID = person.get("user_id");
  18. userList.add(userID);
  19. }
  20. for each  ID in userList
  21. {
  22. params = Map();
  23. params.put("user_id",ID);
  24. params.put("date_start",firstDay);
  25. params.put("date_end",lastDay);
  26. headers_data = Map();
  27. headers_data.put("X-com-zoho-expense-organizationid","643169496");
  28. response = invokeurl
  29. [
  30. url :"https://www.zohoapis.com/expense/v1/reports/expensedetails"
  31. type :GET
  32. parameters:params
  33. headers:headers_data
  34. connection:"adminexpense"
  35. ];
  36. if(response.get("message") == "Please check the date range")
  37. {
  38. continue;
  39. }
  40. info response;
  41. }



        • Recent Topics

        • Note not being pulled for other modules in email template

          Hi there, Currently i am creating an email template that is able to pull the data from notes field in estimate module and email it to procurement team where they will be able to receive the email with the contents of the note, i am unable to replicate
        • Leave Policy for Brazil

          Hi, Brazil asked us to configure Zoho People to apply the following policy: · To block starting vacations 2 business days before holidays or weekends; Employees cannot start their vacations 2 days before holidays or weekends. Example: If December 25th
        • Grouping payments to match deposits

          Is there a way to group multiple invoice payments together so they match credit card batches and grouped deposits in the bank account? Basically, we are creating invoices for each of our transactions, and applying a payment to each of the invoices. Our payments are either credit cards or checks. We want to be able to group payments together so when our bank account reflects a credit card batch made up of many transactions, or the deposit we took to the bank that has multiple checks from different
        • No Sales Returns on SO's with Dropped Shipped items + Inventory Items

          We have encountered an issue in Zoho related to sales orders that include both dropshipped items and inventory items. Specifically, it is currently not possible to create sales returns for the company’s own inventory items from these sales orders. This
        • Pre-fill TO and CC fields for Email Templates

          This would be a game changer to be able to set either specific email addresses or merge fields based on deal role titles into email templates. Please pass this along to *hopefully* add to future features of Zoho CRM.
        • Pick list - Cannot save list "Special Characters not Allowed" error message

          Bulk uploading values. All values are pretty standard - with the exception of a "-" (dash). Like:  Industry - Prepared Food Is the simple dash a special character too? Jan
        • Formula fields - Request for dynamic recalculation / proper implementation

          Hi Guys, I have a big problem with Zoho formula fields. They don't recalculate each time the record is viewed - only when a record is edited. Formula fields should be updated dynamically each time a record is retrieved. As an example: I have a formula
        • Zoho Assist "Agree and Download" Button "Greyed Out" ("Light Blued" Out)

          Anyone else having issue where support clients are unable to click "Agree and Download" to access the client so that we can provide remote support? This is for "on demand" support via accessing the support page and entering the support key and name. This
        • Zoho Creator Integration with QuickBooks: A Step-by-Step Guide

          Introduction: Integrating Zoho Creator with QuickBooks allows you to sync your business data between the two platforms, providing a seamless experience for managing accounting, invoicing, and financial data. This integration helps automate workflows and
        • Bigin API Token Request

          Hi people, I tried to connect to the API without success, I've read all of the documentation multiple time and tried just about everything. I tried to do it with Python Request module and with Postman, passing the information through both the URL parameter
        • Error 403: Forbidden When Updating Email Signature via API

          Hi Zoho Desk team, First, congratulations again on the excellent Zoho API. But, I’m encountering an issue while attempting to update an email signature via the API. Whenever I make a request to update the signature, the response returns an HTTP 403 Forbidden
        • Flow with CRM

          Hello, I have a simple flow that uses a web hook to enter data into a Sales Order. I have the web hook sending Flow data which has a PO field. If the PO has a special character like - or / or \ the task fails. How can I get the flow to be okay with the
        • Making the Resolution Tab Mandatory

          Hello Everyone! This edition is here to show you how to make the Resolution mandatory when closing a ticket. The Ticket Resolution tab helps keep a record of the solution provided for the ticket query. The resolution can serve as a quick reference to
        • Customize your calendar based on personal preferences

          Greetings, We're happy to introduce a few new capabilities to the Activities module's Calendar View! Now you can tailor your calendar's appearance and notification settings to suit your needs. In the past, the Calendar View lacked customization options
        • See Calendar When Creating Meetings On Record Page

          It would be a great user experience to see you calendar while you are creating a meeting on a record page. Here is how I imagine it could look:
        • Remove County field from Customer Address input screen (or allow input to be deleted)

          We are in the USA and have just noticed that there is now a County field in the Customer Address input screen (and maybe other areas of Zoho Books, but this is the one affecting us at the moment). County is not important to our business, and in fact we
        • Client Script - mapping data from different module

          Dear ZOHO Team Firstly I need to describe the need - I need to have data from Contacts module based on lookup field - the 5 map limit is not enough for me because I have almost 20 fields to copy So I have decided to make a Customer Script - and from unknown
        • Custom Deal Name in Lead Conversion Mapping

          I know there are ways to change the name of a Deal after conversion using a custom function, so no need to repost that information. I would like to see the CRM Improved with Deal Name Customisation and I think the Lead Conversion Mapping page would be
        • Automation#25: Move Tickets to Unassigned When the Owner Is Offline

          Hello Everyone, Welcome to this week's Community Series! 'Tis the holiday season—a time when work often takes a brief pause. The holiday spirit is in full swing at Zylker Techfix too, with employees taking some well-deserved time off. During this period,
        • Add Feature To Hide Plugin Sections On Record View

          Hi team, I'm trying to help a client tidy up their CRM. When it comes to record view some sections and fields are visible no matter what Layout Rules are applies and they are not removeable from the layout editor. I would like to see an option to hide
        • Callback URLs

          I need to connect to an external service through an API that requires me to provide a Callback URL so that a status update can be sent back when the API request has been processed. Is there a way to do this in Creator without having to use a middleware
        • Email signature not being included if user creates ticket / sends email

          When I create a ticket (send email), the signature doesn't appear to be added to the ticket. Can you confirm if this is the case? It would obviously be useful to include the user's signature even when sending a client an email and not only on replie
        • Zoho Notebook window ignores taskbar

          When maximized to full screen, the Zoho Notebook window ignores the presence of the taskbar and overlaps it. What could be the problem? Linux Mint 22 Cinnamon. Zoho Notebook 3.2.0
        • Document images

          We used to be able to rotate the images but this has now been removed ???
        • Missing "Email Authentication" tab

          Backstage is alerting users about "Unauthenticated Domains" with a large prompt in the backend. It adds a link to learn more. On this tutorial page, it shows where to find the "Email Authentication" tab in this screenshot. However, in our Backstage, that
        • Task module and related-to field

          In modules other than the Task Module I can add several lookup fields to provide a variety of relationships. In the Task module lookup fields are not available. There is only one "related to" field which I want to use for Company. But I want to relate
        • Add Lookup Field in Tasks Module

          Hello, I have a need to add a Lookup field in addition to the ones that are already there in the Tasks module. I've seen this thread and so understand that the reason lookup fields may not be part of it is that there are already links to the tables (https://help.zoho.com/portal/en/community/topic/custom-fields-on-task-module).
        • Zoho Creator customer portal limitation | Zoho One

          I'm asking you all for any feedback as to the logic or reasoning behind drastically limiting portal users when Zoho already meters based on number of records. I'm a single-seat, Zoho One Enterprise license holder. If my portal users are going to add records, wouldn't that increase revenue for Zoho as that is how Creator is monetized? Why limit my customer portal to only THREE external users when more users would equate to more records being entered into the database?!? (See help ticket reply below.)
        • VENDORS ARE NOT SYNCHED WITH CONTACTS IN CRM

          Hello, While the ACCOUNTS and CONTACTS (Including the primary contact) are synced with the CONTACTS module in CRM, the vendor's CONTACTS are not synced with CRM - which basically forces the users to re-enter all vendor's contacts twice and then update
        • Join ZohoPeers - A New Community Discord Server for Zoho Users!

          Hello Zoho Community, We would like to invite you to join ZohoPeers, a brand new Discord server created to complement the official Zoho community forum. Please note, this server is not meant to replace or detract from the official forum, which remains
        • What do the Image Sizes mean in Zoho CRM Email Templates?

          Below you can see the image options in email templates: Banner, Fit, Small, Medium, Original, Custom. Can someone from Zoho please share with me: What each is/means? How each will look on desktop AND mobile? How to edit "custom"?  If I choose "Custom"
        • Q4 Europe In-person Zoho User Group Meetup: Streamlining Your Business Processes & Introduction to Zoho CRM for Everyone

          Hello Zoho Community, We are excited to announce our upcoming Zoho User Group meetup in Europe! This session is designed to help you streamline your business processes using Zoho CRM, with a special focus on enhancing customer interactions and leveraging
        • Recommendations to store meeting notes for easy access from Contacts, Accounts & Deals module records?

          I would like your advice on how to achieve this use case for my organization. It’s related to where/how best to store meeting notes from a conversation with Contact(s) working at an Account (Company) in the context of a Deal. The ideal solution (from
        • Involved account types are not applicable when create journals

          { "journal_date": "2016-01-31", "reference_number": "20160131", "notes": "SimplePay Payroll", "line_items": [{ "account_id": "538624000000035003", "description": "Net Pay", "amount": 26690.09, "debit_or_credit": "credit" }, { "account_id": "538624000000000403", "description": "Gross", "amount": 32000, "debit_or_credit": "debit" }, { "account_id": "538624000000000427", "description": "CPP", "amount": 1295.64, "debit_or_credit": "debit" }, { "account_id": "538624000000000376", "description":
        • KB Templates

          * It would be nice if Zoho can provide users an option to create custom templates for KB articles. Also, it would be nice as well if the users can have an option to 1.) select a default template and 2.) declare default tag/tags, for KB articles created through Ticket's resolution.
        • Directly Edit, Filter, and Sort Subforms on the Details Page

          Hello everyone, As you know, subforms allow you to associate multiple line items with a single record, greatly enhancing your data organization. For example, a sales order subform neatly lists all products, their quantities, amounts, and other relevant
        • Zoho CRM Reports Module on Mobil App

          I have the mobile app and the reports module doesn't appear in the sidebar for some reason. I saw a Youtube video where the user had the Reports module on mobile. Is there a setting to show it on mobile? Thanks.
        • Contacts Don't Always Populate

          I've noticed that some contacts can easily be added to an email when I type their name. Other times, a contact doesn't appear even though I KNOW it is in my contact list. It is possible the ones I loaded from a spreadsheet are not an issue and the ones
        • Calendar View for Zoho Tickets

          Is there a way to view your tickets with due dates on a calendar view? I can not find a way to merge my Zoho Calendar and Tickets. This would be extremely helpful to my team.
        • Zoho Projects Android app update - List view enhancement

          Hello, everyone! In the latest android version(v3.9.15) of the Zoho Projects app update, we have enhanced the List view of tasks. We have also introduced a complete scroll of the tasks in the list view without scrolling the task fields(status, start date,
        • Next Page