Using Flow Designer, add attachment to Send Email Action

Daniel O_Connor
Kilo Guru

Hi all,

I've created a Custom App using Studio, whereby we will receive Weather Warnings from a National Weather provider, and then forward this e-mail onto relevant parties. 

I created an extension of TASK so we can have a record of these weather alerts. The e-mail that we will receive, will contain a PDF attachment, that is the details of the warning.

Through my inbound action, I'm creating a record on my new table, where the PDF will be attached to the ticket.

Through Flow (new module, not legacy workflow) I've been able to spin my flow up pretty quickly. However I see no option to include the attachment from the record, onto the e-mail I'm sending out.

find_real_file.png

Any ideas how I can accomplish this?

  • With Send Email action in Flow Designer, have the attachment from the record included in the generated email 
1 ACCEPTED SOLUTION

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

Hi Daniel,

 

Bad news is that I don't think there is a OOB functionality for this. Good news are that it's very easy to solve with a custom action. Basically you create you own "copy attachment" action and then you can use that action to copy the attachment from the task record to the email-record that is used to send the email.

 

I made a quick video here for you to see what I'm talking about:

View solution in original post

27 REPLIES 27

CecileC
Tera Contributor

This helped me a lot (tokyo version, copy attachement is already in the proposed actions)

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0813220

 

 

@CecileCThis looks promising, but incomplete.  Were you able to get it to work?  If you were, could you elaborate on these steps?

 

-First it requires to look up the attachments from the triggered record id

       - How do you do this?  I create a lookup on the sc_task record that holds the attachment, but there are no     data pills for the attachment.


-Then we need to look up the record with lookup attachment sys_id from the sys_attachment table

      - How do I get a data pill with the attachment sys_id?


-Now we need to configure copy attachment action with source record as 'attachment record' from look up record action

     - How do I get a data pill with the attachment sys_id?

 

 

Thanks!

ChrisSanc
Tera Expert

Hi everyone,

If you simply want to attach a file present in a record (incident, SC Task, etc.) to an email, there is another, simpler and completely OOTB-friendly method based on notifications.

1. Create a record in the Notifications table (sysevent_email_action)
2. Select the table
3. Select "Send when" = Triggered
4. Check the "Include attachments" box

ChrisSanc_0-1742373561235.png

 


5. In the Flow, create a "Send Notification" action linked to your record and this notification

ChrisSanc_1-1742373687492.png

 

The file will be included as an attachment in your received email.

 

Regards