@lucafabbri365 It seems to be a bug in the trigger. I ran a few tests and this is what I discovered.
Creating Event without Changing Time
If you create an event without adjusting the time. The flow only triggers once.

Creating Event and Adjusting Time
If you create an event and adjust the time before or after a subject is entered (it really doesn't matter—I tested both ways). It will trigger the flow twice.
The interesting thing is that I thought maybe the second flow trigger would be an update action. Turns out it's a added action.


The Event Id for both flow runs are the same.

Trigger Condition (Optional)
Instead of using a Condition after your Trigger to check if the Show as is equal to oof. You could use the Trigger Condition. This way your flow will only trigger if this condition matches—preventing any unnecessary flow runs.
@equals(triggerOutputs()?['body/showAs'], 'oof')

Note: The only issue is the flow will not tigger if an item is deleted. However, you might want to consider a different flow to manage deleted items. It will trigger for when an item is Updated.
Get Events – Vacation Tracker
To get around the flow triggering twice—you'll need to get the Events from your Vacation Tracker first and run a check on the original Event's ID. This means that upon creating the event, you'll need to add a line of text to output the original Event ID so the flow has a way of checking to see if the event already exists.
Unfortunately, you won't be able to use the Filter Query on the event body. However, I would recommend reducing the amount of events returned by using a Filter Query. A suggestion would be to filter out events that haven't passed yet.

Filter Events by ID
Next, add a Filter Array action. Insert the value dynamic content from the Get events (V4) action into the From field. In the first value field insert Body (capital B, not the one with the lower case b) dynamic content from the Get events (V4) action. Change the operator to contains and insert Id dynamic content from the flow trigger into the second value field.



Get Event Count
Whenever I use a Filter Array action, I always like to return the count of items returned in a Compose action.

This is helpful when building a. flow and can also be used to troubleshoot your flow. Insert a Compose action. Add an Expression. Use the length() function.

Select the Dynamic content tab and insert the body dynamic content from the Filter Array action into the length() function.

Condition Check
Add a Condition check to your flow. Insert the output from the Compose action above (the one storing the number of items returned). Leave the operator to is equal to. Insert a 0 into the second value field.
This Condition action will check to see if items have returned. If there isn't an existing item (meaning the Filter Array action returned 0 items) add the Create an event action to the YES branch.

Don't forget to add the Id dynamic content from the flow trigger into the body of the event. This is what the Filter Array action will need to see if there is already an event that has been created.
Add in any other dynamic content you'd like copied from the flow trigger into this action. I've only filled out the first few fields. Tip: Include the Is all day event? dynamic content—otherwise items marked all day aren't created properly.
Important: Change the Timezone to your local timezone.

Run a test. Create an item where the status is set to anything but Away. The flow should not trigger. Then create an event where the status is set to Away—the flow should trigger.

Update Item
If there are items, you can add Update Event action to the NO branch. You'll need to use the Event id from the Filter Array action.

However, when you select the dynamic content—Power Automate will automatically add an Apply to Each action to your flow. That's because the Filter Array action returns an array of items.

To avoid the Apply to Each action, you'll need to use an expression. You'll need the dynamic content key. If you hover over the dynamic content label you'll see the key between the single quotes. Refer to this section of a YT Tutorial I uploaded on how to get dynamic content from a Filter Array action

Remove the dynamic content key and pull the Update Event action outside of the Apply to Each action. Insert an expression for the Id. Start with:
?[0]['id]
The [0] will indicate that you want to get the first item in the array.

Select the Dynamic content tab and place your cursor at the start of the expression by pressing the up arrow key. Insert the body dynamic content from the Filter Array action.

For the rest of the fields in the actions (wherever necessary), insert the dynamic content from the Flow trigger. Ensure you are selecting the dynamic content from the flow trigger and not the Get Events (V4) action.

Do not forget to include the Id from the flow trigger—just as we did when creating the event. Add in any other dynamic content you'd like copied from the flow trigger into this action. I've only filled out the first few fields. Tip: Include the Is all day event? dynamic content—otherwise items marked all day aren't created properly.
Important: Change the Timezone to your local timezone.

Hope this helps!
Take a look a this YT Tutorial I recently uploaded: 3 Mistakes YOU 🫵 are Making with the Apply to Each Action in your Microsoft Power Automate Flow
In this video tutorial I’ll go over how to avoid these common mistakes when using the Apply to Each action in a Power Automate flow:
1️⃣ Looping through a Single Item
2️⃣ Creating Unnecessary Nested Loops
3️⃣ Looping through an Unfiltered Array
At the end of the video I share a few helpful insights when it comes to using the Apply to Each action in your flow.
I'll also cover:
✅ How to avoid the Apply to Each action with a single item array
✅ How to use the item() function to access dynamic content in an array
✅ How to prevent unnecessary nested Apply to Each action loops
✅ How to use the Select action
✅ How to convert an array to a string with the Select action
✅How to use the Filter Query field
✅ How to count the number of items in an array
✅ How to use a condition control
✅ How to use the concurrency control
✅ How to set a top count
✅ How to use Compose actions for troubleshooting
---
For more flow troubleshooting tips—check out this YT Tutorial: 5 Power Automate Troubleshooting FAQs and Helpful Tips for Creating Better Flows
In this tutorial I cover:
✅ How to troubleshoot a false Condition action result
✅ How to get dynamic content when it isn’t selectable from the list of dynamic content
✅ How to troubleshoot an Apply to Each action that isn’t looping through
✅ How to troubleshoot a skipped Apply to Each action
✅ How to troubleshoot a Filter Query
✅ How to use a SharePoint yes/no column in a Filter Query
✅ How to use Compose actions to troubleshoot a Power Automate flow
✅ How to troubleshoot multiple emails being sent
✅ How to troubleshoot multiple Teams messages being sent