Attach Email in Flow Designer

Rafael Batistot
Tera Sage

Hi Team

I have a process in Flow designer that is possible to create a incident when sent a email, called email to ticket. 

My doubt here is, if possible to attach this email, sent to create a ticket, in the ticker created? 

It's like, i sent the email, by outlook, the incident is create but, with the email already sent attached in the incident

Thank's advanced

4 REPLIES 4

Dr Atul G- LNG
Tera Patron
Tera Patron

Yes @Rafael Batistot 

possible. 

 

https://www.servicenow.com/community/developer-forum/attach-email-attachment-to-incident/m-p/2676027

 

https://www.servicenow.com/community/itom-forum/using-flow-designer-add-attachment-to-send-email-act...

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Rafael Batistot
Tera Sage

Hi Thank you for your answer, but both case they explain how can i insert attachments from the sys_attachement table or other files

i need to insert my own mail sent. Can be like .txt or .pdf. but  i need all the content


Ankur Bawiskar
Tera Patron
Tera Patron

@Rafael Batistot 

It can be done if you are using inbound email action

for flow check this link

Flow Designer for Inbound emails with multiple attachments. 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Mohan raj
Mega Sage

Hi @Rafael Batistot,

 

Yes, possible to attach the sent email to the ticket which you have created via inbound email action. 

 

To achieve this you need leverage the OOB script include to attach the sent email to the record created via inbound email. Try below code to attach the email to record.

 

var emailGr = new GlideRecord('sys_email');
emailGr.addEncodedQuery('<query to filter those emails');
emailGr.query();

var emailAsAttachment = new global.emailAsAttachmentUtil();
emailAsAttachment.createAttachment(emailGr, current);  //passing email record and current record to attach the email

 

To get more information check out the below link 

Blog: https://www.servicenow.com/community/developer-blog/save-email-text-as-attachment/ba-p/2274550#:~:te....

 

If my response helps you, please mark it as "Accept Solution" or hit the thumbs up to indicate it was helpful.