Categories:

Notification functions (Integration Configuration)

EMAIL_INTEGRATION_CONFIG

Returns a JSON object that specifies the email notification integration, recipients, and subject line to use for an email notification. This is a helper function that you use to construct an integration configuration object for the SYSTEM$SEND_SNOWFLAKE_NOTIFICATION stored procedure.

See also:

Using SYSTEM$SEND_SNOWFLAKE_NOTIFICATION to send notifications , SYSTEM$SEND_SNOWFLAKE_NOTIFICATION , INTEGRATION

Syntax

SNOWFLAKE.NOTIFICATION.EMAIL_INTEGRATION_CONFIG(
  '<email_integration_name>',
  '<subject>',
  <array_of_email_addresses_for_to_line> )
Copy
SNOWFLAKE.NOTIFICATION.EMAIL_INTEGRATION_CONFIG(
  '<email_integration_name>',
  '<subject>',
  <array_of_email_addresses_for_to_line>,
  <array_of_email_addresses_for_cc_line>,
  <array_of_email_addresses_for_bcc_line> )
Copy

Arguments

'email_integration_name'

Name of the email notification integration to use.

'subject'

Subject of the email message.

The subject cannot exceed 256 characters in length.

array_of_email_addresses_for_to_line . array_of_email_addresses_for_cc_line . array_of_email_addresses_for_bcc_line

ARRAYs of the email addresses to include in the “To:”, “Cc:”, and “Bcc:” lines of the message.

You must specify email addresses of users in the current account. These users must verify their email addresses.

If the ALLOWED_RECIPIENTS property is set to a list of email addresses in the email notification integration, the email addresses must be in that list.

Call the ARRAY_CONSTRUCT function to construct each ARRAY.

Note

You cannot send an email notification if you only specify the “Bcc:” line.

Returns

A JSON-formatted string that specifies a notification integration for the SYSTEM$SEND_SNOWFLAKE_NOTIFICATION stored procedure to send.

For example, suppose that you pass in the notification integration name 'my_email_int' with the following subject line and list of email addresses for the “To:” line:

SELECT SNOWFLAKE.NOTIFICATION.EMAIL_INTEGRATION_CONFIG(
  'my_email_int',
  'Updates',
   ARRAY_CONSTRUCT('person_a@example.com', 'person_b@example.com')
)
Copy

The function returns the following JSON-formatted string:

'{"my_email_int":{"subject":"Updates","toAddress":["person_a@example.com","person_b@example.com"]}}'
Copy

The following example sends the same notification with an additional list of email addresses for the “Cc:” line. Note that this example passes NULL for the “Bcc:” addresses to exclude the bccAddress property from the returned object.

SELECT SNOWFLAKE.NOTIFICATION.EMAIL_INTEGRATION_CONFIG(
  'my_email_int',
  'Updates',
   ARRAY_CONSTRUCT('person_a@example.com', 'person_b@example.com'),
   ARRAY_CONSTRUCT('cc_person_a@example.com'),
   NULL
)
Copy

The function returns the following JSON-formatted string:

'{"my_email_int":{"subject":"Updates","toAddress":["person_a@example.com","person_b@example.com"],"ccAddress":["cc_person_a@snowflake.com"]}}'
Copy

The following example sends the same notification with an additional list of email addresses for the “Bcc:” line:

SELECT SNOWFLAKE.NOTIFICATION.EMAIL_INTEGRATION_CONFIG(
  'my_email_int',
  'Updates',
   ARRAY_CONSTRUCT('person_a@example.com', 'person_b@example.com'),
   ARRAY_CONSTRUCT('cc_person_a@example.com'),
   ARRAY_CONSTRUCT('bcc_person_b@example.com')
)
Copy

The function returns the following JSON-formatted string:

'{"my_email_int":{"subject":"Updates","toAddress":["person_a@example.com","person_b@example.com"],"ccAddress":["cc_person_a@example.com"],"bccAddress":["bcc_person_b@example.com"]}}'
Copy

Examples

See Using SYSTEM$SEND_SNOWFLAKE_NOTIFICATION to send notifications.

Language: English