Adding Product List to Airtable

Overview

This workflow describes how to use the Products API to get product list for a hub or a producer and add it to Airtable.

Workflow can be run on a schedule or can be triggered using webhooks.

Description

For the workflow, I will be using a table in Airtable with following fields:

  • Product

  • Variant

  • Producer

  • sku

  • Stock Level

  • Price

  • Product Id

  • Variant Id

Prerequisites

To set up this integration you will need:

OFN API Authentication

Airtable API key and Airtable base with exact same fields as used in the SET module

Workflow

Find the workflow code for download and import here.

How to use/adapt the workflow

Trigger: Can be manual/scheduled/webhook

HTTP Module (Get Bulk Products): Add/use existing OFN credentials. By default it will give all the products the user has access to. To filter by enterprise, use “q[supplier_id_in]” in the query parameters as shown below

Note: This workflow will only return at max 2000 products. So, if you think there are more than 2000 products then change the per_page value in the query section. Although getting so many products in 1 API call might crash the workflow, if that happens then you can try using page modules via function nodes as used in this workflow.

Set module: Add the field you want to have in Airtable.

Keep only set: Yes To add fields in this module, click on "Add Value", then select the type of field you want. After which you can add the field name and its value. In most cases, you will be taking the value from previous nodes, therefore, select "expression" and link/search for the field you want to get data from. Note: Make sure the field names and type in SET module and in AIrtable are exact match, otherwise you will get an error.

Airtable module:

Credential: Use or add existing Airtable credential

Operation: Append Base: URL: Open the table you want to get the data in and copy the web URL of the page.

Table: URL: Open the table you want to get the data in and copy the web URL of the page. Typecast: Yes (This will allow n8n to add or create new options for single/multi select fields if existing options don’t match) (Optional)

Last updated