Microsoft Power Automate | Como adicionar dados ao Excel, obter dados e enviar e-mail | Tutorial

3 min read 4 months ago
Published on Aug 12, 2024 This response is partially generated with the help of AI. It may contain inaccuracies.

Table of Contents

Introduction

This tutorial will guide you through the process of using Microsoft Power Automate to add data to Excel, retrieve data from Excel, and send emails based on specific conditions. This step-by-step approach will enhance your automation skills, enabling you to streamline data management and communication in your projects.

Step 1: Set Up Your Excel File

To begin, you need to prepare an Excel workbook where you will store your data.

  • Open Microsoft Excel and create a new workbook.
  • Create a table with the necessary columns for your data (e.g., Name, Email, Status).
  • Ensure that your table has headers for each column, as this will help Power Automate identify the data.

Step 2: Create a Power Automate Flow

Now, let's set up a flow in Power Automate to facilitate data entry and email notification.

  • Log in to Power Automate with your Microsoft account.
  • Click on "Create" in the left-hand menu.
  • Select "Automated cloud flow" to start a new flow.
  • Name your flow and select a trigger. For this tutorial, you can use “When a new response is submitted” if you are collecting data via a form.

Step 3: Add Input Form to Collect Data

You’ll need an input form to gather data which will be added to your Excel file.

  • Select “Microsoft Forms” as the connector.
  • Choose “Get response details” to retrieve the data submitted through the form.
  • Specify your form ID to connect to the form you created.

Step 4: Add Data to Excel

Next, you will add the collected data into your Excel table.

  • Click on “New step” and search for “Excel”.
  • Select “Add a row into a table”.
  • Choose your Excel file and the specific table you created.
  • Map the fields from your form responses to the corresponding columns in your Excel table.

Step 5: Retrieve Data from Excel

To perform actions based on the data in Excel, you will need to retrieve it.

  • Add another step and select “Excel”.
  • Choose “List rows present in a table”.
  • Select your Excel file and the table from which you want to retrieve data.

Step 6: Process Each Row of Data

Now, you can loop through each row of data retrieved from the Excel table.

  • Add a "Apply to each" control.
  • Set the output of the previous step (List rows) as the input for this control.
  • Inside this loop, you can perform actions based on the conditions you define.

Step 7: Set Up Conditions for Email Notification

You will now set conditions to determine when to send an email.

  • Within the "Apply to each" control, click on "Add an action".
  • Search for “Condition” and set up your criteria (e.g., if Status equals 'Pending').
  • In the "If yes" section, add an action to send an email.

Step 8: Configure Email Settings

Finalize the email settings to ensure the right information is sent.

  • Choose “Send an email (V2)” from the action list.
  • Fill in the “To” field with the email address from your Excel table.
  • Customize the subject and body of the email, including dynamic content from your Excel data.

Conclusion

You have successfully created a Power Automate flow that adds data to Excel, retrieves that data, processes it, and sends an email based on specific conditions. This automation can significantly improve efficiency in data management and communication.

Next steps may include exploring additional actions in Power Automate, such as integrating with other applications, or enhancing your flow with error handling and notifications for improved robustness.