This section describes how to read a book that contains one line of destination e-mail addresses and send e-mail one line at a time.
In addition to the items shown in the example, CC, BCC, and attachments can also be specified.
Overall view of Flow
Robin(for copy and paste)
It can be copied and pasted into Power Automate Desktop.
Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''C:\\Test\\Src.xlsx''' Visible: False ReadOnly: True Instance=> ExcelInstance Excel.SetActiveWorksheet.ActivateWorksheetByName Instance: ExcelInstance Name: $'''Sheet1''' Excel.GetFirstFreeColumnRow Instance: ExcelInstance FirstFreeColumn=> FirstFreeColumn FirstFreeRow=> FirstFreeRow LOOP LoopIndex FROM 2 TO FirstFreeRow - 1 STEP 1 Excel.ReadFromExcel.ReadCell Instance: ExcelInstance StartColumn: 1 StartRow: LoopIndex ReadAsText: False CellValue=> MailAddress Excel.ReadFromExcel.ReadCell Instance: ExcelInstance StartColumn: 2 StartRow: LoopIndex ReadAsText: False CellValue=> Name Excel.ReadFromExcel.ReadCell Instance: ExcelInstance StartColumn: 3 StartRow: LoopIndex ReadAsText: False CellValue=> Title Email.SendEmail.Send SMTPServer: `` Port: 25 EnableSSL: False AcceptUntrustedCertificates: False SendFrom: `` SendTo: `` Body: $'''''' IsBodyHtml: False END Excel.CloseExcel.Close Instance: ExcelInstance
Flow creation steps
First, set up Launch Excel Action and specify the Excel book to open. If you have no particular need to update the book, open it as read-only.
|Launch Excel||an open the following document|
|Document path||Excel book to load.|
|Make instance visible||OFF|
|Open as ReadOnly||ON|
Specify the sheet containing the email recipients in the Set active Excel worksheet Action section.
|Activate worksheet with||Name|
|Worksheet name||The name of the sheet with the email address.|
Next, set up Get first free column/row from Excel worksheet Action.
Set up a Loop.
If the first line is not a header, set to 1.
|End to||%FirstFreeRow - 1%|
|Start column||Column number to be retrieved.|
|Variables produced||Item name|
Set up an action to send an email in Loop.
If you are sending the message using an e-mail address registered in Outlook, use Send email message through Outlook, Otherwise, use Send email Action.
If you are sending from Gmail, you need to set up the Google side in advance.
If there is a line break in the cell used for the body of the message, it will also be reflected as a line break in the body of the message.
In the case of HTML mail, the tag must be a
Finally, close the Excel book by placing Close Excel Action to finish.
For those who want to learn Power Automate Desktop effectively
The information on this site is now available in an easy-to-read e-book format.
Or Kindle Unlimited (unlimited reading).
You willl discover how to about basic operations.
By the end of this book, you will be equipped with the knowledge you need to use Power Automate Desktop to streamline your workflow.