In this tutorial, we will learn how to import a file from a URL that changes daily.
Some suppliers provide product feeds where the file name contains the current date. Example:
- Today (30 August 2022):
https://example.com/products-30-08-2022.csv - Tomorrow (31 August 2022):
https://example.com/products-31-08-2022.csv
Instead of manually updating the file URL every day, you can use patterns in the file name. This way, the system will automatically replace the date with the current day.
Step 1: Use a Pattern in the File URL
Example pattern:
https://example.com/products-{d-m-Y}.csv
Here:
d= day (with leading zero, e.g., 01–31)m= month (with leading zero, e.g., 01–12)Y= year (four digits, e.g., 2022)
So on 30 August 2022, the system will automatically generate:
https://example.com/products-30-08-2022.csv
Important: The app uses GMT timezone when calculating the date.
Step 2: Configure in Products Sync Master
- Open the import settings in Products Sync Master.
- In the File Source field, paste the URL with your pattern.
Example:
https://example.com/products-{d-m-Y}.csv - Save your settings. The app will automatically replace the placeholders with the correct date at runtime.
Step 3: Available Pattern Characters
You can use many date and time placeholders. Here are some useful examples:
d– Day of the month (01–31)m– Month (01–12)Y– Year (e.g., 2022)H– Hour (00–23)i– Minutes (00–59)W– ISO week number
👉 For the full list of supported placeholders, see the table below:
(insert your table of all format characters here)
Step 4: Examples
https://example.com/products-{Y}-{m}-{d}.csv→2022-08-30https://example.com/feed-{Y}{m}{d}.xml→20220830https://example.com/products-week-{W}.csv→week-35https://example.com/pricelist-{Y}-{m}-{d}-{H}.csv→2022-08-30-15(file for 3 PM)
Why Use Patterns?
- Save time – no need to update the file URL every day.
- Avoid mistakes when typing or pasting file links.
- Automate imports from suppliers that refresh files daily, weekly, or monthly.
- How to Import Product Variants
- How to Map Collections During Import
- Import Files by Dynamic URL Pattern
- Import Files from FTP with Dynamic File Names
- How to Import Product Translations
- Import Products from Google Sheets
- Error during sync locations - need to update access scopes
- Import Optimization – Control New & Existing Product Updates
- Generate Variants from Option Values
- Import Products from Icecat Catalog
- Import Conditions – Control How Products Are Imported
- Import Product and Variant Metafields
- How to Import Collections
- How to Import Product Categories (Shopify Standard Taxonomy)