FAQ: How do I reference the current date in a workflow step?

This topic was automatically generated from Slack. You can find the original thread here.

Stephen Dickson : Sorry for the radically simple question, but I’ve scoured the docs and can’t find if there is an easy way to reference the current date in a workflow step. I just need to subtract one day from it and use it as a parameter in an HTTP callout.

Dylan Sather (Pipedream) : Hi , take a look at this workflow: Get a date string N days ago - Pipedream . It uses the Get ISO String N Days Ago action, which you can find if you select the option to Search all Actions in the top-right of the menu to add a new step.

The code in that step uses moment. Since you can run any Node.js code in your workflow, you can use any code from the moment package or another date library like date-fns.

Let me know if that helps.

1 Like

Stephen Dickson : Awesome, thanks so much

Unfortunately, the link in this answer is broken (Page not found error).