How To Connect FTP Inventory Feed To Update Shopify Products

Today, we’ll introduce you to a lesser-known yet powerful technique to manage your Shopify product inventory efficiently: updating product inventory using FTP files and leveraging FTP inventory feeds. You may be familiar with FTP (File Transfer Protocol) for transferring files, but did you know it can also be a game-changer for inventory management in your Shopify store? This method can save you hours of manual work and reduce the likelihood of human error, which is invaluable for busy ecommerce professionals like you.

In this blog post, we will walk you through the process of updating your Shopify product inventory using FTP by MESA, from setting up the necessary workflow to automating the entire process.

By the end of this tutorial, you’ll have another valuable workflow in your arsenal to keep your Shopify store’s inventory levels running smoothly and accurately.

Let’s dive in!

Benefits of using FTP to manage product inventory

Let’s explore the most compelling advantages that will make a significant impact on your store’s operations:

Time and Effort Savings: By automating product inventory updates using FTP files, you can eliminate the need for manual data entry and reduce the time spent on routine tasks. This frees up more time for you to focus on more strategic aspects of your business.

Reduced Human Error: Manual inventory updates can be prone to human error, such as typos or incorrect data input. By automating the process using FTP inventory feeds, you can minimize the possibility of mistakes and ensure accurate inventory data is always maintained in your Shopify store.

Seamless Integration: FTP is a widely used and supported file transfer protocol, which means you can easily integrate FTP inventory feeds with other software systems, tools, or platforms you’re already using. This simplifies the process of sharing inventory data with suppliers, warehouses, or other stakeholders in your supply chain.

Faster Inventory Updates: The FTP-based inventory update workflow allows for rapid and frequent updates, ensuring your Shopify store’s inventory data is always up-to-date. This translates to better stock control, minimized stockouts, and improved customer satisfaction.

Scalability: As your store grows, so does the volume of inventory data you need to manage. This workflow with FTP inventory feeds can easily scale with your business, ensuring that your inventory management system remains efficient and effective, no matter the size of your store.

Customization: With the help of MESA, you can tailor the FTP inventory feeds to suit the unique needs of your store. This allows you to create tailored automation workflows that address specific challenges and drive further operational efficiencies.

By leveraging the power of FTP-based inventory updates, you can stay competitive in the fast-paced world of ecommerce while maximizing the value of your resources.

Watch the tutorial video

Video tutorial how to use FTP and CSV files to update product inventory on Shopify

Step-by-step workflow instructions

Time needed: 10 minutes.

To get started, be sure to install MESA on your Shopify store. Then, follow these step-by-step instructions to connect FTP files to your Shopify store.

  1. First, create a workflow using the FTP by MESA trigger step

    Be sure to add your FTP server account credentials to authenticate this app.ftp workflow trigger event

  2. Next, update the File Name and frequency options

    Add the file name and path if necessary. The frequency controls how often this trigger event will run this workflow.authenticate ftp server

  3. Next, add the Custom Code by MESA action step

    Then, add the description “Decode the CSV file” so you know what this step is all about.ftp inventory feed decode csv

  4. Click Edit Code to view the code editor

    Add the following code snippet to decode the CSV file where you see “Add you custom code here”
    let decoded = Mesa.csv.decode(payload);"decoded: ", decoded);
    let newPayload = {
    "rows": decoded

    Save your workflow.decode csv code snippet

  5. Next, add a Loop by MESA action

    This will loop through all the rows of your CSV file. In the Values field, add the variable: {{custom.rows}}
    loop csv rows

  6. Next, add the Custom Code by MESA action step

    Add the description “Get the Product and Inventory IDs” so we know what this step is about. code snippet to get inventory id

  7. Next, click Edit Code and add the follow JS library.

    On line 2, we’ll add the following to include GraphQL code libraries to help us with the next step.
    const ShopifyGraphql = require('vendor/ShopifyGraphql.js');custom code graphql

  8. Next, add this code snippet to acquire the data values from our product variants

    Paste this code snippet after the line “Add you custom code here”"sku: ", payload.current_item.SKU);
    let query = ` query($query: String!) { productVariants(first: 3, query: $query) { edges { node { id sku inventoryItem { id } product { id } } } } } `; const r = ShopifyGraphql.send(query, { "query": "sku:" + payload.current_item.SKU, });"response: ", r); let fullInventoryId =[0]; payload.inventory_item_id = fullInventoryId.match(/\d+/)[0];"inventory item Id: ", payload.inventory_item_id);
    custom code product variants

  9. Next, add Shopify to your workflow and choose the Set Inventory Level action

    To narrow your search more quickly use the filter search bar.shopify set inventory level

  10. Next, add the variables to the Set Inventory Level action

    Click the {+} icon button per field to choose their respective variable values.

    Note: If you haven’t saved your workflow yet, the variables may not appear. You can copy/paste the values below or Save and name your workflow then, the variable will be available to select from the side sheet.

    Available quantity: {{ loop.Inventory }}
    Location: Choose the right one for your store
    Inventory Item ID: Custom value, then enter {{ custom_1.inventory_item_id }}set inventory level values

  11. Finally, Save then, name your new workflow.

    Be sure to turn you workflow On for it to run automatically.ftp to inventory updates workflow

Workflow wrap-up

In conclusion, updating your Shopify product inventory using FTP files and FTP inventory feeds is a powerful and efficient method that offers numerous benefits for you and your team.

As you strive to stay ahead in the competitive ecommerce landscape, adopting innovative techniques like FTP-based inventory updates and incorporating FTP inventory feeds is essential. By leveraging the power of MESA to automate and customize this workflow, you can unlock new levels of efficiency and success in your store. Don’t miss the opportunity to streamline your inventory management and make the most of your resources.

Give this method a try and experience the transformative impact it can have on your Shopify store’s operations.

So, what's next?

  1. Add MESA app. From the Shopify App Store, install MESA on your store. Start for free or enjoy a 7-day trial on any plan.
  2. Request Complimentary Setup. If you want help personalizing this workflow, all you have to do is ask. We're happy to help!
  3. Browse more workflow tutorials like this one.
  4. Discover pre-made, customizeable automation templates.