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

Accessing Polling Trigger Parameters

Hey all! Currently building out a Custom Connector on MS Flow, and need a bit of help here. Actually becoming quite frustrated over this. Here is an abstraction of the issue I am facing.
 

I need to build a trigger that polls an endpoint to detect if an instance of `ParentObject` has had a new instance of `ChildObject` appended to its `contents` property.

 

The request/response for the poll will look something like this.

 

Request:
    GET "/trigger/newChildObject"
    Query parameters:
        parentObjectId: <string>
        # potential solution - "after" UTC string
after: <UTC DateTime> Response: Body<application/json>: "contents": [ ChildObject{ id: <string>, name: <string>, created: <UTC DateTime>, updated: <UTC DateTime> }]

 

The `parentObjectId` query parameter is determined by the user via a dynamic dropdown when setting up the flow. That much I have working.

 

What I'm getting hung up on, and actually quite frustrated over, is the lack of documentation on MS Flow Polling Trigger. Polling inherently involves caching/storing the value of some property, right? By the very nature of polling, there must be a mechanism via which the previous poll is compared to the current one, so as to determine if some action/operation should be executed. 

 

So in my case, I do have the ability to include an `after` query parameter, a UTC Date-Time. When included, the API will return only the `childObject` items which were created after that time code. Well, even when I include that in the HTTP Request definition for the Polling Trigger definition, I do not get the option to choose this parameter from the "Query Parameter" dropdown in the "Trigger Configuration" section. Furthermore, there is no mention of how to dynamically pass the Date-Time of the previous poll within the MS Flow Documentation.

 

Setting a query parameter via Policy Template seemed like the next logical route of investigation, but has turned up nothing, as again, the documentation on available `ConnectionParameters` dynamic variables for templating is completely lacking, particularly for polling.

 

The last option would be to return all childObject instances, regardless of create times, and compare the length of the array. But again, no mention as to how that might be done, and given the nature of Flow, I'd hedge my bets that it can't be.

 

The closest thing I can find is this document https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-actions-triggers but it is of no help in creating an MS Flow Polling Trigger via UI or OpenAPI Extension.

 

Let's figure this out, yeh?

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Users Online
Currently online: 83 members 4,546 guests
Please welcome our newest community members: