Lookup in flow does not work when incident gets updated through external emailaddress

AdamUMC
Tera Guru

Hi there,

I have flow with a lookup. The lookup is being executed as soon there is an incident that meets the following conditions:
1- State changes from "Resolved"

2- State changes to "In Progress"

The lookup is the first action within the incident table and looks for the incident with the SYS_ID from the trigger incident records. This lookup action works very well, but only in the following cases:
1- When the incident reopener is the Caller (who has it's own ServiceNow account)
2- When the incident reoper is a backend incident agent
3- When the incident reopener id someone else with an ServiceNow account sends an mail to the incident

In this cases the lookup does not work and the flow is showing an error:
1- When the incident reopener is someone else, using a general (non-personal e-mailaddress/mailbox), internal mailbox
2- When the incident reopener is someone else, using a general (non-personal e-mailaddress/mailbox), external mailbox
3- When the incident reopener is someone else, using a personal external mailbox

I tried several solutions:
1- Changed the order of the flow actions and the datapills I was using
2- Created a subflow that runs as "System User" (the main flow runs as "User who initiates session") and runs as soon the error occurs in my flow ("Error handler")
3- Changed my lookup action from "Look Up Record" to "Look Up Records" (with plural).

None of these solutions work. The plural action does not show any error, but the problem keeps happening.

Any idea how I can solve this? Thanks!

9 REPLIES 9

pr8172510
Tera Guru

Hey @AdamUMC ,

When an incident is updated via external email (no ServiceNow account), the flow runs as an anonymous user with no read access . The lookup fails because it can't "see" the incident record.

Run Flow as System User

  1. Open your Flow in Flow Designer

  2. Click Flow Properties (three dots menu)

  3. Change Run as from "User who initiates session" to System User 

  4. Save and Activate



Hi pr8172510,

Thank you for your reply. I'm already running a subflow as "System User", which should repeat the lookup as soon there is an error in the main flow. But unfortunately that does not work.

I'd rather not run the main flow as "System User", because the endresult will be: added additional comment and a new notification to the Caller because of this new additional comment.

When the additional comment is placed by the Caller himself, no notification is send. If I run the main flow as "System User", the additional comment is placed by this System User and the Caller will receive a senseless notification.

Ankur Bawiskar
Tera Patron

@AdamUMC 

share what error flow throws i.e. screenshots

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur Bawiskar,

Thank you for your reply. Hereby some flow errors:

AdamUMC_0-1779199920130.png

 

AdamUMC_1-1779199945207.png


Subflow has the same errors:

AdamUMC_2-1779199975666.png