Using Create Event to send Notification from Workflow with Attachment

Steven Parker
Giga Sage

So this is my Create Event in the workflow (the "event name" and email notification are each on the SC_TASK table)

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

So it sends the notification, but doesn't include the PDF attachment on the email...I thought that "Include Attachments" check box would attach the file to the email it sends.  I've even placed the PDF file on the "Create Event" in the workflow, the event itself in the registry, and on the notification, but the attachment just doesn't attach to the email.

How do I get that PDF file to attach to the email? Not a link...just actually attached to the email. 


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
21 REPLIES 21

Well I had my workflow already as a work in progress...so then I did the following:

- Created a registry event..see screenshot above

- Created a Notification that kicks off when that registry event above is fired.  The notification is on the Knowledge table:

find_real_file.png

On the "What it will contain" tab, I used an email template I created for Corporate Credit Card request(also on the kb_knowledge table), but you don't HAVE to do that.  

 

- Then, I created a Knowledge article containing the PDF I wanted to send by email.  I don't have it in my system anymore so I can't send screenshots of it.

- Now, in the workflow, create the Run Script to fire the event based on the Knowledge article.  So Gliderecord to the Knowledge article and then fire your event off of that.  requested_for is who we were sending the email too:

 

find_real_file.png


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven

 gr.addEncodedQuery("workflow_state=draft^short_description= should this be my workflow name?")

This is my run script.  It didn't send the email to the manager.  It just 

Steven,

 

I got it to work.  Thanks for you help on this.

 

John

Glad to hear that!  Kind of crazy what you have to go through to get this to work isn't it?  If you have time, submit an enhancement request in the ServiceNow HI Portal to have this resolved.  You should be able to just attach a PDF to a notification and it send out every single time the email notification goes out.

 

Feel free to mark any (or all) of these responses helpful.


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven