I’m trying to send an HTTP request 1 hour before a date and time that I receive in a webhook. I’m transforming it to ISO format, but it’s not working. I don’t know why.
What is the error message (if any)?
No erro message. The workflow just keep going forever until i stop.
Please share your workflow
I’m leving here the test that i’m making because the error is the same.
In that case, the webhook must receive that data earlier than 1 hour before the call. E.g. receive it 1 hour 10 minutes before the call, wait for 10 minutes and send a reminder.
To share the workflow, select all nodes (or hit ctrl+a), then past the content here after clicking the button </>
Workflow for tests, that will remind 2 minutes before the call. To check - open the https://www.unixtimestamp.com/ and create a conversion, that will be in 3-4 minutes
Click on the red text below the workflow and hit “Copy”, then ctrl+v in the workflow window to past it
Because the Wait node works with seconds (or other measurable time entity), it does not work with timestamps.
That formula
{{ $json.DataHoraNova.seconds -3600}}
will evaluate the date and substitute an hour from it (in theory). Thus, it will return a new date (e.g. 2024-03-12T20:33:38+01:00), but the Wait node can’t work with it, the date will be treated as a timestamp (e.g. 1710276600, so it waits for that amount of seconds. It’s about ~55 years to wait )
You should provide the number of seconds to Wait for (e.g. 10 - wait for 10 seconds only) or you have to change the operation to “At Specified Time”.
But for that, your date should be converted into date type
First of all, you are helping me a lot, so thanks a lot.
Secondly, actually I sent the wrong workflow that I was testing. I was doing what you said with ‘Specified Time’, but it still doesn’t work.
I tried with node code too but I’m still missing the point somewhere. Again, thanks a lot.
Hm.. It’s acting very weird with that action and an expression as a value.
It will work only with the date in the below format (see the workflow in the end):
And if I set the date with an expression in the same format, than it seems everything is working fine, except in the executions we will see some weird waiting time