cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
brimstone
Advocate I
Advocate I

Send a calendar invite as email

Hey guys

 

I am currently creating a calendar item with required attendees to the selected calendar with this formula:

 

Office365Outlook.V2CalendarPostItem(Dropdown1.Selected.Name; "Subject"; StartTime;EndTime; {Body: "Body"; RequiredAttendees: Concatenate(FirstEmail.Text;"; ";SecondEmail.Text); ResponseRequested: true})

 

This works fine so far. What I am missing here is that the required attendees will not be informed with an invitation email, as when you invite someone directly in Outlook. They have to look manually in their calendar to response to the event.

 

Is there a possibility to send the invitation as an email to the required attendees?

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@brimstone 

Try to use the V4CalendarPostItem function instead.  I can't speak to V2, but v4 does send an email invite to the required attendees.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

8 REPLIES 8
mdevaney
Super User III
Super User III

@brimstone 

It doesn't look like there is a way to send Outlook style meeting requests through PowerApps or Flow.  If you want to submit a feature request to the Idea forums I would support it.

 

Otherwise, the best thing you could do right now is send an email using the Office365Outlook connector anytime a meeting is setup.

 

Office365Outlook.SendEmail("yourname@yourcompany.com", "Subject Here", "Email Body Here")

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

RandyHayes
Super User III
Super User III

@brimstone 

Try to use the V4CalendarPostItem function instead.  I can't speak to V2, but v4 does send an email invite to the required attendees.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

@RandyHayes 

Good to know.  Thanks for the tip Randy!

@RandyHayes @mdevaney 
Thanks for the answers!

 

With the V4 function I now get the error "String was not recognized as a valid DateTime". For timeZone I tried both DateTimeZone.Local and UTC. Start and End comes from a datepicker and dropdowns for the hour/minutes. 

The formula looks like this now: 

Office365Outlook.V4CalendarPostItem(
Dropdown1.Selected.Name; "Subject"; 
DatePicker1.SelectedDate + Time(Value(DropdownHour.Selected.Value);Value(DropdownMinute.Selected.Value);0);
DatePicker1.SelectedDate + Time(Value(DropdownHour.Selected.Value)+1;Value(DropdownMinute.Selected.Value);0);
DateTimeZone.Local;
{body: "Body"; requiredAttendees: Concatenate(FirstEmail.Text;"; ";SecondEmail.Text); responseRequested: true})

Any idea why I get this error?

@brimstone 

Please change your formula to the following:

Office365Outlook.V4CalendarPostItem(
    Dropdown1.Selected.Name; 
    "Subject"; 
    Text(DatePicker1.SelectedDate + 
         Time(Value(DropdownHour.Selected.Value);Value(DropdownMinute.Selected.Value);0);
         UTC);
    Text(DatePicker1.SelectedDate + 
         Time(Value(DropdownHour.Selected.Value)+1;Value(DropdownMinute.Selected.Value);0);
         UTC);
    "(UTC) Coordinated Universal Time";
    {
       body: "Body"; 
       requiredAttendees: Concatenate(FirstEmail.Text;"; ";SecondEmail.Text);
       responseRequested: true
    }
)

 

Time/dates need to be in UTC and then specify UTC for the TimeZone.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

I don't know your requirements but I've done this 2 ways:

1. Azure Function App -  I send the calendar events out at the end of the day.  I have a Timer function app that creates an .ics file and sends an email.  Azure Functions are very powerful.  I use Azure SQL DB.  Example ICS file:

 

 

BEGIN:VCALENDAR
VERSION:2.0
PRODID:Company Name
METHOD: PUBLISH
BEGIN:VEVENT
DTSTAMP:20190410T060304Z
DTSTART: 20190308T140000
DTEND: 20190308T220000
SUMMARY:Settlement Date for ...
UID:27ed033946a6430ca04c02ea2fb556c8
SEQUENCE:2
STATUS:CONFIRMED
CLASS:PRIVATE
CATEGORIES:Personal
END:VEVENT
END:VCALENDAR

 

The benefit of this approach if you have to update the date you use the same UID and increment the sequence number.

 

The other approach I use is to use Excel.  I have an Azure Virtual Desktop.  I have an addin that produces reports that runs daily using Task Scheduler.  I have Outlook setup as well.  Example VBA code:

 

 

  Dim oApp As New Outlook.Application
  Dim appt As Outlook.AppointmentItem
  Dim msg As Outlook.MailItem
  Dim oAcc As Outlook.Account
  Dim sb As String
  
  On Error GoTo handler
  
  Set appt = oApp.CreateItem(olAppointmentItem)
  Set msg = oApp.CreateItem(olMailItem)
  Set oAcc = oApp.Session.Accounts.Item(2)
  appt.MeetingStatus = olMeeting
  If EMAILTEST Then
    appt.RequiredAttendees = "User@Company" 
  Else
    appt.RequiredAttendees = eAddr
    appt.OptionalAttendees = "User@Company"
  End If
  appt.Location = "  "
 ' Convoluted process to get HTML for event
  msg.HtmlBody = s
  msg.GetInspector().WordEditor.range.FormattedText.Copy
  appt.GetInspector().WordEditor.range.FormattedText.Paste
  appt.Start = md
  appt.AllDayEvent = True
  appt.ReminderSet = False
  sb = mn & ": " & dateMsg
  appt.Subject = sb
  appt.SendUsingAccount = oAcc
  appt.Display
  appt.ReminderMinutesBeforeStart = 60
  appt.send
  Set msg = Nothing
  Set appt = Nothing
  Set oAcc = Nothing
  Set oApp = Nothing

  Exit Sub
  
handler:
  Call MsgBox(Err.Number & ": " & Err.Description, vbOKOnly, "Email Send Error")
  Err.Clear

End Sub

 

 

I like this approach.  It produces an email and required attendees can accept and I get a reply that they have accepted.

@RandyHayes Thanks a lot!

 

@mogulman Thanks for your effort. I haven't worked with Azure so far, but I'll keep it in mind and try it out if I get the chance.

I am encountering the same issue.  I am using the V4CalendarPostItem and have been but no invite is generated from the event, it just adds to the calendar without notifying the attendees. 

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (57,706)