- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2021 08:04 AM
Hi All,
Version : PARIS PATCH10
How to check replied email has attachments Or Not in Flow designer.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2021 01:06 PM
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:
Next I have added a Script step that also has an input that looks the same as the Action input:
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:
And I have configured the Action to use the Script step's output as the Action's output value:
Once this is done and activated, I can use it as below:
Of course this will result in the Count data pill that I can use to check whether any attachments have been received:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2021 01:48 AM
The below article may help you.
https://community.servicenow.com/community?id=community_article&sys_id=9ed305e2db63fb845129a851ca9619f7
Thanks,
Vijaykumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2021 04:32 PM
So a couple if things to consider:
- remember inbound e-mail flows always run in the context of the identified user; that means if a user does not have rights to update something and the flow tries to update that thing, the flow will fail
- as far as I know if the e-mail's receive type is new, no new records will be automatically created, the flow has to do it itself.
Keeping that in mind, I have created a test flow as below and it works; the table I'm using is not the Case table, but the Ticket one, but things should work the same for Case too:
However notice that the receive type is reply, not new. Also while not visible, the Updates only change the Additional comments to which any user has write access.
For updating the Assignment group I added a call to sub-flow "CX | Update ticket" which is configured to be running with system user.
What I'm trying to say is that if you want this to work for when the e-mail reply is new, you need to move stuff into a sub-flow marked to run as system, create a new record and everything else in there. Or make sure the flow is not run if the user does not have consumer or customer roles. Otherwise creating a new case will fail, at least if security settings are the OOB ones.
I have also done a version of the flow that works on the Case table and where the e-mail receive type is new:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2021 09:55 PM
Janos Proposed 2-solution on this.
Solution 1: script
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:
Next I have added a Script step that also has an input that looks the same as the Action input:
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:
And I have configured the Action to use the Script step's output as the Action's output value:
Once this is done and activated, I can use it as below:
Of course this will result in the Count data pill that I can use to check whether any attachments have been received:
Solution 2 : Add " Look up records"
Result Of Solution 2
same way if we go with solution one just Need to replace of "Look up records" with Script Event