Auto-Sync Shopify Products & Variants to Airtable

Sync Shopify Products to Airtable

12 min setup

No coding required

Runs automatically

Easily manage your Shopify inventory and customize reporting by syncing product data to Airtable. This MESA workflow template ensures that each product update or new order in Shopify is automatically reflected in Airtable, saving you time and eliminating the need for manual data entry. Streamline inventory tracking and leverage Airtable’s flexible reporting tools to gain deeper insights into your product data.

How it works

8 steps to start syncing Shopify products to Airtable automatically

Product Updated

App connector: [Shopify](/content/apps/shopify/integrate "View Shopify integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)

Why this matters: This trigger captures every product modification in Shopify, enabling real-time Airtable synchronization that keeps your product database current whether changes come from manual edits, bulk updates, or app integrations.

When a product is updated in Shopify (any field changes including title, description, price, inventory, variants, images, or tags), this trigger activates the workflow and captures complete product data including {{shopify.id}}, {{shopify.title}}, {{shopify.image.src}}, and all product properties. The workflow runs for every product update in your store.

Get Products

App connector: [Airtable](/content/apps/airtable/integrate "View Airtable integration page"/index.html)• Time to complete: 5 minutes

Why this matters: Retrieves existing product records from Airtable to enable the workflow to determine whether to create new records or update existing ones, preventing duplicate product entries.

This step lists all records from the "Products" table in your Airtable base. Setup requirement: You need an Airtable base with two tables: "Products" and "Variants". The template provides a pre-configured Airtable base you can copy—click the Airtable template link, make a copy to your workspace, then select that copied base in the workflow configuration. The Products table should have columns for Product ID, Title, and Images. The Variants table should have columns for Variant ID, SKU, Title, Product (linked record to Products table), Price, and Compare At.

Map Product Fields

App connector: [Transform](/content/apps/transform/integrate "View Transform integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)

Why this matters: Maps Shopify product data into the field structure expected by Airtable, preparing the data for upsert operation with proper field names and values.

This transform step creates a mapping object with three fields: "Product ID" ({{shopify.id}}), "Title" ({{shopify.title}}), and "Images" ({{shopify.image.src}}). This structured data is passed to the next step for upserting to Airtable. The transform ensures data is in the exact format Airtable expects for record creation or updates.

Upsert Product To Airtable

App connector: [Code](/content/apps/custom/integrate "View Code integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)

Why this matters: Creates or updates the product record in Airtable using intelligent upsert logic that searches by Product ID to determine whether this is a new product or an existing one requiring updates.

This custom code step implements an "upsert" operation (update if exists, insert if new) for the Products table. It uses the table_name "Products", field_name "Product ID", and field_value {{shopify.id}} to search Airtable for an existing record.

If a record with this Product ID exists, it updates that record with the current product data from the transform step.

If no record exists, it creates a new one. The code returns the Airtable record (including its Airtable record ID as {{airtable_product_upsert.id}}) which is needed to link variants to this product in subsequent steps.

Get List of Product Variants

App connector: [Shopify](/content/apps/shopify/integrate "View Shopify integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)

Why this matters: Fetches all variants associated with the product from Shopify to ensure complete variant data synchronization, including newly added variants or updated pricing for existing variants.

This step retrieves all variants for the product using {{shopify.id}} as the product identifier. It returns an array of variants as {{shopify_1}} with each variant containing properties like {{variant.id}}, {{variant.sku}}, {{variant.title}}, {{variant.price}}, and {{variant.compare_at_price}}. This comprehensive variant data enables the workflow to sync all variant details to Airtable.

Loop

App connector: [Loop](/content/apps/loop/integrate "View Loop integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)

Why this matters: Processes each product variant individually, ensuring every variant gets its own Airtable record with current pricing, SKU, and details regardless of how many variants the product has.

This loop step iterates through each variant in the {{shopify_1}} array. For every variant, the loop executes the subsequent transform and upsert steps using {{loop.id}}, {{loop.sku}}, {{loop.title}}, {{loop.price}}, and {{loop.compare_at_price}}. This enables variant-level tracking and reporting in Airtable.

Map Variant Fields

App connector: [Transform](/content/apps/transform/integrate "View Transform integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)

Why this matters: Maps Shopify variant data into Airtable field structure, including the critical link to the parent product record that creates the relationship between Products and Variants tables.

This transform step creates a mapping object with six fields: "SKU" ({{loop.sku}}), "Title" ({{loop.title}}), "Variant ID" ({{loop.id}}), "Product" ({{airtable_product_upsert.id}}), "Price" ({{loop.price}}), and "Compare At" ({{loop.compare_at_price}}). The "Product" field uses the Airtable record ID from step 4, creating a linked record relationship between the Variants table and Products table. This enables Airtable views and filters that show which variants belong to which products.

Upsert Variants (Custom Code)

App connector: [Airtable](/content/apps/airtable/integrate "View Airtable integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)

Why this matters: Creates or updates the variant record in Airtable using upsert logic, maintaining accurate variant data including pricing changes, SKU updates, and the relationship to the parent product.

This custom code step implements an "upsert" operation for the Variants table. It uses table_name "Variants", field_name "Variant ID", and field_value {{loop.id}} to search for an existing variant record.

If found, it updates with current variant data from the transform step.

If not found, it creates a new variant record. The Product field (containing {{airtable_product_upsert.id}}) links the variant to its parent product in Airtable.