web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send email attachment ...
Power Automate
Unanswered

Send email attachment when calendar item created by Microsoft Bookings

(0) ShareShare
ReportReport
Posted on by 6

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

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    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

     

     

  • GSH Profile Picture
    6 on at

    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

  • GSH Profile Picture
    6 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard