Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Creating incidents in ServiceNow using Shared Mailboxes and MS Flow with attachments

Hi all - in case anyone is attempting something similar, wanted to give a quick overview of something we've just prototyped, including the bugs/quirks we ran into.   Note: Some SN jargon included here but its basic SN stuff.


Requirements - be able to generate incidents in ServiceNow via email.

  • Short Description = Subject
  • Description = Body
  • Include Attachments
  • Assign to group based on mailbox

Quirks/Bugs - 

  • MS Flow - [Attachment Content] is in base64 so this needs to be converted to Binary to make the attachment usable.  We used "@{base64ToBinary(items('Apply_to_each')?['ContentBytes'])}" - This was by far the most time consuming part for us to troubleshoot and find a remedy.
  • In ServiceNow you have to create the incident then add attachments.  Not super difficult but it requires two API calls and you have to return the sys_id from the creation of the incident.
  • MS Flow - we originally built the process from scratch instead of a template, but the attachment content kept coming back blank.  After a little research we figured out it some sort of Flow bug, but starting with the shared email to sharepoint template fixed it.
  • MS Flow - the body of the email has <html>, we stripped that with the "HTML to Text" action


Overview - 


Detail of Second API Call for attachment

HTTP - Contents.PNG

Helpful resources


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,779)