Passing record attachments through to email alerts as variables using lightning flow - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Sam RileySam Riley 

Passing record attachments through to email alerts as variables using lightning flow


I have really got behind using Lightning Flow since it's release, it's fantastic.
However, i have been trying to solve how to do this for my email alerts and it's proving rather difficult. 

I have created a flow to send booking confirmations out to customers, this allows our bookings team to fill out various pieces of information on screens, taking them through the confirmation process ensuring all of the fields needed are filled out. These are then passed to the correct email alert and corresponding template to that booking. 

What i have been asked to do is allow for the bookings team to add attachments (i.e confirmation documentation they get from our suppliers such as hotels). Again lightning flow accomodates this with the file upload function. The difficulty i am having is passing these attachments onto the email alert. The attachments are specific to that particular booking so i cannot just add attachments to the alert itself as they are subject to change. 

Is there a clever way i can pass the variable created from my lightning upload function onto the email alert / email template? It's the last missing piece to my confirmation flow. I've looked around for answers and the best workaround i have seen so far is using a URL link to allow access to the files but i'd rather just have them as attachments if possible. Maybe something involving passing a URL variable onto the email alert could work?
Jayson MoralesJayson Morales
Hi Sam,

Sorry for the inconvenience. In case you don't receive a response here, may I also suggest joining the Salesforce Automation group below to collaborate with the experts for best practice and advice.

Hope this helps.

Arseniy ChuprunArseniy Chuprun
Hey Sam,

I'm curious if you ever found a solution to your problem as I'm going through the same thing right now. Let me know, thanks!