Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
talboren committed Jun 14, 2023
1 parent 3811e08 commit 55e5dc7
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div align="center">
<img src="/docs/static/img/keep.png?raw=true" width="86">
<img src="/assets/keep.png?raw=true" width="86">
</div>

<h1 align="center">The open-source alerts management platform</h1>
Expand Down Expand Up @@ -117,7 +117,7 @@ keep run --alerts-file examples/alerts/db_disk_space.yml
<div align="center">
Voilà 🥳
<br />
<img src="/docs/static/img/alert-example.png">
<img src="/assets/alert-example.png">
<br />
You should have received your first "Dunder Mifflin Paper Company" alert in Slack by now.
<br />
Expand Down
Binary file added assets/alert-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/keep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions docs/platform/core/providers/documentation/resend-provider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: "Resend"
sidebarTitle: "Resend Provider"
---

# Resend Provider

ResendProvider is a class that implements the Resend API and allows email sending through Keep.

## Inputs
The `notify` function of `ResendProvider` takes the following arguments:

- `_from` (str): Required. The email address of the sender.
- `to` (str): Required. The email address of the recipient.
- `subject` (str): Required. The subject of the email.
- `html` (str): Required. The HTML body of the email.
- `**kwargs` (optional): Additional optional parameters can be provided as key-value pairs.

See [documentation](https://resend.com/docs/api-reference/emails/send-email) for more

## Outputs
The `notify` function of `ResendProvider` outputs the following format (example):

```json
{
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794",
"from": "[email protected]",
"to": "[email protected]",
"created_at": "2022-07-25T00:28:32.493138+00:00"
}
```

See [documentation](https://resend.com/docs/api-reference/emails/send-email) for more


## Authentication Parameters
The Resend provider requires the following authentication parameter:

- `api_key`: Required. Resend API key. You can obtain an API key by visiting [Resend API Keys](https://resend.com/api-keys).

## Connecting with the Provider
To connect with the Resend provider and send emails through Keep, follow these steps:

1. Obtain a Resend API key: Visit [Resend API Keys](https://resend.com/api-keys) to obtain an API key if you don't have one already.
2. Configure the Resend provider in your system with the obtained API key.
3. Use the following YAML example to send an email notification using the Resend provider:

```yaml title=examples/alert_example.yml
# Send an email notification using the Resend provider.
alert:
id: email-notification
description: Send an email notification using Resend
actions:
- name: send-email
provider:
type: resend
config: "{{ providers.resend-provider }}"
with:
_from: "[email protected]"
to: "[email protected]"
subject: "Hello from Resend Provider"
html: "<p>This is the email body.</p>"
```
## Useful Links
- [Resend API Keys](https://resend.com/api-keys)

0 comments on commit 55e5dc7

Please sign in to comment.