You are viewing limited content. For full access, please sign in.

Question

Question

attaching multiple files to email in workflow

asked on June 16

Created a workflow for attaching multiple documents to an email in workflow.  The WF runs, and sends the email, however, it does not attach the expected files to the email.  What is incorrect in the workflow?  

testforPASC.png
testforPASC.png (45.76 KB)
0 0

Replies

replied on June 16 Show version history

Have you checked the results of the workflow? From the look of the Find Entry activities it seems like they are not getting valid Entry ID's and therefore won't find the document.

You're using %(Entry Name) and %(Date) tokens where you should be putting an Entry ID value. The %(Entry Name) is referencing the string name of the Starting Entry, which is very unlikely to be the ID value you are trying to get, and the Date definitely won't be a valid entry ID value.

I'm a bit confused by some of the activity configuration you have in there, so I'm not sure exactly what is supposed to be happening in the workflow. I don't see any way for your workflow to attach more than one document to the outgoing email.

For example, despite the parallel branches, there's no way the "first result name" could end with both 1 and 2, so there's no condition in which you would have more than one document to attach even if you get the correct Entry ID in each of the Find Entry activities.

0 0
replied on June 16

Ah, sorry... I see your confusion.  I started playing with different values for the Find Entry to see what I might be configuring incorrectly.  Sorry for the confusion... 

0 0
replied on June 16

It looks like you are using the solution from this post. If so, then you should be using a multi-value token to store each of the entry IDs. The following process should work and be less dependent on regular expressions.

  • Create multi-value token for "Entries"
  • For each entry
    • Route Entry
    • Append %(ForEachEntry_CurrentEntry_ID) to "Entries" token
  • Create/Assign "EntryCount" token with %(Entries#@Count@#), use Count or Integer tag
  • Parallel Branches
    • Branch 1
      • IF "EntryCount" token > 0
      • Find Entry by ID - %(Entries#[1]#)
    • Branch 2
      • IF "EntryCount" token > 1
      • Find Entry by ID - %(Entries#[2]#)
    • Branch 3
      • IF "EntryCount" token > 2
      • Find Entry by ID - %(Entries#[3]#)
    • etc.
0 0
replied on June 16

I will try this and update you with my results.  Thx :-)

0 0
replied on June 16

You should also probably remove the Parallel/Conditional Sequence combination and replace it with a "Conditional Parallel"

That will give the both functions in a single activity.

0 0
replied on June 16

Am I on the right track or have I gone off the rails...?

UPDATEtestforPASC.png
0 0
replied on June 16 Show version history

It looks like you're getting closer, but you need to make a couple of changes. First, you should be creating the multi-value token before the "for each entry" loop, then you append another value each time the loop completes.

Remember the for each entry is a loop, so you add the "current entry: entry id" with each iteration, you can't add them all at once like that. Also, unless I'm misunderstanding your goals, the Conditional Parallel needs to be outside of the for each entry loop, more like in the following image:

EDIT: Branch 3 should have %(Token 1#[3]#)

I'm still a bit confused why you are evaluating the name of the "For Each Entry: Current Entry" in your conditions.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.