# Schedule Product Collection Changes by Metafield Date

19 min setup  
No coding required  
Runs automatically

Automatically update products based on a scheduled date using a custom metafield. This workflow runs daily, checks each product for a specific date metafield, and when that date matches today, it performs a series of updates—such as clearing the metafield, removing the product from one collection (like “Coming Soon”), and adding it to another (like “New Arrivals”).

## How it works

11 steps to automatically move products between collections based on metafield dates

### Daily Schedule

**App connector:** [Schedule](/content/apps/schedule/integrate "View Schedule integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)  
**Why this matters:** This trigger runs the collection check daily at midnight, ensuring products launch on their scheduled dates without requiring you to remember to manually move them between collections.

This scheduled trigger runs once per day at midnight. It initiates the workflow that checks all products in your "Coming Soon" collection for publish dates matching the current date. The daily timing ensures products launch at the start of their scheduled day. The schedule is pre-configured but can be adjusted if you prefer a different time (like early morning before your store opens).

### Get List of Collections' Products (Coming Soon)

**App connector:** [Shopify](/content/apps/shopify/integrate "View Shopify integration page"/index.html)• Time to complete: 3 minutes  
**Why this matters:** Retrieves all products from your "Coming Soon" collection so the workflow can check each one's publish date metafield and identify which products should launch today.

This step retrieves products from a Shopify collection, limited to 100 products per run. You need to configure the collection_id during setup—this should be the ID of your "Coming Soon" collection (or whatever collection holds your pre-launch products).

### Check Products Exist In Collection

**App connector:** [Filter](/content/apps/filter/integrate "View Filter integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)  
**Why this matters:** Prevents workflow errors by confirming the collection actually contains products before attempting to loop through them, ensuring the workflow stops gracefully if the "Coming Soon" collection is empty.

This filter checks if {{shopify.0.id}} is not empty, meaning at least one product exists in the collection. If products exist, the workflow proceeds to loop through them. If the collection is empty, the workflow stops here without error. This safety check prevents the loop from attempting to iterate over an empty array.

### Loop Through Collection Products

**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 in the "Coming Soon" collection individually, checking each one's publish date metafield to determine if it should be moved today.

This loop step iterates through each product in the {{shopify}} array returned from the collection. For every product, the loop executes the subsequent metafield retrieval, date checking, and collection movement steps using {{loop.id}} as the product identifier. The loop continues until all products in the collection have been checked.

### Retrieve Product Metafield

**App connector:** [Shopify](/content/apps/shopify/integrate "View Shopify integration page"/index.html)• Time to complete: 5 minutes  
**Why this matters:** Fetches the custom "publish_date" metafield from each product to determine if today is the scheduled launch date for moving the product between collections.

This step retrieves a specific metafield from each product using {{loop.id}} as the product identifier. The metafield is configured with namespace "custom" and key "publish_date"—this is the standard metafield created when you add a custom date field to products in Shopify admin. The metafield value (the date) is returned as {{shopify_1.value}} in format "YYYY-MM-DD".

### Filter: Publish Date Is Today

**App connector:** [Filter](/content/apps/filter/integrate "View Filter integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)  
**Why this matters:** Acts as the decision point that only allows products with today's publish date to proceed, ensuring only scheduled launches happen and preventing premature or late collection moves.

This filter checks two conditions:

(1) {{shopify_1.value}} is not empty (the product has a publish date set), AND  
(2) {{shopify_1.value}} equals today's date ({{now | date: "%Y-%m-%d"}}).

Both conditions must be true for the workflow to proceed with moving the product. If the publish date is in the future, past, or missing, the workflow skips that product and moves to the next one in the loop.

### Clear Product Metafield

**App connector:** [Transform](/content/apps/transform/integrate "View Transform integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)  
**Why this matters:** Prepares the metafield deletion by organizing the product ID, namespace, and key into the format required by the Shopify GraphQL mutation, enabling clean metafield removal to prevent reprocessing.

This transform step maps the data needed to delete the metafield into a structured format:

product_id ({{loop.id}}),

namespace ("custom"), and

key ("publish_date").

### Get List of Custom Collections

**App connector:** [Shopify](/content/apps/shopify/integrate "View Shopify integration page"/index.html)• Time to complete: 1 minute  
**Why this matters:** Finds your "Coming Soon" collection ID by name so the workflow can identify which collection membership needs to be removed when moving products to "New Arrivals."

This step searches for a custom collection with the title "Coming Soon" and returns the first match (limit 1). The collection ID is stored as {{shopify_2.0.id}} for use in the next step.

### Get List of Collects

**App connector:** [Shopify](/content/apps/shopify/integrate "View Shopify integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)  
**Why this matters:** Retrieves the specific "collect" record that links the product to the "Coming Soon" collection, which is necessary to delete that relationship and remove the product from the collection.

This step finds the collect (the Shopify term for collection membership) that connects {{loop.id}} (the product) to {{shopify_2.0.id}} (the "Coming Soon" collection). The collect ID is returned as {{shopify_3.0.id}}.

### Remove Product from Custom Collection

**App connector:** [Shopify](/content/apps/shopify/integrate "View Shopify integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)  
**Why this matters:** Deletes the collect record that links the product to the "Coming Soon" collection, effectively removing it from that collection as part of the launch process.

### Add to New Arrivals Collection

**App connector:** [Shopify](/content/apps/shopify/integrate "View Shopify integration page"/index.html)• Time to complete: 3 minutes  
**Why this matters:** Creates a new collect record that adds the product to your "New Arrivals" collection, completing the launch by making the product visible in the destination collection.

This step creates a collect that links {{loop.id}} (the product) to a destination collection.
