CodexBloom - Programming Q&A Platform

Azure Logic Apps: How to Handle Rate Limiting with HTTP Actions

šŸ‘€ Views: 342 šŸ’¬ Answers: 1 šŸ“… Created: 2025-06-12
azure logic-apps http api json

I've searched everywhere and can't find a clear answer... I'm currently working on an Azure Logic App that integrates with a third-party API. The API has a rate limit of 100 requests per minute, and I need a way to handle this limitation gracefully while still ensuring that my Logic App can process incoming requests efficiently. I've set up the HTTP action to make the API call, but I'm unsure how to implement a mechanism to pause the Logic App when approaching the rate limit. I tried adding a delay using the 'Delay' action in Logic Apps, but I’m not sure about how to dynamically adjust the delay based on the API response or the number of requests I've sent already. Here's a portion of my Logic App definition where I make the HTTP request: ```json { "type": "Http", "inputs": { "method": "GET", "uri": "https://api.thirdparty.com/data", "headers": { "Authorization": "Bearer YOUR_API_TOKEN" } } } ``` After making 100 requests, I get the following error response from the API: ```json { "error": { "code": "RateLimitExceeded", "message": "You have exceeded the rate limit of 100 requests per minute." } } ``` I'm considering implementing a counter for the number of requests made in the current minute, but I’m not sure how to persist this information across multiple executions of the Logic App. Additionally, I would like to log the responses for monitoring. Could anyone provide guidance on how to structure my Logic App to properly handle this rate limiting scenario? Are there best practices for implementing such a feature? Any help would be greatly appreciated!