Hi
I'm trying to use the Office 365 trigger 'When a new event is created (V3)' with a trigger condition. The condition I am trying to use is exactly the one shown in this webpage:
https://www.expiscornovus.com/2022/08/25/delete-calendar-invite-e-mail-after-rsvp/
i.e. @equals(triggerOutputs()?['body/subject'], 'Auto Accept Event')
I have the same use case as the author of the webpage. I need the trigger to only start the flow when calendar events with a specific subject are created.
With the trigger condition set, even when I create a single event with the subject 'Auto Accept Event', the trigger does not start the flow.
If I remove the trigger condition, the trigger fires for any/all events I add to my calendar.
I am aware that this trigger is a polling trigger, and that it might have to process multiple events to see if any have been created with the subject named in the condition. For my use case, it is acceptable if the condition causes the flow to start if ANY of multiple events have the subject I am testing for - I can use conditions later in the flow to avoid processing events that don't have a matching subject, but it is important that the flow doesn't trigger unless there is at least one relevent event.
I have also tried creating multiple test events and using an ODATE orderby query (subject asc) to sort multiple events by their subject so that 'Auto Accept Event' is the first event returned, but this doesn't work either - all events are returned in the order they are created in.
While testing with multiple events, I have with the Top Count (advanced parameter) set to 1 and also left blank. There is no difference in the behaviour of the trigger, I cannot get it to fire when the trigger condition is met.
While researching the problem I came this page:
https://powerusers.microsoft.com/t5/Building-Flows/Using-a-Trigger-Condition-Breaks-When-an-event-is-added-updated/m-p/1766342
This has a different potential form for the condition and so I tested this. The form I tested was:
@contains(triggerOutputs()?['body/subject'], 'Auto Accept Event'))
This failed when I saved the flow and returned to the previous page with an error that indicated that @contains was being passed a result that was or would be NULL. Is this a hint as to why the @equals form isn't working, i.e. triggerOutputs()?['body/subject'], 'Auto Accept Event') is always NULL?
Can you explain why this trigger condition might have worked for the author of the first article but is not working for me? More importantl, can you suggest a trigger condition form that will work for my use case?
Many thanks