API limit exceeded – The flow hit the rate limit for the external API

Loading

The “API Limit Exceeded” error in Power Automate occurs when a flow makes too many requests to an external API within a specific time period, exceeding rate limits set by the service provider.

Error Message:
"API limit exceeded – The flow hit the rate limit for the external API."

This issue can be caused by:

  • Excessive API requests within a short time
  • Exceeding daily or hourly API quotas
  • Concurrent executions overwhelming the service
  • Unoptimized queries pulling unnecessary data

2. Common Causes and Fixes

CauseDescriptionFix
Too Many API CallsThe flow is making too many requests per minute/hour.Reduce frequency or implement a retry mechanism.
Exceeded Quota LimitsThe service enforces daily/monthly request limits.Upgrade the plan or distribute calls over time.
Concurrent Flow RunsMultiple flows running at the same time cause high API usage.Add delays or queue requests to avoid congestion.
Large Data FetchingQuerying too much data at once increases API consumption.Optimize queries with filters and pagination.
Inefficient Loop ExecutionLoops in the flow call the API multiple times unnecessarily.Use bulk operations instead of single requests.

3. Step-by-Step Troubleshooting Guide

Step 1: Identify the API Limits

Each service has different rate limits. Identify the allowed API usage for your connector.

How to check API limits:

Example Fix:

  • If using SharePoint REST API, the limit is 600 requests per minute. Reduce requests accordingly.
  • If calling Microsoft Graph API, the limit is 10,000 requests per 10 minutes per user.

Step 2: Reduce Flow Execution Frequency

If the flow triggers too often, it may quickly hit API limits.

Steps to fix:

  1. Open Power Automate.
  2. Edit the flow and check the trigger frequency.
  3. If using a Recurrence trigger, increase the interval.
  4. If using Automated flows, consider filtering triggers with conditions.

Example Fix:

  • Instead of triggering every minute, change it to every 15 minutes.
  • Use a trigger condition to fire only when needed.

Step 3: Optimize Loops to Reduce API Calls

Unnecessary loops calling an API multiple times can waste API requests.

Steps to fix:

  1. If using “Apply to Each”, check if each loop iteration calls an API.
  2. Use batch processing instead of individual API calls.
  3. Reduce the number of items processed in each run.

Example Fix:

  • Instead of calling an API 100 times in a loop, use bulk operations where possible.
  • If using SQL Server, retrieve all records in one query instead of multiple queries.

Step 4: Implement Retry and Throttling Policies

If an API rejects requests due to rate limits, retrying with delays can help.

Steps to enable retry policy:

  1. Open Power Automate.
  2. Click on the failing action.
  3. Go to SettingsRetry Policy.
  4. Set it to Exponential Backoff to gradually increase retry intervals.

Example Fix:

  • If a third-party API limits requests, configure retry settings to prevent failures.

Step 5: Use Pagination for Large Data Requests

Fetching too much data at once can quickly consume API limits.

Steps to enable pagination:

  1. Open Power Automate.
  2. Click on the action retrieving data.
  3. Enable Pagination under advanced settings.
  4. Set an appropriate Page Size to avoid large requests.

Example Fix:

  • If pulling data from Dataverse, set pagination to 500 records per page instead of retrieving all records at once.

Step 6: Upgrade API Subscription or Use a Different Plan

If the API has a strict request limit, upgrading to a higher plan may be necessary.

Steps to check API usage:

  • Log into the API provider’s dashboard and check request usage.
  • If limits are frequently exceeded, consider a higher-tier plan.

Example Fix:

  • If using a third-party service like Google Maps API, upgrade to a plan with higher request quotas.

Step 7: Queue Requests Instead of Sending All at Once

If multiple flows are calling an API simultaneously, they may exceed limits.

Steps to fix:

  1. Introduce delays between requests.
  2. Use Power Automate Queues to stagger requests.
  3. Add a delay action in loops to slow down API calls.

Example Fix:

  • Instead of sending 10 API calls in 1 second, add a 5-second delay between each call.

Leave a Reply

Your email address will not be published. Required fields are marked *