Support Questions
Find answers, ask questions, and share your expertise

How to read an email attribute using Apache Nifi and insert into file?



  • I desinged the flow according to this link(
  • Using this flow i got all the attribute in file and its working perfectly.

Consume Imap processors --> ExtractEmailHeader Processor --> Putfile Processor.

  • But i want to sort the specific attribute from the flow file for this when i m setting the attribute value in replaceText processor that time getting the attribute value.

email.headers.sent_date :${email.headers.sent_date}

email.headers.subject :${email.headers.subject}

email.attachment_count :${email.attachment_count}

  • how i will get(set) the value of that type of variable using expression language in Apache NIFI

email.headers.bcc.* Each individual BCC recipient (if available)* Each individual CC recipient (if available)

email.headers.from.* Each individual mailbox contained in the From of the Email (array as per RFC-2822)

  • My designed flow

Consume Imap processors --> ExtractEmailHeader Processor --> replaceText processor --> Putfile Processor.

Thanks in advance