Flow Designer inbound action triggers not working when email is sent from external Email ID

Rajarshi1
Tera Expert

Hi,

 

I have created flows with trigger type as Inbound Email. When email is being triggered from my mailbox or any user's mailbox whose user account is available in ServiceNow User table it is working perfectly fine. However, when the email is being sent from an external email address the flow is not being triggered and I have to manually trigger it even if it matches the condition mentioned in the trigger condition. Can anyone suggest why am I observing like this, am I missing something here?

5 REPLIES 5

YogB
Tera Expert

Hi to let the inbound emails to be triggered for unregistered users there are quite some risks as defined in this discussion. https://www.servicenow.com/community/now-platform-forum/inbound-email-flow-replies-with-unregistered...

 

You can use the business rule on the sys_email table to trigger the flow. You can use the following script to trigger the inbound flow.

 
(function() {
try {
var inputs = {};
inputs['body_text'] = ; // String (Full UTF-8) 
inputs['target_table_name'] = 'Table Name';
inputs['subject'] = ; // String (Full UTF-8) 
inputs['inbound_email'] = ; // GlideRecord of table: sys_email 
inputs['user'] = ; // GlideRecord of table: sys_user 
inputs['from_address'] = ; // String (Full UTF-8) 
inputs['target_record'] = ; // GlideRecord of table:  
// Start Asynchronously: Uncomment to run in background.
// sn_fd.FlowAPI.getRunner().flow('flow name').inBackground().withInputs(inputs).run();
// Execute Synchronously: Run in foreground.
sn_fd.FlowAPI.getRunner().flow('flow_name').inForeground().withInputs(inputs).run();
} catch (ex) {
var message = ex.getMessage();
gs.error(message);
}
})();
 
Mark as helpful if this solution helps

 

Hi,

 

Thanks for your response. However, I have multiple external email addresses from where email is coming to the ServiceNow instance.

YogB
Tera Expert

Ok, so is the flow triggering for those if not you can add conditions in business rule to decide when should the flow be triggered based on the conditions to run flow only when required

The flow needs to be triggered every time when am receiving email matching the subject line. It is working for internal users but not for external users. Now external users count can vary and it is huge.