Support Questions

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

NiFi - How to put Flowfile Content into PutEmail message body

avatar
Explorer

I have a line by line list in my flowfile, which records the result of some file processing, somthing like the following;

 

C:\Data\client1\order100.txt - SUCCESS

C:\Data\client1\order122.txt - ERROR

C:\Data\client1\order323.txt - SUCCESS

 

I can't see a way to add this flowfile content to the e-mail MessageBody.

 

I have therefore tried an ExtractText processor with message.body as an attribute and (.*) as the regex. This gets me close, but all the filenames are on the same line, so I end up with this;

 

C:\Data\client1\order100.txt - SUCCESS C:\Data\client1\order122.txt - ERROR C:\Data\client1\order323.txt - SUCCESS

 

Which is not quite the e-mail I'm looking for. Any sensible suggestions welcome.

 

 

 

1 ACCEPTED SOLUTION

avatar
Explorer

Actually I just put it into the mail as it was.

 

Then when the mail arrives, all the newlines are there..!

 

Its just that the attribute doesn't render the newlines...

 

Problem solved.

View solution in original post

2 REPLIES 2

avatar
Explorer

Actually I just put it into the mail as it was.

 

Then when the mail arrives, all the newlines are there..!

 

Its just that the attribute doesn't render the newlines...

 

Problem solved.

avatar
Community Manager

I'm happy to see you resolved your issue. Please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. 

 

Screen Shot 2019-08-06 at 1.54.47 PM.png


Cy Jervis, Manager, Community Program
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.