Error: Monthly interval must be 1

Topic summary

A user encountered a bug in Shopify Flow preventing them from setting monthly intervals greater than 1 (specifically 12 months for yearly reports). The system displays an error: “Monthly interval must be 1.”

Confirmed Workarounds:

  • 52-week schedule: Set the Flow to run every 52 weeks instead of 12 months (suggested by Shopify team member)
  • Monthly + date condition: Run Flow monthly with a condition checking if the current date matches the desired execution date (e.g., April 1st)
  • Run code action: Use JavaScript to check the current month via scheduledAt and getMonth() method, allowing precise month-based execution

Status:

Shopify acknowledged this as a defect and forwarded it to their team. The issue remains unresolved, requiring users to implement one of the workarounds above. Code examples and implementation screenshots were shared to help others facing the same limitation.

Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

We want to create a recurring schedule for yearly reports, but we were unable to set months to 12 or greater than 1 itself, it seems bug from shopify’s end.

1 Like

Yeah, looks like a defect. I forwarded to our team. As a workaround, I think you can use every 52 weeks

I’m using a different approach for now I’ve set the Flow to run monthly and added a condition to check if the scheduled date is April 1st. This way, it only proceeds in the month I want, even though it technically runs every month.

2 Likes

That works too

I was wrong about this solution. It cannot be used for recurring years because the date is fixed to 1st April 2025. I tried it this way so that I could select a desired day, but now I think the only option is to go with 52 weeks.

You can check current month with the Run code action. For example:

Input:

query{
  scheduledAt
}

Output:

type Output {
  isJanuary: Boolean!
}

Code:

export default function main(input) {
  const isJanuary = new Date(input.scheduledAt).getMonth() === 0; // 0 – January, ..., 11 - December
  return {
    isJanuary,
  }
}

2 Likes

FYI, Flow also has an example for how to do this (slightly different date scenario) here: https://github.com/Shopify/flow-code-examples/blob/main/run-code-examples/schedule-check-scheduled-day/index.js

1 Like