web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Dynamic date in json A...
Power Automate
Answered

Dynamic date in json API body

(0) ShareShare
ReportReport
Posted on by 5

Good morning,

I created a flow that allows to retrieve API data and store them in a database.
The frequency is daily.

I would like to be able to add in the Body Json of the API, the date Today so that every morning the query retrieves the data of the day.

Do you have an idea ?

THANKS

 

 

{
"size": 10000,
"track_total_hits": true,
"query": {
"bool": {
"must": [
{
"range": {
"timestamp": {
"gte": "@{Day(utcNow())}08:40:05.753Z",
"lte": "@{Day(utcNow())}T08:50:37.704Z"
}

}
}
]
}
},
"sort": [
{
"created": {
"order": "desc"
}
}
]
}Capture d’écran 2023-02-13 à 12.54.07.png

Categories:
  • AlexisD Profile Picture
    5 on at

     up 🙂

  • Verified answer
    Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at

    Hi @AlexisD,

     

    If you only want to use today you can use a format within the UtcNow function.

     

    Try something like below:

     

    "gte": "@{utcNow('yyyy-MM-dd')}T08:40:05.753Z",
    "lte": "@{utcNow('yyyy-MM-dd')}T08:50:37.704Z"

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 349 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard