How to Schedule Shopify Product CSV Export to FTP
Automating Shopify product CSV exports can significantly affect how smoothly your business runs. It helps keep your inventory data up-to-date across all platforms, making multi-channel inventory management easier and more reliable. Plus, with accurate data, you can trust your reports and dive deeper into analytics to make smarter business decisions.
This tutorial will provide a step-by-step guide for using MESA to build a workflow that exports product data to a CSV file on an FTP server. In addition, it’ll cover everything you need to know and demonstrate how to update essential data points like inventory count, prices, cost of goods, and inventory location.
Automate product CSV exports to FTP—no coding needed. Get MESA and save time managing your Shopify products.
Topics:
Step-by-Step Guide: Scheduling a Shopify product export workflow
Time needed: 15 minutes
Export product CSV Shopify files to an FTP server with this guide to simplify the process and automate inventory updates.
- Add the built-in tool Schedule
Set a repeating schedule for your export workflow (daily, weekly, etc.).
- Next, add a new step, select the Shopify app, and select the Get List of Products action
Select criteria to define which products are included in the export.
- Add a Loop step
Set the “Values to loop over” to iterate through the products from the previous step.
- Inside the Loop, add another Loop step for variants
Save your workflow to make the Loop variables accessible. Then, add a second Loop to filter out ‘default’ variants automatically added by Shopify.
- Now add a Shopify step and select the Retrieve Inventory Item action
Because inventory data is managed separately from the product object, you need to extract the Inventory Item ID from the Variant data to access it.
- Add another Shopify step and select the Get List of Inventory Levels action
We’ll use the ID from the prior step to collect the inventory values for each Variant.
- Use the built-in Code step
We need to use a Custom Code step to generate the Location ID to capture where inventory is stored.
- Add a Shopify step and select Retrieve Location
The value from the previous code step will be used to gather the location’s name for the file.
- Next, add a Transform Mapping step
Organize product data fields (SKU, inventory count, cost of goods, etc.) into key/value pairs for the CSV file.
- Configure the Variant Loop End
Now, we need to map the value returned as the {{transform}} variable.
- Configure the Product Loop End
Lastly, we need to map the value returned as the {{loop_3}} variable.
- Add the FTP step and select Save FTP file
Make sure to set the file name to something specific like product-export_{{ “now” | date: “_%m_%d_%Y_%r” }}.csv
- Finally, select “Edit code”
Copy and paste the following code snippet, then click ‘Save Changes’ to complete the setup. Your workflow is now ready to run.
const Mesa = require('vendor/Mesa.js');
const Transform = require('vendor/Transform.js');
/**
* A Mesa Script exports a class with a script() method.
*/
module.exports = new class {
/**
* Mesa Script
*
* @param {object} payload The payload data
* @param {object} context Additional context about this task
*/
script = (payload, context) => {
// Adjust `payload` here to alter data before we transform it.
// Alter the payload data based on our transform rules
let csvRows = [];
if (payload && payload.items) {
payload.items.forEach((product) => {
if (product.items) {
product.items.map((variant) => {
const { product_id, product_title, variant_id, variant_option1, variant_option2, variant_price, inventory_quantity, location } = variant;
csvRows.push({
product_id,
product_title,
variant_id,
variant_option1,
variant_option2,
variant_price,
inventory_quantity,
location
});
});
}
});
}
// Adjust `output` here to alter data after we transform it.
const csvOutput = Mesa.csv.encode(csvRows, true);
// We're done, call the next step!
Mesa.output.next(csvOutput);
}
} - Test, then turn “On”
Give your workflow a test run to confirm it’s ready, then activate it to run automatically every hour.
Popular uses for scheduled product exports
Automating product exports in Shopify significantly streamlines your store’s operations. Furthermore, by scheduling exports to an FTP server, you can efficiently manage inventory, reporting, and product updates with less effort and fewer errors.
This is particularly helpful if you work with multiple sales channels, need detailed analytics, or frequently adjust prices. Here are some key ways merchants use scheduled exports to improve efficiency:
Inventory Syncing with Third-Party Systems
Scheduled exports keep inventory data up-to-date across platforms, ensuring accurate stock levels and avoiding overselling. This is especially valuable for merchants selling on multiple channels or managing complex supply chains.
By automating updates with FTP feeds, you not only save time but also minimize errors, while additionally gaining real-time visibility into your inventory across Shopify and tools like ERPs or warehouse software.
Regular price and product data updates
Scheduling exports to an FTP server not only makes bulk product updates simple and efficient but also allows marketing teams to quickly update descriptions and metadata, thereby improving conversions and enhancing SEO.
It’s also great for managing dynamic pricing for promotions or market changes. As your products evolve, you can quickly adjust descriptions or specifications.
Conclusion
MESA’s product export automation empowers Shopify merchants to streamline operations and focus on growth. Whether reducing human errors, saving time, or ensuring your platforms and systems work together, MESA’s workflows will improve your operations.
With the right approach, automated exports mean your product data is always consistent, allowing you to focus on growth-driving activities like marketing, strategy, and delivering exceptional customer experiences.
Frequently asked questions
Update your template regularly with relevant fields to maintain accurate data. Use standardized naming conventions across your product catalog for easy organization, and always back up your data before major changes.
Segmenting exports into smaller, targeted groups, such as by category, SKU range, or location, makes managing large inventories easier. This helps keep file sizes manageable and data organized. Additionally, with MESA, you can customize the “Get List of Products” step to filter exports by availability, tags, and more, ensuring you export only the products you need.
MESA’s built-in Paths tool allows you to create multiple exports from a single workflow run. This means you can automatically generate different CSV files for various inventory segments, such as separating exports by location or product type—all within the same scheduled workflow. This tailored approach saves time and helps you focus on the data that matters most.