Skip to main content
Power Automate
    • Connectors
    • Templates
    • Digital process automation
    • Robotic process automation
    • Business process automation
    • Process advisor
    • AI Builder
  • Pricing
  • Partners
    • Blog
    • Documentation
    • Roadmap
    • Self-paced learning
    • Webinar
    • Business process and workflow automation topics
    • Overview
    • Issues
    • Give feedback
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • User groups
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Microsoft Power Automate Community
    • Welcome to the Community!
    • News & Announcements
    • Get Help with Power Automate
    • General Power Automate Discussion
    • Using Connectors
    • Building Flows
    • Using Flows
    • Power Automate Desktop
    • Process Advisor
    • AI Builder
    • Power Automate Mobile App
    • Translation Quality Feedback
    • Connector Development
    • Power Platform Integration - Better Together!
    • Power Platform Integrations
    • Power Platform and Dynamics 365 Integrations
    • Galleries
    • Community Connections & How-To Videos
    • Webinars and Video Gallery
    • Power Automate Cookbook
    • Events
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    • Community Engagement
    • Community AMA
    • Community Blog
    • Power Automate Community Blog
    • Community Support
    • Community Accounts & Registration
    • Using the Community
    • Community Feedback
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 
    • Microsoft Power Automate Community
    • Galleries
    • Power Automate Cookbook
    • Booking Buddy - Calendly-style booking workflow fo...

    Booking Buddy - Calendly-style booking workflow for inviting people to schedule appointments.

    05-20-2021 10:53 AM

    jzcase
    Resolver IV
    1274 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    jzcase
    jzcase Resolver IV
    Resolver IV
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    Booking Buddy - Calendly-style booking workflow for inviting people to schedule appointments.

    ‎05-20-2021 10:53 AM

    I started this yesterday and stayed up until 2am working on it, just "finished" it now. The boss wanted a system that would allow her to invite people to book available times with her, ala Calendly.

    I was like, buy another SaaS? No! I must build it!

    Booking Buddy takes an email address and sends it a message containing buttons. Each button is an available time slot on the sender's calendar between two date ranges. When the recipient selects a date, Booking Buddy checks the sender's calendar *again* and makes sure that there is a match with the selected date. If there's no match, the recipient receives another email with an apology and an updated set of buttons to select from.

    There are two versions:

    1. Booking Buddy Simple
      • Can live in the Default Environment and can be shared purely with Run Only permissions (I submitted it as a template)
      • Can only invite one email address per run.

    2. Booking Buddy Full
      • Can invite multiple email addresses at once with a concurrency limit of 25
      • Depends on Child Workflows, so it must live in a Solution
      • Because Child Workflows cannot inherit connections, each user must have his/her own Child Workflow with the user's connections.
      • Because Child Workflows must be created in a Solution, and can't be imported or added into it, my PowerApps System Administrator account just creates copies of the child workflow and adds connections for those users.

    All of the problems with Booking Buddy Full would be solved if Power Automate would let us edit objects within arrays, so please check out that idea. Or let me know if there's a more popular equivalent out there.

     

    For in this case let me showcase Booking Buddy Simple.

    Power Apps.png

    Link to PDF of the above.

    Here's the "recipe":

    1. Manually trigger a flow with the following inputs
      • Recipient - email address (1 only)
      • Meeting Topic (text)
      • Email Message (text)
      • Meeting Duration (number) - in minutes
      • Earliest Day (date)
      • Latest Day (date)
    2. Configure settings
      • Compose - Time Zone for Formulas (use Microsoft standard time zones)
      • Compose - Time Zone for Outlook Calendar (use text value from dropdown list in Outlook Calendar steps)
      • Compose - What Outlook calls the Default Calendar in Your Language (Calendar)
    3. Initialize variables
      • DefaultCalendar (string, empty)
      • AvailableTimes (string, empty)
      • Scheduled (boolean, false)
      • Attempts (integer, 0)
      • Match (boolean, false)
      • EmailBody (string, empty)
    4. Do Until Scheduled = true
      1. Get Available Times
        1. Clear AvailableTimes
        2. Outlook - Find meeting times (V2)
          1. Required attendees = Trigger -> User email
          2. Meeting duration = Trigger -> Meeting Duration
          3. Start time = converttoutc(concat(triggerBody()['date'],' 12:00 AM'),outputs('Time_Zone_for_Formulas'))
          4. End time = converttoutc(concat(triggerBody()['date_1'],' 11:59 PM'),outputs('Time_Zone_for_Formulas'))
          5. Max Candidates = 1000
          6. Activity Domain = Work
        3. For Each (outputs('Find_meeting_times_(V2)')?['body/meetingTimeSuggestions'])
          1. Append to AvailableTimes: 
            1. replace(convertfromutc(concat(items('Populate_AvailableTimes_Variable')?['meetingTimeSlot']?['start']?['dateTime'],'z'),outputs('Time_Zone_for_Formulas'),'f'), ',', '')
            2. ,
          2. Compose - Add None of These option: concat(variables('AvailableTimes'),'None of these')
      2. Determine Email Body Text
        1. If Attempts = 0, Set EmailBody to Trigger -> EmailText
        2. Otherwise Set EmailBody to 'Sorry, it appears that time has already been booked. Please choose another.'
      3. Send email with options (Timeout: P7D)
        • To: Trigger -> Recipient
        • Subject: Select a Meeting Time for: Trigger -> Meeting Topic
        • User Options: outputs('Add_None_of_These_option')
        • Header Text: Let's meet
        • Selection Text: Please select one of the following appointment times.
        • Body: EmailBody
      4. If User Responded with a Time (Selected Option not equal to 'None of these' AND not equal to '')
        1. If True
          1. Get Available Times (copy of above steps)
          2. Compose: Split AvailableTimes
          3. For Each AvailableTime item
            1. If it matches user selected time
              1. Set Match to true
              2. Otherwise do nothing
          4. If Match is true
            1. Outlook: Get calendars (V2)
            2. For each calendar
              1. If name = outputs('What_Outlook_calls_the_Default_Calendar_in_Your_Language')
                1. Set DefaultCalendar to calendar
                2. Otherwise do nothing
            3. Outlook: Create event (V4)
              • Calendar id: DefaultCalendar
              • Subject: Meeting Topic
              • Start Time: SelectedOption
              • End Time: addMinutes(outputs('Send_email_with_options')?['body/SelectedOption'], triggerBody()['number'])
              • Time Zone: outputs('Time_Zone_for_Outlook_Calendar')
              • Required attendees: Trigger -> User email; Trigger -> Recipient
              • Body: Trigger: Email Message
            4. Set Schedule = true
            5. Set Match = false
          5. OTHERWISE
            1. Increment Attempts by 1
        2. OTHERWISE
          1. Set Scheduled to TRUE
    BookingBuddySimple_20210520175307.zip
    Labels:
    • Labels:
    • Button flows
    Message 1 of 1
    1,274 Views
    3 Kudos
    Reply
    • All forum topics
    • Previous Topic
    • Next Topic

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Pages
    • Power Automate
    • Power Virtual Agents

    • Sign up free
    • Sign in

    Browse

    • Templates
    • Connectors
    • Partners

    Downloads

    • Mobile
    • Gateway

    Learn

    • Documentation
    • Learn
    • Support
    • Community
    • Give feedback
    • Blog
    • Pricing

    • © 2023 Microsoft
    • Contact us
    • Trademarks
    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Terms & conditions
    California Consumer Privacy Act (CCPA) Opt-Out Icon Your California Privacy Choices