Action Provider: Send Notification Email
Scope: https://auth.globus.org/scopes/5fac2e64-c734-4e6b-90ea-ff12ddbf9653/notification_notify
Synchronous / Asynchronous: Synchronous
The Send Notification / Email action provider presently supports sending of email messages to a set of email addresses.
The request to send the email contains the standard components of an email: sender, receiver(s), subject and body.
The mimetype of the body may be specified so that either HTML or text formatted messages may be sent.
The body also supports the notion of variable substitution or "templating".
Values in the body may be specified with a dollar sign prefix ($
), and when values are provided in the body_variables
property of the request, the template value will be substituted with the corresponding value from the body_variables
.
The other important component of the request to this action provider is the email sending credentials. Credentials are provided to allow the provider to communicate with the service used for sending the email. Presently, two modes of sending email are supported: SMTP and AWS SES. When SMTP is provided, the username, password and server hostname are required. When AWS SES is provided, the AWS access key, AWS access key secret and the AWS region must be provided. As this service is synchronous and stateless, the requester can be assured that these credentials will not be stored. The action provider will return success as long as the email service accepts the message. It cannot guarantee successful delivery of the message including an inability to deliver the message due to an improper recipient address.
{
"notification_method": "email",
"notification_priority": "high",
"body_template": "<html><body><h1>Hello $Name</h1></body></html>",
"body_mimetype": "text/html",
"body_variables": {
"Name": "Dude"
},
"destination": "user@globus.org",
"sender": "user@globus.org",
"subject": "Testing From CLI",
"send_credentials": [
{
"credential_method": "email",
"credential_type": "ses",
"credential_value": {
"aws_access_key_id": "SECRET",
"aws_secret_access_key": "SECRET",
"region_name": "us-east-1"
}
}
]
}
{
"body_mimetype": "text/html",
"body_template": "Hello there",
"destination": "DESTINATION@example.org",
"notification_method": "any",
"notification_priority": "high",
"sender": "SENDER@example.org",
"subject": "Testing Notification",
"send_credentials": [
{
"credential_type": "ses",
"credential_value": {
"aws_access_key_id": "AWS_ACCESS_KEY_ID",
"aws_secret_access_key": "AWS_SECRET_ACCESS_KEY",
"region_name": "us-east-1"
}
}
]
}