Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outgoing e-mail connector / trigger #5469

Open
kazagz opened this issue Feb 27, 2025 · 1 comment
Open

Outgoing e-mail connector / trigger #5469

kazagz opened this issue Feb 27, 2025 · 1 comment

Comments

@kazagz
Copy link

kazagz commented Feb 27, 2025

What would you like to see!

While there is possibility to notify users via e-mail, I would like to see possibility to trigger e-mail based on alert payload. In our shop we're getting alert from many different sources and some of source specify contact persons / e-mails in alerts. What is required is to have the same functionality "Outgoing webhooks" have, but in this case they would trigger e-mail notifications.

Example

Alert payload:

{
    "message": "Something bad is happening",
    "mail": [
        "foo@example.com",
        "bar@example.com"
    ]
}

This would trigger "Outgoing e-mail" using Jinja2 templates - one for subject, message and recipients:

# Adding all templates here, but in reality these would
# be 3 inputs similar to how they are for existing e-mail notifications

# --- Title (subject) template ---
{{ payload.message }}

# --- Message template ---
Hello,
you should check this: {{ payload.message }}

# --- Recipients template, should accept comma separated list ---
{{ payload.mail | join(",") }}

The result would be mail sent to "foo@example.com,bar@example.com".

Product Area

Alert Flow & Configuration

Anything else to add?

No response

Copy link
Contributor

The current version of Grafana OnCall, at the time this issue was opened, is v1.15.0. If your issue pertains to an older version of Grafana OnCall, please be sure to list it in the PR description. Thank you 😄!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant