Create a Power Automate button that sends an email

Completed

In this unit, you'll build a button containing a flow. The flow sends an email to your manager with your current location and a photo of the vehicle that you're using.

  1. Sign in to Go to Power Automate.

  2. Select + Create on the left menu and then select Instant cloud flow.

  3. Enter Notify Your Manager as your Flow name. Select the Manually trigger a flow trigger, and then select Create to start building the flow.

    Screenshot of Notify Your Manager trigger with Manually trigger a flow added.

  4. Select the Manually trigger a flow trigger and then select + Add an input.

  5. Select File and rename File Content to Image.

    Screenshot of Manually trigger a flow with an image file added.

  6. Select + New step and search for Office 365 Users. Under Actions, select the Get manager (V2) option.

  7. In the User (UPN) field, select User email from the Dynamic content window.

    Screenshot of Manually trigger a flow with Get manager showing the User (U P N) option with the Dynamic content open and User email highlighted.

  8. Select + New step and search for Outlook and select Office 365 Outlook.

    Screenshot of Choose an operation with Office 365 Outlook highlighted.

  9. Under Actions, select the Send an email (V2) option.

  10. In the To field, in the Dynamic content section, under Get manager (V2), select Mail. You might have to select See more to find Mail.

    Screenshot of Send an email with Dynamic content for the To field showing and the See more button highlighted next to Get manager.

  11. Set the Subject field to My current location and vehicle I am using.

  12. Set the Body field to the following text:

    Hi
    
    I have arrived at my current location and attached is a picture of the vehicle I am currently using.
    
    Address:
    
  13. In the Body field, after the word Hi, select Display Name from the Dynamic content window under Get manager (V2).

  14. In the Body field, below Address:, select Full address, from the Dynamic content window under Manually trigger a flow. You might have to scroll down a bit to find it.

  15. Select Show advanced options to add the photo as an attachment.

  16. Set the Attachments Name - 1 field to any name you would like to use followed by the .jpg extension. Then set the Attachments Content - 1 field to the following expression:

    base64ToBinary(triggerBody()?['file']?['contentBytes'])

    The following screenshot shows what the Send an email (V2) action looks like.

    Screenshot of Send an email with the body filled in with "Hi Display Name (dynamic field) I have arrived... Address: Full address (dynamic field)".

  17. Save the flow.

  18. You can now test the button by using your smartphone. Open the app and select the Buttons option on the lower horizontal menu. Select the Notify Your Manager button. To add an image, select the paper clip icon and add an image by taking a new picture with your camera or by using an existing image from your photo library.

    Your manager will get an email with an image attached.