Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

NiFi - is it possible to send an email with attachment to a variable list of recipients?

avatar
Explorer

I have a business case where the user wants to send a personalized email to a group of recipients and attach a PDF to the email.

I already had a working flow for him that took the list of emails and recipient names in a csv file, parsed those out row-by-row, converted to json, evaluated the json to assign values to attributes, and then send the email (see image), but I'm having trouble with the attachment part since the PDF isn't part of the flowfile.

Is there a way to pull the PDF into NiFi and assign the attributes needed from perhaps a map file or something? or replace the flowfile with the PDF and maintain the attributes? Once the attributes are assigned, I don't need the .csv data anymore.

Any help would be appreciated!

72882-screen-shot-2018-05-16-at-50131-pm.png

1 ACCEPTED SOLUTION

avatar
Master Guru
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
3 REPLIES 3

avatar
Master Guru
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Explorer

Thank you! I knew there had to be simple answer - I used the first method and it worked great! Thanks again for your help.

avatar
Explorer

@Shu_ashu  How to configure the flow if  EvaluateJsonPath Processor flow have recipient mail id and FetchFile has the file path. I have configured as below but two mails are getting triggered. Could you help to modify the flow so that only one mail with attachment will trigger ? 

Aaki_08_0-1613109355117.png

 

Aaki_08_1-1613109616577.png