Blue prism copy excel file into mail
A specific question!
To copy an Excel file into an email using Blue Prism, you can use the following steps:
Prerequisites:
- You have a Blue Prism process with an Excel connector installed.
- You have an email connector installed (e.g., SMTP or Office 365).
- You have an Excel file saved on your system or a network location.
Step-by-Step Instructions:
- Create a new process or open an existing one.
- Drag and drop an "Excel" activity from the "Connectors" panel to the process flow.
- Configure the Excel activity to read the Excel file you want to copy. You can do this by:
- Specifying the file path and name.
- Setting the "File Type" to "Excel" (.xlsx,.xls, etc.).
- Optionally, specifying a sheet name or range to read.
- Drag and drop an "Email" activity from the "Connectors" panel to the process flow, below the Excel activity.
- Configure the Email activity to send an email with the Excel file attached. You can do this by:
- Specifying the email recipient(s).
- Setting the email subject and body.
- Adding the Excel file as an attachment using the "Add Attachment" option.
- Use the "Copy" activity to copy the Excel file from the Excel activity to the Email activity. You can do this by:
- Dragging a "Copy" activity from the "Utilities" panel to the process flow.
- Setting the "Source" to the Excel activity's output (e.g., "Excel File").
- Setting the "Destination" to the Email activity's attachment (e.g., "Email Attachment").
- Run the process to execute the activities.
Example Code:
Here's an example code snippet to illustrate the process:
<process name="Copy Excel File to Email">
<activities>
<activity type="Excel" name="Read Excel File">
<properties>
<property name="FilePath" value="C:\Path\To\ExcelFile.xlsx" />
<property name="FileType" value="Excel" />
</properties>
</activity>
<activity type="Email" name="Send Email">
<properties>
<property name="Recipient" value="[email protected]" />
<property name="Subject" value="Excel File Attachment" />
<property name="Body" value="This is an email with an Excel file attachment." />
</properties>
</activity>
<activity type="Copy" name="Copy Excel File">
<properties>
<property name="Source" value="Read Excel File" />
<property name="Destination" value="Send Email" />
</properties>
</activity>
</activities>
</process>
This code snippet assumes you have an Excel file named "ExcelFile.xlsx" located at "C:\Path\To\ExcelFile.xlsx". The email will be sent to "[email protected]" with the subject "Excel File Attachment" and body "This is an email with an Excel file attachment." The Excel file will be attached to the email.