Pass input data from trigger to Run code action

Topic summary

A user encountered an issue passing the scheduledAt variable from a scheduled trigger to a Run code action in Shopify Flow. When attempting to log the value, it returned NaN instead of the expected data.

Problem identified:

  • The variable scheduledAt was being reassigned within the JavaScript code, causing the reference error
  • Additionally, input.shop.timezoneOffsetMinutes was referenced but not included in the input query

Resolution:

  • After the coding mistake was pointed out, the user corrected the variable assignment
  • The workflow now functions as intended

The issue is resolved — the data now passes correctly from the trigger to the Run code action.

Summarized with AI on November 1. AI used: claude-sonnet-4-5-20250929.

Thanks Paul - I can’t believe I made that mistake! Dearie me … it’s working now.