Tips, Tricks, and Common Issues

This page contains some common issues faced while using n8n as well as some tips and tricks. This page will only cover limited number of topics. For more guidance/info, head to n8n community forum or post in #n8n slack channel.

Jump To

#API rate limit

#Grouping Items within a workflow based on a field value

#Looping over the HTTP call module with changed inputs ex. page numbers

#Custom API call for Airtable (Alternative to Airtable List module in n8n)

API rate limit

Some websites and databases have a rate limit for API calls, i.e. they limit the number of API calls which can be performed in a given time. Ex. Airtable API has a rate limit of 5 requests/sec. Now, this API rate limit can lead to errors in the workflow if you have 100s of items/requests coming through in a workflow, as n8n tries to process everything as fast as it can. To avoid this you can use the “Batch Size” and “Batch Interval” options of the HTTP call module. This basically divides all the requests into batches, i.e. if you have 100 items coming through to the HTTP module, then a batch size of 10 and batch interval of 2000 ms will run 10 requests every 2 secs (2000ms).

Grouping Items within a workflow based on a field value

Unlike Integromat, we cannot aggregate/group items in n8n based on a field value. The normal aggregate module under item list, only aggregates all the items into 1, but doesn’t separate them out into different group based on a field.

Example Case: Getting product list for a hub and then grouping items based on the producer id to get multiple CSVs (one for each producer) or email each producer individually. To solve this/similar issues, the n8n workflow below can be used/adapted to group items together using a field value. Credits: n8n community

Sample Workflow: Grouping items based on a field value workflow.json

In this, the sample data module can be replaced by the API call module or any other module the data is coming from.

Note: Running individual modules for test can give you errors in workflows where loops are involved.

Looping over the HTTP call module with changed inputs ex. page numbers

Some of the OFN API endpoints have a hard limit of 200 items per page. This section can be useful in solving the per_page limit issue.

Example Case: Running the OFN Customers API request gives a maximum of 200 customers as an output (per_page = 200). But in the cases, where an enterprise has more than 200 customers, you will need to run multiple API calls one for each page. Thus automating it becomes hard. This issue is solved by looping over the HTTP module and changing in the page no. query parameter value for each run, till we reach the last run. Example workflow is used for getting customer list from OFN. Note: This is not a perfect solution and can have some issues/errors when IF condition is used after the loop. So, test and use.

Custom API call for Airtable (using predefined credentials)-Alternate to List module

Custom API calls can be useful for Airtable, if we want to see if a record matching the input item exists or not? Sadly, the Airtable List module in n8n runs only for the first item, not for every item.

Example Case: Let’s say, we are getting a list of 200 customers (in form of 200 items) from the API call and we want to check if the customers are already in the database (Airtable in this case) or not. Then we can use custom API call for Airtable using the HTTP module, running once per item.

Call URL: For this, you can Airtable API Encoder to get the custom call URL.

To use this, you need to enter Base Id and Table Id + whatever formula you want to filter records with. Once you have the URL, just add the item variable within the ‘’ to complete the formula in the API call. Note: Base Id and Table ID can be found from the Web-URL (not the API URL), when you open the specific airtable in your browser.

Authentication: If you already have an Airtable login credential stored in n8n, then you can use the same, by selecting “Predefined Credential” in the Auth option of the HTTP module.

Last updated