Hello, this might sound a bit dumb, but im struggeling with setting up a Flow.
I have a collection named find_quotes. In this collection are 2 Fields which are relevant for the Flow
1: status
2: published_at
The status Field is a Dropdown with 2 Options Draft and Published (for now, we might add scheduled later but that doesnt matter for now)
I want the flow to write the current timestamp in the published_at when the status is changed to published.
I set up the trigger and its working, in my update_data modul i wrote this in my payload
{
“published_at”: “{{$NOW}}”
}
But for some reason the timestamp isnt written in the published_at field.
This is the relevant log section
{
“permissions”: “$full”,
“emitEvents”: false,
“collection”: “find_quotes”,
“key”: [
[
“b209ebd9-cf67-4767-8326-daf42ee1ccd6”
]
],
“payload”: {
“published_at”: “undefined”
},
“query”: {
“status”: {
“_eq”: “published”
}
}
}
and ofcourse an undefined string cant be written into a timestamp field
{
“name”: “error”,
“message”: “update "find_quotes" set "published_at" = $1, "modified_at" = $2 where "id" in (($3)) - invalid input syntax for type timestamp with time zone: "0NaN-NaN-NaNTNaN:NaN:NaN.NaN+NaN:NaN"”
}
Thanks in Advance