How to check attachments in flow designer

chanikya
Kilo Sage

Hi All,

Version : PARIS PATCH10

How to check replied email has attachments Or Not in Flow designer.

find_real_file.png

 

@Ankur @Harshavardhan @Ankur Bawiskar @Anil Lande @Chuck Tomasi @Jaspal Singh @Rohila Voona 

@Michael Jones - CloudPires @Kieran Anson @Brad Bowman 
1 ACCEPTED SOLUTION

As an alternative, this could also be done with the help of an Action that can be used elsewhere too. I created a new Action, called it "Get Records Count"

Have defined a single input:

find_real_file.png

Next I have added a Script step that also has an input that looks the same as the Action input:

find_real_file.png

The code is pretty str8 fwd:

(function execute(inputs, outputs) {
  if (inputs.records && inputs.records.isValidRecord)
    outputs.count = inputs.records.getRowCount();
  else
    outputs.count = 0;
})(inputs, outputs);

And - of course - as visible in the picture, the Script Step also has an output, I named it count.

Finally the Action itself also has an output, again named the same as the Script step output:

find_real_file.png

And I have configured the Action to use the Script step's output as the Action's output value:

find_real_file.png

Once this is done and activated, I can use it as below:

find_real_file.pngOf course this will result in the Count data pill that I can use to check whether any attachments have been received:

find_real_file.png

View solution in original post

42 REPLIES 42

Hi Janos,

Really Thank you !. I m trying to solve this from last two days.

finally you give me solution. let me apply and do some tests and i will let you the result. . 

i hope definitely  this will work like charm !. 

script working successfully, but getting Error like "Value of field record is not a GlideRecord"

find_real_file.png 

You need to look up the record first, as even though the name of the data pill is "Record", in reality it is not a GlideRecord - just as the error states. The log also shows it to be a document_id. But you can use Record and Table as the sys_id and table name in the lookup activity.

Hi Janos,

What are the things i need to modify here

find_real_file.png

 

2nd screenshot

find_real_file.png

 

 

 

You need to place a Look up Records activity in front of the Update Case Record one.

You need to add a loop (forEach) after the Look up Records activity.

You need to move the Update Record activity inside the loop (forEach) and make it update the currently looped record.

Turn the Update Case Record activity into something like this:

find_real_file.png

I use task, cause I have no Case table in my PDI.