Lookup in flow does not work when incident gets updated through external emailaddress
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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
Open your Flow in Flow Designer
Click Flow Properties (three dots menu)
Change Run as from "User who initiates session" to System User
Save and Activate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
share what error flow throws i.e. screenshots
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Ankur Bawiskar,
Thank you for your reply. Hereby some flow errors:
Subflow has the same errors: