# Product List Export

**Overview**

This workflow describes how to use the Products API in n8n to get full list of products/variants and their stock level.

Potential use cases:

1. Using it as stock level report or simple sales analytics by comparing it with past data
2. Using it as a way to manage stock levels on OFN (by exporting the product list in the format of OFN product upload template) **(To be added soon)**

This work flow can be run manually or scheduled to run or can be triggered by web hooks (Button Click in Airtable, OFN webhook for OC close)

**Description**

In the given workflow, the CSV file will contain fields:

* Product Name
* Variant Name
* On\_hand value
* Price
* Product Unit
* Variant Unit Type
* Producer Name

**Prerequisites**

To set up this integration you will need:

OFN API Authentication\
Gmail account linked in n8n

**Workflow**

Find the workflow code for download and import here.

**How to use:**\
![](https://2749008000-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNv32980j4B1B2UoS6UMi%2Fuploads%2FbOhX19vSJcqKC3GJyZlH%2Fimage.png?alt=media\&token=ff7b47c9-4c03-4c03-bae6-2c18107d9d8c)

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

![](https://2749008000-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNv32980j4B1B2UoS6UMi%2Fuploads%2FEILREJ5RzWuHrPIk3fl5%2Fimage.png?alt=media\&token=2edff5a5-bb99-4df5-9218-8c231813fac1)

**Set module:** Here you can select what fields you want in the CSV

**Email:** Where do you want to send the CSV (email address)

#### Workflow

{% file src="<https://2749008000-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNv32980j4B1B2UoS6UMi%2Fuploads%2FpT6YIMlWQWoLTt1GMBhR%2FGET_bulk_products_API_call.json?alt=media&token=442d484f-23de-4cfb-9cdc-3b3661fc9875>" %}

**Variations/Adaptations:**

1. Can be used as a way to manage stock level if the output CSV is in the format of OFN product upload template
   1. To do this, we would need to convert few fields (units and values), map category ids, tax categories etc. (Workflow coming soon)
