How to Attach Multiple Files to the Mail?
To attach multiple files to an email in AutomationEdge Process Studio, the method depends on whether you are working inside a Workflow (.psw) or a Process (.psp):
1. In a Workflow (.psw) using the Mail Step
The Mail step (found under the Utility plugin) allows you to attach multiple physical files dynamically from a folder or data stream:
- Open the Mail step configuration dialog.
- Navigate to the EMail Message / Attached filenames section.
- Attach Multiple Files from a Folder:
- Enable the Dynamic filenames? checkbox.
- In the Filename field, select the stream field containing the parent folder directory path (e.g., C:\Reports).
- In the Wildcard field, select a stream field containing a Regular Expression (Regex) to match multiple files.
- Example Regex: .* (attaches all files in the folder) or .*.pdf (attaches all PDF files in the folder).
- Compress Multiple Attachments into a ZIP File (Optional):
- Enable the Zip files option.
- Instead of sending multiple separate attachments, the step compresses all matched files into a single .zip archive before sending.
2. In a Process (.psp) using the Mail Process Entry
The Mail process entry (found under the Mail plugin) automatically sends files created by preceding workflow steps that were added to the internal result files list:
- Add Files to Result Set in Upstream Workflows:
- In your preceding data output steps (such as Microsoft Excel Output, Text file output, etc.), make sure the Add filenames to result checkbox is enabled.
- Configure the Mail Process Entry:
- Open the Mail process entry settings and go to the Attached Files tab.
- Check the Attach file(s) to message? checkbox.
- Under Select file type, highlight General (or select log file types like
Log,Error, etc., if attaching workflow execution logs).
- Compress Multiple Attachments into a ZIP File (Optional):
- Check Zip files to single archive?.
- Provide a name in the Name of the zip archive field (e.g., Reports.zip) to combine all result files into a single compressed archive