Skip to content

Import Files into Shopify

This task will upload new files to your Shopify store using the data provided in an XML file. The files can be viewed within the Shopify admin area under Content > Files.

Important

This task uses Shopify's REST API, which is now deprecated. We recommend migrating to the equivalent GraphQL API task. See here for more information.

Settings

Connection

Required
The Shopify connection to use. See Shopify Connection if you require more information on how to create/manage connections.

Fail File

Required
The XML file to output any failed uploads to.

Input File

Required
The XML file containing the records. An example file is shown below.

Success File

Required
The XML file to output successful uploads to.

Prevent Reprocessing

Required
Optionally prevent reprocessing the same records by providing an in the XML you provide.

Timeout

Optional
The length of time to wait (in seconds) for Shopify to respond to each API request. If left blank, or set to 0 or less, a default value of 100 seconds will be applied.

Zynk Settings

See Common Task Settings.

Permissions

This task requires the following permissions in your Shopify app:

  • write_files

Examples

A sample input file is shown below.

<?xml version="1.0" encoding="utf-8"?>
<files>
  <file>
    <!-- Example showing how to upload a local file to Shopify -->
    <file-path>invoice_123.pdf</file-path> <!-- Supports absolute and relative paths --> 
    <mime-type>application/pdf</mime-type> <!-- Will be set automatically based on the file extension if not specified --> 
    <content-type>FILE</content-type> <!-- Can be IMAGE, VIDEO or FILE --> 
    <alt-text>Invoice 123</alt-text>
  </file>
  <file>
    <!-- Example showing how to link a file hosted on the web to Shopify -->
    <file-url>https://zynk.com/wp-content/uploads/2018/02/sitelogo100.png</file-url>
    <content-type>IMAGE</content-type> <!-- Can be IMAGE, VIDEO or FILE --> 
    <alt-text>Zynk Logo</alt-text>
  </file>
</files>