Hello I need your help,
I’m trying to create an automation that sends an email via Gmail but place 2 pieces of data that are inside an excel.
How can I do so that in the body of the message these 2 data that are taken directly from the excel are added?
I already have a read range with the excel file and I am using (Use Gmail + Send Email).
Read the data from the excel & keep the data table ready. Prepare a html tabular string by infusing dynamic data from the data table in it. Please go through the following resource to know more on this:
Hope this helps,
To add data from an Excel file to the body of an email using UiPath and send it via Gmail, you can follow these steps:
- Use the “Excel Application Scope” activity to open the Excel file.
- Use the “Read Range” activity to read the data from the Excel file and store it in a DataTable variable.
- Create a string variable to hold the message body.
- Use a loop (e.g., “For Each Row” activity) to iterate through the rows of the DataTable.
- Inside the loop, access the values from the desired columns of each row and append them to the message body variable.
- Use the “Send Outlook Mail Message” or “Send SMTP Mail Message” activity to send the email via Gmail, depending on your specific requirements.