Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

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.pngmark as solution button

Keep the questions coming