I’m trying to create a Date object using new Date() in Shopify Flow, but it seems to return an empty or invalid date (like 1970…).
In Shopify Functions, I was able to get the current time using localTime inside the shop query. But I couldn’t find anything similar in Flow queries.
Does anyone know how to get the current date/time in Shopify Flow? Any workaround or best practice?
the {{ scheduledAt }} object is given only if the flow is scheduled.
If it’s a triggered flow, there’s no other way to get date/time than send a HTTP request.
Why is not possible to have a date value internal to Flow?
Just to add another option to the list. The Flow Companion app has a dedicated Get current datetime action that returns the current UTC time in ISO 8601 format (e.g. 2026-04-21T12:00:00Z), no configuration required.
You can drop it anywhere in a workflow and pipe {{ getCurrentDatetime.currentDatetime }} into subsequent steps.