cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Email attachment lookup causing workflow to suspend

Hi all,

I've got a workflow on a list, which triggers manually. The workflow has one action which emails a user withing the O365 tenant, with a quick message and the attachment that is on the list item. Here's my situation and issue:

  • I've got it configured properly, using External email land attachment service.
  • If I use a hard-coded, relative path the attachment sends correctly.
  • If I use Advanced Lookup, and find {Current Item:Attachments} the workflow is Suspended
  • If I attempt to display {Current Item:Attachements} in the body to trace the Attachments url, the workflow is Suspended.
  • The attachment (a PDF file) on this item is the same one that works when I use the hard coded relative path, but obviously I don't want this hard-coded so it will send the attachment from each list item it's run on.

Any thoughts on why it's suspending using the Lookup? I'm using the dropdowns to configure, so it is the correct item list column value.

Here's the suspended error in detail:

RequestorId: 00e500f9-86a7-0daf-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.InvalidOperationException: Values must be bound to a non-null expression before ForEach activity 'ForEach<DynamicValue>' can be used. at System.Activities.Statements.ForEach`1.Execute(NativeActivityContext context) at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) Exception from activity ForEach<DynamicValue> Process DynamicValue Get attachment file name from current list item Get attachments from current list item Switch<Int32> Current item is List or Library If If need to include current attachment or file If Process Attachments Process SendNotification InProgress StateMachine If SendNotification NintexActivities.WorkflowXaml_8e03d64c_49b1_4845_a435_94f748f07d04 Sequence Flowchart Test Attachment Email Notifications Workflow.WorkflowXaml_4bd94cd6_dfcb_47f0_8ae1_ca6cd64c35d3

Labels: (1)
0 Kudos
Reply
2 Replies
philipplucas
Nintex Newbie

Re: Email attachment lookup causing workflow to suspend

Hi Clayton,

in on-premise the "Attachments" property of the item only gives you a "true" or a "false" indicating if there are any files attached, but it doesn't give you the URL(s) to the items. Probably the same on O365.

If you are able to use web services in O365, this thread gives you a hint on how to get the attachment URL(s).

Regards

Philipp

0 Kudos
Reply
fccrous
Nintex Newbie

Re: Email attachment lookup causing workflow to suspend

Hi Clayton,

Is there a for each in your workflow?  From the error message it seems like the exception happens in the For Each action but on a variable that was send to the For each.

0 Kudos
Reply