Exercise - Create a flow for sending emails when a new item is created in Power Automate

Completed

This exercise is written to use the Cronus sample company from the US version of Business Central. You might need to make adjustments to the steps if you use the sample company from your country or region.

Scenario

You are the Sales Manager at CRONUS. You want to improve the information workflow about new items created in Dynamics 365 Business Central. You want to get a notification, every time someone at CROUNS creates a new item with FURNITURE as the item category code.

Since you want to be notified by email and you are not a developer, you decide to make this automation with a flow in Power Automate.

Tasks

  1. Start Power Automate.

  2. Create the trigger based on Business Central data.

  3. Collect data from Business Central.

  4. Make the condition.

  5. Create an action based on the condition.

  6. Save the flow.

Steps

  1. Start Power Automate.

    1. Open Power Automate in your browser.

    2. Click +Create in the left menu.

    3. Select the Automated flow tile.

  2. Create the trigger based on Business Central data.

    1. In the Flow name box, enter Email notification for new furniture.

    2. In the Choose your flow's trigger enter business central.

    3. Scroll down and view the triggers and select the When a record is created (Business Central) trigger.

    4. Select the Create button.

    5. Enter the following information about the trigger.

      1. In the Environment name box, enter PRODUCTION.

      2. In the Company name box, select the CRONUS company from the list.

      3. In the Table name box, select items.

    6. Select +New step.

  3. Collect data from Business Central.

    1. In the Choose an action window, in the Search connectors and actions box, type business central.

    2. Select the Business Central connection. Select the Get record (Business Central) action.

    3. In the Environment name box, enter PRODUCTION.

    4. In the Company name box, select the CRONUS company from the list.

    5. In the Table name box, select items.

    6. In the Row id box, select the Row Id token from Dynamic content.

  4. Make the condition.

    1. In the Choose an action window, select Control.

    2. Select the Condition action.

    3. In the first Choose a value box, select the itemCategoryCode token from Dynamic content.

    4. Keep the is equal to option.

    5. In the second Choose a value box, enter a value of FURNITURE.

  5. Create an action based on the condition.

    1. In the left condition window If yes (with green bar), select Add an action.

    2. In the Choose an action window, in the Search connectors and actions box, type office 365 outlook.

    3. Select the Office 365 Outlook connection.

    4. Select the Send an email action.

    5. In the To box, enter your email address.

    6. In the Subject box, enter New furniture released.

    7. In the Body box, enter the following:

      1. Add the text New furniture.

      2. Add the token Number from Dynamic content.

      3. Add the text -.

      4. Add the token displayName from Dynamic content.

      5. Add the text with the unit price.

      6. Add the token unitPrice from Dynamic content.

      7. Add the text has just released.

  6. Save the flow.

    1. Select the Save command.