Rick Savoy
Rick Savoy

Reputation: 341

Power Automate HTTP Post Error when updating datetime field with utcNow()

I have a SharePoint list that I am building a flow for in Power Automate. When a certain field's value is changed, I need to set an associated date field to the datetime the value was changed. Purpose is to later use that date to notify users if the next required action is not taken within 24 hrs. When I run flow with a literal quoted date, it works fine. The error I'm getting is "Invalid JSON. The value '05-15-2023' is not a valid number"

enter image description here

Edit: SetToCC is a datetime field.

Any help would be appreciated!!

Upvotes: 0

Views: 1594

Answers (2)

Expiscornovus
Expiscornovus

Reputation: 1497

What type of field is the SetToCC? Assuming it is a datetime type of field, haave you tried putting quotes around the value of the SetToCC property as well?

Try something like as the body payload.

{
"SetToCC":"@{formatDateTime(utcNow(), 'MM-dd-yyyy HH:mm')}"
}

Upvotes: 0

Related Questions