Example: Using SendGrid as custom email provider for notifications
Follow these steps to have PingOne use SendGrid for sending notifications to users:
-
Go to Settings > Sender.
-
On the Email tab, click the Pencil icon.
-
In the Email Sender section, click Custom Provider.
You can only have a single sender defined for a PingOne environment. Selecting Custom Provider erases any previous email sender settings.
-
For Provider Name, enter a name to identify your SendGrid configuration.
-
For Authorization, select Bearer and enter the token to use for your SendGrid account.
-
Enter the From Address to use in the notifications. This address must be a verified sender in SendGrid.
-
(Optional) Enter the From Name value you want to use in the notifications.
-
(Optional) Enter the Reply-To Name and Reply-To Address values you want to use in the notifications.
-
Provide the information required by the SendGrid API:
-
In the Type list, select POST.
-
In the URL field, enter
https://api.sendgrid.com/v3/mail/send
. -
For the body of the request, select Raw.
-
In the Raw field, enter the following JSON:
{"personalizations":[{"to":[{"email":"${to}"}]}],"from":{"email":"${from}","name":"${from.name}"},"reply_to":{"email":"${reply-to}","name":"${reply-to.name}"},"subject":"${subject}","content":[{"type":"text/plain","value":"${message}"}]}
Some of the variables in this sample JSON are optional, for example,
${from.name}
. The variables required by PingOne are listed in the UI and in Using a custom email provider for notifications -
Verify that the single header required by SendGrid is already shown
(content-type:application/json)
. If not, click Add Header and enter the header type and value. -
After entering all of the information, click Send Test Email to send an email to verify that everything is working correctly. Enter the email address to send the test email to and click Send.
If you’re editing existing settings, the token is not displayed when the page is loaded. To send a test email, you must enter the token alongside the email address you specified for the test email.
-
-
Click Save.
Save is disabled until you have filled in all the required fields and have included all the required variables in the body of the request.