I've been trying to use Microsoft Flow to fetch all the meetings I had in the past two weeks, but I want to do it periodically, so I need an ODATA filter query for the Outlook "Get Events" action to limit the amount of data received.
I'm trying with Start gt {Now-14}, but it fails to work. Does anyone know if dynamic date ranges are even possible there?
Thanks!
Hi @tupaschoal,
I think the issue here should be related with the date time format, please take a try with the following format:
Start/DateTime ge '2016-04-01T08:00'
For two weeks, try:
Start/DateTime ge '2016-04-01T08:00' and Start/DateTime le '2016-04-15T08:00'
For the syntax of the Odata filter, please see:
Resource reference for the Mail, Calendar, Contacts, and Task REST APIs
https://msdn.microsoft.com/en-us/office/office365/api/complex-types-for-mail-contacts-calendar
Search for "To get all the events in the user's default calendar that start on or after a specific date, you can filter on the Start property."
If you have any further questions, please feel free to post back.
Regards
Adding another posts,
If we would like to get the events from last two weeks, we might need to use the UTCnow() function and the Compose action to generate the corresponding date time.
Please check my another posts regarding the compose time:
Use the adddays function instead of addhours() to switch the date range.
The formula in the Compose action should be:
"@adddays(utcnow(),-14)"
"@utcnow()"
If you have any further questions, please feel free to post back.
Regards
Hello @v-micsh-msft,
Thanks for the response, I didn't know how to use the Compose box and it seems integral to building complex flows.
Though the compose boxes work, I couldn't manage to make the "Get Events" filter the events properly, the filter query I used was:
Start/DateTime ge '2016-12-09T15:54:17.0468652Z' and Start/DateTime le '2016-12-23T15:54:17.3437361Z'
where the values come from the two compose actions you suggested. One event that I expected to be filtered (because it happened two months ago, not on the past two weeks) can be seen below (sensitive information was erased):
{ "Id": "", "Attendees": [ { "Status": { "Response": "None", "Time": "0001-01-01T00:00:00+00:00" }, "Type": "Required", "EmailAddress": { "Name": "tupaschoal", "Address": "tupaschoal" } }, ], "Body": { "ContentType": "HTML", "Content": "" }, "BodyPreview": "", "Categories": [], "ChangeKey": "", "DateTimeCreated": "2016-09-27T17:17:45.5352294+00:00", "DateTimeLastModified": "2016-10-05T12:49:41.1377347+00:00", "End": "2016-10-05T14:00:00+00:00", "EndTimeZone": "E. South America Standard Time", "HasAttachments": false, "Importance": "Normal", "IsAllDay": false, "IsCancelled": false, "IsOrganizer": true, "Location": { "DisplayName": "" "Address": { "Street": null, "City": null, "State": null, "CountryOrRegion": null, "PostalCode": null }, "Coordinates": { "Altitude": null, "Latitude": null, "Longitude": null, "Accuracy": null, "AltitudeAccuracy": null } }, "Organizer": { "EmailAddress": { "Name": "tupaschoal", "Address": "tupaschoal" } }, "Recurrence": null, "Reminder": null, "ResponseRequested": true, "ResponseStatus": { "Response": "Organizer", "Time": "0001-01-01T00:00:00+00:00" }, "SeriesMasterId": null, "ShowAs": "Busy", "Start": "2016-10-05T12:30:00+00:00", "StartTimeZone": "E. South America Standard Time", "Subject": "", "Type": "SingleInstance", }
Thanks (:
Hi @tupaschoal,
Thanks for the update.
I didn't noticed this as the calendar didn't contain any older events when I tested it before.
Just tried this time and I got the same results as yours.
The Get Events Action seems to ingore the Query inputed, I will take a further investigation on this.
Regards
Hello @v-micsh-msft, thanks for the quick reply (once again!). Please do let me know when you have a fix or workaround for it 🙂
Hi @tupaschoal,
Apologize for the late response.
No helpful results currently.
No matter how I change the format, the results are always the same. I will confirm the Odata Query part with others.
I will update here once I have any response.
Appreciate your patience.
Regards
Thank you @v-micsh-msft, I'm just anxious to get this working 😛
Have you considered that the filter might be ignored (incomplete implementation)?
Hi @tupaschoal,
I got the response, confirmed the behavior that the filter Query is not working.
There should be changes (currently I didn't get any result regarding how it would be changed) be made on the filter query part.
Apologizes for the inconvenience caused by this.
Regards
I'm also interested in hearing when this bug is fixed.
Hi @tupaschoal,
The Flow team are working on this, but yes, currently there is no ETA.
Please consider submit this as an idea. I will vote for it, which I think is a much efficient way than what I could do from my side.
Regards
I've posted a Flow Idea to support this bug. Please support it at the following link:
https://powerusers.microsoft.com/t5/Flow-Ideas/Filter-Outlook-Events-by-date/idi-p/23361
Voted, @michowl.
@v-micsh-msft I just find it weird that we have to submit an idea when it is clearly a bug 😞
Any update?
Has there been any updates on this matter? I'm trying to get entries from the past month on a SharePoint list and this seems relevant.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
45 | |
43 | |
38 | |
36 | |
23 |
User | Count |
---|---|
47 | |
31 | |
29 | |
29 | |
28 |