Insert todays date in url

Hello!
This url returns the powerprice for the date specified in the string. (yyyy/mm-dd), _NO1 is the area.

https://www.hvakosterstrommen.no/api/v1/prices/2022/12-14_NO1.json

It works with the "http request" -node: (trigger---http request---debug)

How can I make this dynamic so it inserts todays date automaticly?

Thanks for helping a newbie in Nodered :slight_smile:

Maybe this example will help you

Thank you!
After some editing it worked :slight_smile:

What I did:

Insert node: deleted hardcoded dates
Change node: set .msg now to $moment().format("YYYY/MM-DD")
http request: https://www.hvakosterstrommen.no/api/v1/prices/{{{now}}}_NO1.json

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.