cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
FpassX
Level: Power Up

JSON API Result: HOWTO Extract / Process the results ?


Hi everyone,

I have a JSON API. I can query it, filter on data, make textual search etc...
The answer is a list of results in an json array.

Can I with MS Flow, have a periodic check, given a specific query (ex: theme:energy, location:Paris), and check if there is new results for my query ?

ie. getting the list of results, and checking if there is new results since the last time ?

If it's not an out of the box feature, I also have timestamps for my record, I can query : result_timestamp > "last time I checked" but for this I need to store a status of the periodic queries...


Then, if there is new results, trigger a notification, an action, an email, an SMS or whatever...

I can really simply do it with Zappier, and as I heard that Microsoft Flow is the same kind of tool, I'm trying without luck for the moment.


Help appreciated 😄

Thanks !

2 REPLIES 2
Community Support Team
Community Support Team

Re: JSON API Result: HOWTO Extract / Process the results ?

Hi FpassX,

 

Please consider to use trigger “Recurrence” in your flow. Recurrence can trigger a flow at regular. You could adjust the Frequency and Interval according to your needs.

4.PNG

 

About checking if there is new result since the last time, please consider to add a Condition in your flow. About how to add a condition in your flow, please see this doc for more details:
https://flow.microsoft.com/en-us/documentation/add-a-condition/

 

After the condition, you could add actions to send an email, send a push notification, etc.

 

Please try it on your side and feel free reply if you need more help.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Power Automate Staff SameerCh
Power Automate Staff

Re: JSON API Result: HOWTO Extract / Process the results ?

Hi

 

Thanks for sharing your feedback!

This is something that we want to make easy.  Currently, I dont believe we are quite there yet.

 

Your scenario is akin to what we call a polling trigger.  The polling trigger works by checking an API endpoint for new data.  In fact, many of our built-in triggers work that way.  The challenge for us has been to keep track of the "timestamp" marker.  We have recently rolled out the support for defining polling triggers.  It has some limitations but I think it should work for your scenario - esp since you contol the backend API as well.

 

We dont have a blog post/doc on it yet.  But this is how it works:

> Your API has a query parameter which can be used to check for new data AND it MUST be a timestamp (date-time)

> Your API response will typically be an array (or an object with an array) of objects that you want to return.  One of the property MUST be a timestamp that can be used to specify the value of the query parameter

 

This is how the screen looks:

 

image.png

 

And this is where you can configure your query parameter and the value you need to use for that query parameter.

 

image.png

 

Thanks!
Sameer

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (6,759)