cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Send email attachment when calendar item created by Microsoft Bookings

Hi Everyone

 

I recently started using Microsoft Bookings and I want to create a flow so that when a client books a specific service an email is automatically generated with the required forms for the client to complete for that type of service.

 

Finding out that there appears to be no flow support for Bookings yet, it seemed appropriate to use the "When a new event is created" actio, test the "Subject" field for the type of service and the use the "Send an email" action to send the email with the attachment needed from OnDrive.

 

This worked fine in my testing, but how do I get the email address of the booking out of the Microsoft Bookings created calendar item and add it to the "To:" field? This is what is added to the calendar item detail by Microsoft Bookings:

 

 

***
Customer Info
--------------------
Name: Joe Smith
Email: jsmith@test.com
Phone Number: 0415555555
Address: An Address

 

... so I would need to extract the email address from there using coding. Can this be done in Microsoft Flow? Or... is there an easier way?

 

Cheers

 

Nick

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Send email attachment when calendar item created by Microsoft Bookings

Hi @GSH,

 

Could you please share a screenshot of your flow's configuration?

Do you use the "When a new event is created" trigger of Outlook connector within your flow?

Further, do you want to extract the email address from Body of Outlook Calendar event?

 

The Microsoft Bookings connector is not supported in Microsoft Flow currently, if you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

I suppose that you use the "When a new event is created" trigger of Outlook connector within your flow, is it true? I have created a event in my Outlook calendar, the body of the event as below:5.JPG

 

 

I have made a test on my side and please take a try with the following workaround:

  • Add a "When a new event is created (V1)" trigger.
  • Add a Condition, left input box set to Subject dynamic content of the trigger, right input box set to FlowTest, within middle drop down, choose is equal to.
  • Within "If/yes" branch of Condition, add a "Html to text" action, Content field set to Body preview dynamic content of the trigger.

         Add a "Compose" action, Inputs set to following formula:

 

add(indexOf(body('Html_to_text'),'Email'),7)

       Add a "Compose 2" action, inputs set to following formula:

 

 

indexOf(body('Html_to_text'),'Phone Number')

     Add a "Compose 3" action, inputs set to following formula:

 

 

substring(body('Html_to_text'),outputs('Compose'),sub(outputs('Compose_2'),outputs('Compose')))

    Add a "Send an email" action, To field set to output of "Compose 3" action.

 

Image reference:6.JPG

 

7.JPG

The flow works successfully as below:8.JPG

 

 

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Send email attachment when calendar item created by Microsoft Bookings

Hi @GSH,

 

Could you please share a screenshot of your flow's configuration?

Do you use the "When a new event is created" trigger of Outlook connector within your flow?

Further, do you want to extract the email address from Body of Outlook Calendar event?

 

The Microsoft Bookings connector is not supported in Microsoft Flow currently, if you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

I suppose that you use the "When a new event is created" trigger of Outlook connector within your flow, is it true? I have created a event in my Outlook calendar, the body of the event as below:5.JPG

 

 

I have made a test on my side and please take a try with the following workaround:

  • Add a "When a new event is created (V1)" trigger.
  • Add a Condition, left input box set to Subject dynamic content of the trigger, right input box set to FlowTest, within middle drop down, choose is equal to.
  • Within "If/yes" branch of Condition, add a "Html to text" action, Content field set to Body preview dynamic content of the trigger.

         Add a "Compose" action, Inputs set to following formula:

 

add(indexOf(body('Html_to_text'),'Email'),7)

       Add a "Compose 2" action, inputs set to following formula:

 

 

indexOf(body('Html_to_text'),'Phone Number')

     Add a "Compose 3" action, inputs set to following formula:

 

 

substring(body('Html_to_text'),outputs('Compose'),sub(outputs('Compose_2'),outputs('Compose')))

    Add a "Send an email" action, To field set to output of "Compose 3" action.

 

Image reference:6.JPG

 

7.JPG

The flow works successfully as below:8.JPG

 

 

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
New Member

Re: Send email attachment when calendar item created by Microsoft Bookings

That worked well. I knew there had to be a way to extract that email, being unfamiliar with Flow functions though I could not work it out. Now, of course, it seems readily apparent :). I just added a "Get File Content" action as the first step to allow me to select the correct file I want to send from my OneDrive and in the "Send an Email" action -> Advanced Options added the File Content output and the filename.

 

Capture.JPG

Highlighted
New Member

Re: Send email attachment when calendar item created by Microsoft Bookings

Hi Kris. Thanks for your help. Of course, now that I have started I want to take it further. As Jotform allows for the prefilling of forms via passing a correctly formatted hyperlink, is it possible save the output of a compose action to variables that can then be referenced in the body of the "Send an Email" as HTML. For example if I had one variable containing the patient's first name, another for the second name and the last containing their email addresss, then you could craft HTML hyperlink code to embed into the body text through to Jotform.

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (5,021)