PowerAppsFlow, PowerApps, Calendar, Calendar Event, calendar events, calendar view of events, leave, Request, flow, Flow When a new event is created (V2)
I'm trying to make a flow that creates calendar events from Leave Requests (powerapps) thats approved.
I tried a few different setups, but havent had any luck making it work like i want it to. Please help!
I also want a flow for automatically deleting calender events when the leave request is deleted from powerapps (onedrive). I have no idea of how to make the delete flow. If you have the skills it would be much appreciated!
The goal is to always have the calendar up to date with the powerapps onedrive sheet.
This is what i got now:
Its in Norwegian, but ill describe the different sources and commands below:
Recurrence - it runs the flow every hour.
Hent rader - "Get rows" in english. It gets the Leave request rows from a onedrive excel file.
Hent hendelser (V2) - "Get events (V2)" in english. It gets the events from the callendar called "Fravær" ("Leave" in english).
The two "Apply to each" boxes was added automatically.
Filter array - Not shure if the right things are filled in here... It gets the information from "Value", i guess this is the values from the excel file. I then filled in that the "Status" should be equal to "Godkjent" (approved in english). The goal was to have it filter out (and use) the leave requests that was approved.
I dont know what "Selected" does, but i tested with and whitout it.. Don't work either way. Its the same values as in Filter array.
Then its a new Applay to each which was added automatically. Dont know if its needed or not.
New Filter array with calendar Value (guess this is all the values in that calendar), "Brødtekst" ("Body" in english) and "LeaveID". I decided to add LeaveID to the end of the body so i can use that as a uniqe id and refrense for not adding the same event multiple times. The goeal with this is to filter only the events (leaves) that havent been added before.
last its the "Opprett hendelse (V2)" ("Add event (V2)" in english). It adds events to the calendar "Fravær". The title will be the requester and leave type. Start and end day are fetched from the excel sheet. The timesone is set to norwegian time, dont know if this is needed. "Brødtekst" (The body) contains leave title, details and ID at last (the ID is just in there so that I can refrense it as a filter (goal is to just have one event per leave).
I did get it to add callendar events, but it added them all again the next hour. After 2 hours there were duplicates of all the events. After trying to add "Filter array" (I guess this is what i need to add) it would not create any calendar events and this is the status after running it:
Im lost and in desperate need of help. thanks!!
Hi @JAF ,
About #1, do you want to create calendar events from an Excel file with Approved status?
I have made the following flow for your reference. Instead of using Filter array and Select actions, I initialized variables in the flow. Please check the detailed configuration.
I am using Button trigger for testing, please just change it to a recurrence for your scenario.
About #2, to create a deleting flow, we could use the similar configuration but an opposite logic. Please check the following configuration.
@v-yamao-msft Thanks for the help. Im still having a small problem. Looks like its the dates.. In the excel form the date cells are set to dd.mm.yyyy hh.mm (custom). I dont want to change the excel form due to the coding with powerapps. But if i have to, i will. Tried to make a copy of the excel form and use simple dates, but the flow would still not work. Please help.
I think the Delete flow works. Didnt get error, but havent deleted anything from the excel sheet yet.
Hi @JAF ,
It’s a known issue that date from Excel will be returned as a String when working with Flow.
A workaround for this issue format the StartDate and EndDate columns as Text first, then input the date and time in each row.
Further, it should be set to a ISO format likes below:
Doc on ISO 8601 for your reference:
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!
We've given our badges an overhaul and also added some brand new ones!
Learn how to build the business apps that you need.
Find out where you can attend!
Watch & learn from the Power Automate Community Video Gallery!