Scheduled time

TheScheduled timetrigger starts a workflow at a time and date that you specify, with options to do the following:

  • repeat the workflow on a specific schedule
  • stop repeating the workflow when certain criteria are met

Unlike most other triggers that are available for Shopify Flow, theScheduled timetrigger starts a workflow based on criteria that you set when you create the workflow, rather than based on an event that occurs in your store or in an app.

There are three different ways to use theScheduled timetrigger:

You can create multiple schedules and use any combination of these approaches.

Considerations for using the Scheduled time trigger

  • A workflow must have at least one occurrence in the future. If a workflow is created that both starts and ends in the past, you can't activate the workflow.
  • For repeating workflows, the longest interval possible between occurrences is one year. The smallest possible interval is one day.

Create a workflow that runs at a specific date and time

  1. Create a new workflow, and then select theScheduled timetrigger.
  2. Optional: Select the time zone to use. By default, this is set to yourstore's time zone.
  3. Enter aStart dateand aStart time.
  4. 可选:添加一个附加的时间表我们rkflow, clickAdd schedule.

Create a workflow that runs repeatedly on a schedule

  1. Create a workflow that starts with theScheduled timetrigger.
  2. After you set the start time and date, clickAdd repeat rule.
    1. Select the amount of time to pass before the workflow is run again. This amount must be a whole number. Decimals are not supported.
    2. Set the time period from the optionsDays,Weeks, orMonths.
      • If you selectWeeks, then click the day of the week that the workflow to run.
      • If you selectMonths, then select the day of the month for the workflow to run.
  3. Optional: To set criteria that will stop the workflow from repeating, clickAdd end rule.

Create a workflow that stops repeating when specific criteria are met

  1. Create a workflow that starts with theScheduled timetrigger and aRepeat rule.
  2. ClickAdd end rule.
  3. Do one of the following:
    • To stop the workflow after it has run a set amount of times, selectAfter number of occurrences, and then enter the number in theCountsection.
    • To stop the workflow at a specific time, selectOn a date and time, and then enter anEnd dateand anEnd time.

Get actions

Most workflows start due to an event, and automatically include data that is related to that event. For example, when a workflow is started by theOrder createdtrigger, the workflow starts when a new order is placed. The workflow automatically has the information on the order that caused the workflow to run, and performs actions on that workflow.

In a workflow that uses theScheduled timetrigger, the workflow starts at a time that you've specified, rather than as a result of an event. Because there is no specific event in your store or from an app that starts the workflow, there is no data automatically included. To create a workflow that takes actions on orders or products, you can use the following actions to bring that data into your workflow:

Scheduled time variables

When you start a workflow with theScheduled timetrigger, conditions and actions in that workflow that accept liquid variables have an additional variable available. TheScheduled atvariable returns the time and date when the workflow is scheduled to run.

Actions

The following actions can be used in workflows that start with theScheduled timetrigger.

Example

Example of a workflow that sends an email according to a specific schedule

In this example workflow, an email is sent at 9:00 am on the last weekday every month.

Testing the Scheduled time trigger

To test a workflow that starts with this trigger, set the first workflow to run shortly after you turn on the workflow. After you're confident your workflow works as intended, edit your workflow to update the start date and time.

Ready to start selling with Shopify?Try it free