- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
NiFi - How to put Flowfile Content into PutEmail message body
- Labels:
-
Apache NiFi
Created 07-09-2020 06:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created 07-09-2020 10:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created 07-09-2020 10:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created 07-13-2020 01:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
