@Zpierucci For testing purposes, I would recommend you create a New Flow with a manual trigger. This will help you to figure out the logic to the flow you are trying to build.
How to Get a Calendar ID
Add a Scope action. This will make it easy to copy/paste these actions into your working flow. Insert the rest of your actions inside the Scope action.
Insert the Get Calendars (V2) action.
Add an Apply to each action to loop through all the Calendars returned. Add a Compose action to store the Calendar Name and the Calendar ID.
Insert the value Name and value ID dynamic content into the respective Compose action.

Run a test. Take a look at the outputs of the test. Review all the Calendar Names returned. Note: If you are using a Shared Calendar—it must be added to Outlook first before you run this test.
Take note of the calendar names — we'll be using it in the next action.

Delete the Apply to each action.
Add a Placeholder
Since you'll be moving these actions to your working flow. Add a Compose action to store placeholder text for your Calendar. This way you can easily replace it with the dynamic content from your form.
Enter any Calendar name into the Compose action.

Filter Array
The Get Calendars (V2) action will return an array of Calendars. To filter out a specific calendar—use a Filter Array action. It's a lot more efficient than an Apply to Each and Condition action. To learn more about how to use the Filter Array action, please refer to this recent YT Tutorial I uploaded.
In the From field insert the value dynamic content from the Get Calendars (V2) action.
In the first value field insert the value Name dynamic content. Leave the operator as is equal to (unless it's not an exact match) — in which case you can use the contains operator.
In the second value field insert the outputs from the Compose action above.

Run a test. Review the outputs to ensure that your calendar is being returned. If the outputs display a [] this means no calendars were returned.
You'll need the dynamic content key for the next action where we'll return the calendar id. All dynamic content can be returned with an expression. You will need to know key for the content. The key is the text in red between the double quotes.

Get the Calendar ID
Insert a Compose action. Add an expression. The Filter Array action will return an array of results. Even if you return a single item.
To access the ID of the item returned you need to use a [0] in the expression (to get the first item of the array).
Start the expression off by entering in
?[0]['id]

Place your cursor at the start of the expression. Tip: Press the up arrow key. Click on the dynamic content tab and insert the Body dynamic content from the Filter Array action.

Copy/Paste the Scope Action
Click on the 3 dots of the Scope action and select Copy to my clipboard.

In your working flow, insert the Scope action where appropriate.

Click on the My Clipboard tab and insert your Scope action.

Replace the Placeholder Content
In the Compose action storing the Calendar name, replace the placeholder content. This is assuming the text from the form matches the Calendar name.

Hope this helps!
If I helped you solve your problem—please mark my post as a solution ✅. Consider giving me a 👍 if you liked my response!
|