How to automate mail from excel uipath

To automate sending emails from Excel using UiPath, you can follow these steps:

Prerequisites:

  1. Install UiPath Studio and create a new project.
  2. Install the "Excel" and "Email" activities from the UiPath Activity Library.
  3. Make sure you have an Excel file with the data you want to send as an email attachment.

Step 1: Connect to Excel

  1. Create a new sequence in UiPath Studio.
  2. Drag and drop the "Excel" activity from the Activity Library to the sequence.
  3. Configure the Excel activity to connect to your Excel file. You can do this by specifying the file path, sheet name, and range of cells.

Step 2: Extract data from Excel

  1. Drag and drop the "Read Range" activity from the Excel activity group to the sequence.
  2. Configure the Read Range activity to extract the data you want to send as an email attachment. For example, you can extract a range of cells containing customer names and addresses.

Step 3: Create an email

  1. Drag and drop the "Create Email" activity from the Email activity group to the sequence.
  2. Configure the Create Email activity to create a new email with the subject, body, and attachment. You can use the extracted data from Excel to populate the email fields.

Step 4: Send the email

  1. Drag and drop the "Send Email" activity from the Email activity group to the sequence.
  2. Configure the Send Email activity to send the email using your email account credentials.

Example Code:

<Sequence>
  <Activities>
    <Excel>
      <ReadRange>
        <FilePath>C:\Path\To\Your\Excel\File.xlsx</FilePath>
        <SheetName>Sheet1</SheetName>
        <Range>A1:B10</Range>
      </ReadRange>
    </Excel>
    <CreateEmail>
      <Subject>Automated Email from Excel</Subject>
      <Body>Dear {Name},</Body>
      <Attachment>
        <FilePath>C:\Path\To\Your\Excel\File.xlsx</FilePath>
        <FileName>CustomerData.xlsx</FileName>
      </Attachment>
    </CreateEmail>
    <SendEmail>
      <From>[email protected]</From>
      <To>[email protected]</To>
      <Subject>Automated Email from Excel</Subject>
      <Body>Dear {Name},</Body>
    </SendEmail>
  </Activities>
</Sequence>

Tips and Variations:

By following these steps and using the example code, you should be able to automate sending emails from Excel using UiPath.