I have a common workflow to send notification email… Which i will invoke in different places in project.
Only in few places , it will required to send attachments.
I have added attachment argument and In exchange activity properties in attachments field the argument in placed
Since attachment won’t be required or available for some places in workflow…
I can’t provide any value for in_attachment argument.
How do i keep use same “Send notification.xaml” for both attachment and without attachment?
Here is the workflow:
In Send Notification workflow, use IF activity and check whether attachment has any value or not. If yes then pass attachment argument value to Send Exchange Mail Message activity else not. It should be something like this.
IF Not String.IsNullOrEmpty(in_Attachment.Trim)
Then Send mail with attachment
Else Send mail without attachment
Use IF or flow switch condition.
Just use two send exchange mail activity. One is with attachment and other is without attachment.
Based on condition bot will execute the expected activity.
Main.xaml (8.8 KB)
define attachmentList variable
if not string.IsNullOrEmpty(in_Attachment)
assign attachmentList = in_Attachment.Split(","c).ToList
pass attachment list to send outlook mail message attachmentsCollection property
Use Attachments collection please…
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.