-
Processors
- AttributeRollingWindow
- AttributesToCSV
- AttributesToJSON
- CalculateRecordStats
- CaptureChangeMySQL
- CompressContent
- ConnectWebSocket
- ConsumeAMQP
- ConsumeAzureEventHub
- ConsumeElasticsearch
- ConsumeGCPubSub
- ConsumeIMAP
- ConsumeJMS
- ConsumeKafka
- ConsumeKinesisStream
- ConsumeMQTT
- ConsumePOP3
- ConsumeSlack
- ConsumeTwitter
- ConsumeWindowsEventLog
- ControlRate
- ConvertCharacterSet
- ConvertRecord
- CopyAzureBlobStorage_v12
- CopyS3Object
- CountText
- CryptographicHashContent
- DebugFlow
- DecryptContentAge
- DecryptContentPGP
- DeduplicateRecord
- DeleteAzureBlobStorage_v12
- DeleteAzureDataLakeStorage
- DeleteByQueryElasticsearch
- DeleteDynamoDB
- DeleteFile
- DeleteGCSObject
- DeleteGridFS
- DeleteMongo
- DeleteS3Object
- DeleteSFTP
- DeleteSQS
- DetectDuplicate
- DistributeLoad
- DuplicateFlowFile
- EncodeContent
- EncryptContentAge
- EncryptContentPGP
- EnforceOrder
- EvaluateJsonPath
- EvaluateXPath
- EvaluateXQuery
- ExecuteGroovyScript
- ExecuteProcess
- ExecuteScript
- ExecuteSQL
- ExecuteSQLRecord
- ExecuteStreamCommand
- ExtractAvroMetadata
- ExtractEmailAttachments
- ExtractEmailHeaders
- ExtractGrok
- ExtractHL7Attributes
- ExtractRecordSchema
- ExtractText
- FetchAzureBlobStorage_v12
- FetchAzureDataLakeStorage
- FetchBoxFile
- FetchDistributedMapCache
- FetchDropbox
- FetchFile
- FetchFTP
- FetchGCSObject
- FetchGoogleDrive
- FetchGridFS
- FetchS3Object
- FetchSFTP
- FetchSmb
- FilterAttribute
- FlattenJson
- ForkEnrichment
- ForkRecord
- GenerateFlowFile
- GenerateRecord
- GenerateTableFetch
- GeoEnrichIP
- GeoEnrichIPRecord
- GeohashRecord
- GetAsanaObject
- GetAwsPollyJobStatus
- GetAwsTextractJobStatus
- GetAwsTranscribeJobStatus
- GetAwsTranslateJobStatus
- GetAzureEventHub
- GetAzureQueueStorage_v12
- GetDynamoDB
- GetElasticsearch
- GetFile
- GetFileResource
- GetFTP
- GetGcpVisionAnnotateFilesOperationStatus
- GetGcpVisionAnnotateImagesOperationStatus
- GetHubSpot
- GetMongo
- GetMongoRecord
- GetS3ObjectMetadata
- GetSFTP
- GetShopify
- GetSmbFile
- GetSNMP
- GetSplunk
- GetSQS
- GetWorkdayReport
- GetZendesk
- HandleHttpRequest
- HandleHttpResponse
- IdentifyMimeType
- InvokeHTTP
- InvokeScriptedProcessor
- ISPEnrichIP
- JoinEnrichment
- JoltTransformJSON
- JoltTransformRecord
- JSLTTransformJSON
- JsonQueryElasticsearch
- ListAzureBlobStorage_v12
- ListAzureDataLakeStorage
- ListBoxFile
- ListDatabaseTables
- ListDropbox
- ListenFTP
- ListenHTTP
- ListenOTLP
- ListenSlack
- ListenSyslog
- ListenTCP
- ListenTrapSNMP
- ListenUDP
- ListenUDPRecord
- ListenWebSocket
- ListFile
- ListFTP
- ListGCSBucket
- ListGoogleDrive
- ListS3
- ListSFTP
- ListSmb
- LogAttribute
- LogMessage
- LookupAttribute
- LookupRecord
- MergeContent
- MergeRecord
- ModifyBytes
- ModifyCompression
- MonitorActivity
- MoveAzureDataLakeStorage
- Notify
- PackageFlowFile
- PaginatedJsonQueryElasticsearch
- ParseEvtx
- ParseNetflowv5
- ParseSyslog
- ParseSyslog5424
- PartitionRecord
- PublishAMQP
- PublishGCPubSub
- PublishJMS
- PublishKafka
- PublishMQTT
- PublishSlack
- PutAzureBlobStorage_v12
- PutAzureCosmosDBRecord
- PutAzureDataExplorer
- PutAzureDataLakeStorage
- PutAzureEventHub
- PutAzureQueueStorage_v12
- PutBigQuery
- PutBoxFile
- PutCloudWatchMetric
- PutDatabaseRecord
- PutDistributedMapCache
- PutDropbox
- PutDynamoDB
- PutDynamoDBRecord
- PutElasticsearchJson
- PutElasticsearchRecord
- PutEmail
- PutFile
- PutFTP
- PutGCSObject
- PutGoogleDrive
- PutGridFS
- PutKinesisFirehose
- PutKinesisStream
- PutLambda
- PutMongo
- PutMongoBulkOperations
- PutMongoRecord
- PutRecord
- PutRedisHashRecord
- PutS3Object
- PutSalesforceObject
- PutSFTP
- PutSmbFile
- PutSNS
- PutSplunk
- PutSplunkHTTP
- PutSQL
- PutSQS
- PutSyslog
- PutTCP
- PutUDP
- PutWebSocket
- PutZendeskTicket
- QueryAirtableTable
- QueryAzureDataExplorer
- QueryDatabaseTable
- QueryDatabaseTableRecord
- QueryRecord
- QuerySalesforceObject
- QuerySplunkIndexingStatus
- RemoveRecordField
- RenameRecordField
- ReplaceText
- ReplaceTextWithMapping
- RetryFlowFile
- RouteHL7
- RouteOnAttribute
- RouteOnContent
- RouteText
- RunMongoAggregation
- SampleRecord
- ScanAttribute
- ScanContent
- ScriptedFilterRecord
- ScriptedPartitionRecord
- ScriptedTransformRecord
- ScriptedValidateRecord
- SearchElasticsearch
- SegmentContent
- SendTrapSNMP
- SetSNMP
- SignContentPGP
- SplitAvro
- SplitContent
- SplitExcel
- SplitJson
- SplitPCAP
- SplitRecord
- SplitText
- SplitXml
- StartAwsPollyJob
- StartAwsTextractJob
- StartAwsTranscribeJob
- StartAwsTranslateJob
- StartGcpVisionAnnotateFilesOperation
- StartGcpVisionAnnotateImagesOperation
- TagS3Object
- TailFile
- TransformXml
- UnpackContent
- UpdateAttribute
- UpdateByQueryElasticsearch
- UpdateCounter
- UpdateDatabaseTable
- UpdateRecord
- ValidateCsv
- ValidateJson
- ValidateRecord
- ValidateXml
- VerifyContentMAC
- VerifyContentPGP
- Wait
-
Controller Services
- ADLSCredentialsControllerService
- ADLSCredentialsControllerServiceLookup
- AmazonGlueSchemaRegistry
- ApicurioSchemaRegistry
- AvroReader
- AvroRecordSetWriter
- AvroSchemaRegistry
- AWSCredentialsProviderControllerService
- AzureBlobStorageFileResourceService
- AzureCosmosDBClientService
- AzureDataLakeStorageFileResourceService
- AzureEventHubRecordSink
- AzureStorageCredentialsControllerService_v12
- AzureStorageCredentialsControllerServiceLookup_v12
- CEFReader
- ConfluentEncodedSchemaReferenceReader
- ConfluentEncodedSchemaReferenceWriter
- ConfluentSchemaRegistry
- CSVReader
- CSVRecordLookupService
- CSVRecordSetWriter
- DatabaseRecordLookupService
- DatabaseRecordSink
- DatabaseTableSchemaRegistry
- DBCPConnectionPool
- DBCPConnectionPoolLookup
- DistributedMapCacheLookupService
- ElasticSearchClientServiceImpl
- ElasticSearchLookupService
- ElasticSearchStringLookupService
- EmailRecordSink
- EmbeddedHazelcastCacheManager
- ExcelReader
- ExternalHazelcastCacheManager
- FreeFormTextRecordSetWriter
- GCPCredentialsControllerService
- GCSFileResourceService
- GrokReader
- HazelcastMapCacheClient
- HikariCPConnectionPool
- HttpRecordSink
- IPLookupService
- JettyWebSocketClient
- JettyWebSocketServer
- JMSConnectionFactoryProvider
- JndiJmsConnectionFactoryProvider
- JsonConfigBasedBoxClientService
- JsonPathReader
- JsonRecordSetWriter
- JsonTreeReader
- Kafka3ConnectionService
- KerberosKeytabUserService
- KerberosPasswordUserService
- KerberosTicketCacheUserService
- LoggingRecordSink
- MapCacheClientService
- MapCacheServer
- MongoDBControllerService
- MongoDBLookupService
- PEMEncodedSSLContextProvider
- PropertiesFileLookupService
- ProtobufReader
- ReaderLookup
- RecordSetWriterLookup
- RecordSinkServiceLookup
- RedisConnectionPoolService
- RedisDistributedMapCacheClientService
- RestLookupService
- S3FileResourceService
- ScriptedLookupService
- ScriptedReader
- ScriptedRecordSetWriter
- ScriptedRecordSink
- SetCacheClientService
- SetCacheServer
- SimpleCsvFileLookupService
- SimpleDatabaseLookupService
- SimpleKeyValueLookupService
- SimpleRedisDistributedMapCacheClientService
- SimpleScriptedLookupService
- SiteToSiteReportingRecordSink
- SlackRecordSink
- SmbjClientProviderService
- StandardAsanaClientProviderService
- StandardAzureCredentialsControllerService
- StandardDropboxCredentialService
- StandardFileResourceService
- StandardHashiCorpVaultClientService
- StandardHttpContextMap
- StandardJsonSchemaRegistry
- StandardKustoIngestService
- StandardKustoQueryService
- StandardOauth2AccessTokenProvider
- StandardPGPPrivateKeyService
- StandardPGPPublicKeyService
- StandardPrivateKeyService
- StandardProxyConfigurationService
- StandardRestrictedSSLContextService
- StandardS3EncryptionService
- StandardSSLContextService
- StandardWebClientServiceProvider
- Syslog5424Reader
- SyslogReader
- UDPEventRecordSink
- VolatileSchemaCache
- WindowsEventLogReader
- XMLFileLookupService
- XMLReader
- XMLRecordSetWriter
- YamlTreeReader
- ZendeskRecordSink
PutEmail 2.1.0
- Bundle
- org.apache.nifi | nifi-standard-nar
- Description
- Sends an e-mail to configured recipients for each incoming FlowFile
- Tags
- email, notify, put, smtp
- Input Requirement
- REQUIRED
- Supports Sensitive Dynamic Properties
- true
-
Additional Details for PutEmail 2.1.0
PutEmail
OAuth Authorization Mode
PutEmail can use OAuth2. The exact way may depend on the email provider.
OAuth with Gmail
Configure Gmail OAuth Client
The Gmail OAuth client can be used to send email on behalf of multiple different gmail accounts so this needs to be done once.
- In the Google Development Console Create a project (if you don’t have one yet)
- Configure OAuth consent
- Create OAuth client. Select Desktop app as Application type. When the client has been created, take note of the Client ID and Client secret values as they will be needed later.
Retrieve Token for NiFi
Tokens are provided once the owner of the Gmail account consented to the previously created client to send emails on their behalf. Consequently, this needs to be done for every gmail account.
-
Go to the following web page:
https://accounts.google.com/o/oauth2/auth?redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fmail.google.com&client_id=CLIENT_ID
Replace CLIENT_ID at the end to your Client ID.
-
You may need to select the Google Account for which you want to consent. Click Continue twice.
-
A page will appear with an Authorisation code that will have a message at the bottom like this:
Authorisation code
Please copy this code, switch to your application and paste it there:
AUTHORISATION_CODE
-
Execute the following command from terminal to fetch the access and refresh tokens.
In case the curl command returns an error, please try again from step 1.curl https://accounts.google.com/o/oauth2/token -d grant_type=authorization_code -d redirect_uri=“urn:ietf:wg:oauth:2.0:oob” -d client_id=CLIENT_ID -d client_secret=CLIENT_SECRET -d code=AUTHORISATION_CODE
Replace CLIENT_ID, CLIENT_SECRET and AUTHORISATION_CODE to your values.
-
The curl command results a json file which contains the access token and refresh token:
{ "access_token": "ACCESS_TOKEN", "expires_in": 3599, "refresh_token": "REFRESH_TOKEN", "scope": "https://mail.google.com/", "token_type": "Bearer" }
Configure Token in NiFi
-
On the PutEmail processor in the Authorization Mode property select Use OAuth2.
-
In the OAuth2 Access Token Provider property select/create a StandardOauth2AccessTokenProvider controller service.
-
On the StandardOauth2AccessTokenProvider controller service in the Grant Type property select Refresh Token.
-
In the Refresh Token property enter the REFRESH_TOKEN returned by the curl command.
-
In the Authorization Server URL enter
-
Also fill in the Client ID and Client secret properties.
-
Attach File
Specifies whether or not the FlowFile content should be attached to the email
- Display Name
- Attach File
- Description
- Specifies whether or not the FlowFile content should be attached to the email
- API Name
- Attach File
- Default Value
- false
- Allowable Values
-
- true
- false
- Expression Language Scope
- Not Supported
- Sensitive
- false
- Required
- true
-
Attributes to Send as Headers (Regex)
A Regular Expression that is matched against all FlowFile attribute names. Any attribute whose name matches the regex will be added to the Email messages as a Header. If not specified, no FlowFile attributes will be added as headers.
- Display Name
- Attributes to Send as Headers (Regex)
- Description
- A Regular Expression that is matched against all FlowFile attribute names. Any attribute whose name matches the regex will be added to the Email messages as a Header. If not specified, no FlowFile attributes will be added as headers.
- API Name
- attribute-name-regex
- Expression Language Scope
- Not Supported
- Sensitive
- false
- Required
- false
-
Authorization Mode
How to authorize sending email on the user's behalf.
- Display Name
- Authorization Mode
- Description
- How to authorize sending email on the user's behalf.
- API Name
- authorization-mode
- Default Value
- password-based-authorization-mode
- Allowable Values
-
- Use Password
- Use OAuth2
- Expression Language Scope
- Not Supported
- Sensitive
- false
- Required
- true
-
BCC
The recipients to include in the BCC-Line of the email. Comma separated sequence of addresses following RFC822 syntax.
- Display Name
- BCC
- Description
- The recipients to include in the BCC-Line of the email. Comma separated sequence of addresses following RFC822 syntax.
- API Name
- BCC
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- false
- Required
- false
-
CC
The recipients to include in the CC-Line of the email. Comma separated sequence of addresses following RFC822 syntax.
- Display Name
- CC
- Description
- The recipients to include in the CC-Line of the email. Comma separated sequence of addresses following RFC822 syntax.
- API Name
- CC
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- false
- Required
- false
-
Content Type
Mime Type used to interpret the contents of the email, such as text/plain or text/html
- Display Name
- Content Type
- Description
- Mime Type used to interpret the contents of the email, such as text/plain or text/html
- API Name
- Content Type
- Default Value
- text/plain
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- false
- Required
- true
-
Flow file content as message
Specifies whether or not the FlowFile content should be the message of the email. If true, the 'Message' property is ignored.
- Display Name
- Flow file content as message
- Description
- Specifies whether or not the FlowFile content should be the message of the email. If true, the 'Message' property is ignored.
- API Name
- email-ff-content-as-message
- Default Value
- false
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- false
- Required
- true
-
From
Specifies the Email address to use as the sender. Comma separated sequence of addresses following RFC822 syntax.
- Display Name
- From
- Description
- Specifies the Email address to use as the sender. Comma separated sequence of addresses following RFC822 syntax.
- API Name
- From
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- false
- Required
- true
-
Include All Attributes In Message
Specifies whether or not all FlowFile attributes should be recorded in the body of the email message
- Display Name
- Include All Attributes In Message
- Description
- Specifies whether or not all FlowFile attributes should be recorded in the body of the email message
- API Name
- Include All Attributes In Message
- Default Value
- false
- Allowable Values
-
- true
- false
- Expression Language Scope
- Not Supported
- Sensitive
- false
- Required
- true
-
Input Character Set
Specifies the character set of the FlowFile contents for reading input FlowFile contents to generate the message body or as an attachment to the message. If not set, UTF-8 will be the default value.
- Display Name
- Input Character Set
- Description
- Specifies the character set of the FlowFile contents for reading input FlowFile contents to generate the message body or as an attachment to the message. If not set, UTF-8 will be the default value.
- API Name
- input-character-set
- Default Value
- UTF-8
- Expression Language Scope
- Not Supported
- Sensitive
- false
- Required
- true
-
Message
The body of the email message
- Display Name
- Message
- Description
- The body of the email message
- API Name
- Message
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- false
- Required
- false
-
OAuth2 Access Token Provider
OAuth2 service that can provide access tokens.
- Display Name
- OAuth2 Access Token Provider
- Description
- OAuth2 service that can provide access tokens.
- API Name
- oauth2-access-token-provider
- Service Interface
- org.apache.nifi.oauth2.OAuth2AccessTokenProvider
- Service Implementations
- Expression Language Scope
- Not Supported
- Sensitive
- false
- Required
- true
- Dependencies
-
- Authorization Mode is set to any of [oauth-based-authorization-mode]
-
Reply-To
The recipients that will receive the reply instead of the from (see RFC2822 §3.6.2).This feature is useful, for example, when the email is sent by a no-reply account. This field is optional.Comma separated sequence of addresses following RFC822 syntax.
- Display Name
- Reply-To
- Description
- The recipients that will receive the reply instead of the from (see RFC2822 §3.6.2).This feature is useful, for example, when the email is sent by a no-reply account. This field is optional.Comma separated sequence of addresses following RFC822 syntax.
- API Name
- Reply-To
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- false
- Required
- false
-
SMTP Auth
Flag indicating whether authentication should be used
- Display Name
- SMTP Auth
- Description
- Flag indicating whether authentication should be used
- API Name
- SMTP Auth
- Default Value
- true
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- false
- Required
- true
-
SMTP Hostname
The hostname of the SMTP host
- Display Name
- SMTP Hostname
- Description
- The hostname of the SMTP host
- API Name
- SMTP Hostname
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- false
- Required
- true
-
SMTP Password
Password for the SMTP account
- Display Name
- SMTP Password
- Description
- Password for the SMTP account
- API Name
- SMTP Password
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- true
- Required
- false
- Dependencies
-
- Authorization Mode is set to any of [password-based-authorization-mode]
-
SMTP Port
The Port used for SMTP communications
- Display Name
- SMTP Port
- Description
- The Port used for SMTP communications
- API Name
- SMTP Port
- Default Value
- 25
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- false
- Required
- true
-
SMTP Socket Factory
Socket Factory to use for SMTP Connection
- Display Name
- SMTP Socket Factory
- Description
- Socket Factory to use for SMTP Connection
- API Name
- SMTP Socket Factory
- Default Value
- javax.net.ssl.SSLSocketFactory
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- false
- Required
- true
-
SMTP STARTTLS
Flag indicating whether Opportunistic TLS should be enabled using STARTTLS command
- Display Name
- SMTP STARTTLS
- Description
- Flag indicating whether Opportunistic TLS should be enabled using STARTTLS command
- API Name
- SMTP TLS
- Default Value
- false
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- false
- Required
- true
-
SMTP Username
Username for the SMTP account
- Display Name
- SMTP Username
- Description
- Username for the SMTP account
- API Name
- SMTP Username
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- false
- Required
- false
-
SMTP X-Mailer Header
X-Mailer used in the header of the outgoing email
- Display Name
- SMTP X-Mailer Header
- Description
- X-Mailer used in the header of the outgoing email
- API Name
- SMTP X-Mailer Header
- Default Value
- NiFi
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- false
- Required
- true
-
Subject
The email subject
- Display Name
- Subject
- Description
- The email subject
- API Name
- Subject
- Default Value
- Message from NiFi
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- false
- Required
- true
-
To
The recipients to include in the To-Line of the email. Comma separated sequence of addresses following RFC822 syntax.
- Display Name
- To
- Description
- The recipients to include in the To-Line of the email. Comma separated sequence of addresses following RFC822 syntax.
- API Name
- To
- Expression Language Scope
- Environment variables and FlowFile Attributes
- Sensitive
- false
- Required
- false
-
mail.propertyName
Dynamic property names that will be passed to the Mail session. Possible properties can be found in: https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html.
- Name
- mail.propertyName
- Description
- Dynamic property names that will be passed to the Mail session. Possible properties can be found in: https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html.
- Value
- Value for a specific property to be set in the JavaMail Session object
- Expression Language Scope
- FLOWFILE_ATTRIBUTES
Resource | Description |
---|---|
MEMORY | The entirety of the FlowFile's content (as a String object) will be read into memory in case the property to use the flow file content as the email body is set to true. |
Name | Description |
---|---|
success | FlowFiles that are successfully sent will be routed to this relationship |
failure | FlowFiles that fail to send will be routed to this relationship |