cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AmeZul
Frequent Visitor

Create a calendar event on Outlook 365 Calendar after approval

Hi, 

I have a time-off request flow that runs from a list on SharePoint. If approved, then it updates the SP list and creates an event on Calendar. So far, it works. The problem is how the event is shown in Calendar:

1. It doesn't cover the days of the request (2 days in the example)

2. The text it displays makes it look 'untidy'

Your help will be really appreciated.

AmeZul_0-1658770239087.png

 

AmeZul_1-1658770984883.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

I think I see your issue with the subject. You are using a choice field. Make sure you are populating it with the Type of Leave Value instead of Type of Leave. The following are the expressions used for Start and End, which come from Start and End datetime fields in the SharePoint form:

  • Start: formatDateTime(triggerOutputs()?['body/Start'],'yyyy-MM-ddTHH:mm:ss')
  • End: formatDateTime(triggerOutputs()?['body/End'],'yyyy-MM-ddTHH:mm:ss')

View solution in original post

6 REPLIES 6
David-
Solution Sage
Solution Sage

What are you actually entering for the value of the subject? I recently set up a process to do the same thing with the following settings, which populates the customer name into the subject from a text field in the SharePoint form:

David_0-1658773452505.png

It shows on the calendar as:

David_1-1658773592618.png

 

AmeZul
Frequent Visitor

 

It actually pulls the information from the SP list:

AmeZul_0-1658774354718.png

Would love to know what functions for Start and End time you used.

I think I see your issue with the subject. You are using a choice field. Make sure you are populating it with the Type of Leave Value instead of Type of Leave. The following are the expressions used for Start and End, which come from Start and End datetime fields in the SharePoint form:

  • Start: formatDateTime(triggerOutputs()?['body/Start'],'yyyy-MM-ddTHH:mm:ss')
  • End: formatDateTime(triggerOutputs()?['body/End'],'yyyy-MM-ddTHH:mm:ss')
AmeZul
Frequent Visitor

Amazing! Thank you, David! Now the only pending issue is the duration of the event... that it does indeed cover the number of days the event is going to last.

CatiaB
Helper II
Helper II

@AmeZul - if you've configured your Start and End fields correctly, shouldn't the duration of the event be automatically calculated from those values?

AmeZul
Frequent Visitor

Yes, I had to add the time to the SP fields, not only the dates. Thanks!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,154)