OFN API Handbook
  • Welcome!
  • Quick Start
  • OFN API V1
    • Overview
    • Authentication
    • Customers
  • OFN API V0 - unsupported
    • Overview
    • Reports
    • Products
  • N8N - integrations server
    • Introduction
    • How to import/use a workflow from a file or API handbook
    • Authenticating Apps
    • Email a Stock Report
  • Adding Customer List to Airtable
  • Adding Product List to Airtable
  • Tips, Tricks, and Common Issues
  • Postgres Database
  • Creating Customers (with Tags) on OFN using V1 API with data from a CSV/XLSX file
  • Common SQL Queries (on-going)
  • Global Metrics Dashboard
  • DFC - n8n experiment
  • Product List Export
  • Product List Export (OFN Product Upload CSV format)
  • Import customers contacts from OFN to newsletter
  • Invite OFN customers to subscribe to a newsletter
  • Automated Quickbooks Customer Invoicing
  • Low Stock Alert for Producers
  • Enterprise Dashboard for Customers
  • Connecting Square POS with OFN for updating stock values, sales analytics etc.
  • Webhooks
    • Overview
    • Setup
    • Event types
Powered by GitBook
On this page
  • 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 (using predefined credentials)-Alternate to List module

Tips, Tricks, and Common Issues

PreviousAdding Product List to AirtableNextPostgres Database

Last updated 2 years ago

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 or post in #n8n slack channel.

Jump To

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:

Sample Workflow:

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.

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.

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.

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 . 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.

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

customer list from OFN
Airtable API Encoder
n8n community forum
n8n community
Grouping items based on a field value workflow.json
#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)
HTTP module for custom AIrtable API call
Airtable API encoder