Files
Dan b5aea6c534 Replaced showcase links -> api (#764)
* Updated the examples section with new links / changed showcase link to project showcase

* Added links to the api pages for all of our integrations

* Deleted card from the airtable tasks page
2023-12-01 17:35:54 +00:00

58 lines
1.4 KiB
Plaintext

---
title: SendGrid overview & authentication
sidebarTitle: Overview & authentication
---
## Overview
SendGrid is a cloud-based SMTP provider that allows you to send email without having to maintain email servers. With our SendGrid integration you can send email campaigns, transactional emails, and automated emails (drip campaigns) from your app.
## Installing the SendGrid packages
To get started with our SendGrid integration, you need to install the `@trigger.dev/sendgrid` packages. You can do this using `npm`, `pnpm`, or `yarn`:
<CodeGroup>
```bash npm
npm install @trigger.dev/sendgrid@latest
```
```bash pnpm
pnpm install @trigger.dev/sendgrid@latest
```
```bash yarn
yarn add @trigger.dev/sendgrid@latest
```
</CodeGroup>
## Authentication
SendGrid supports API Keys. Official documentation [here](https://docs.sendgrid.com/ui/account-and-settings/api-keys).
```ts
import { SendGrid } from "@trigger.dev/sendgrid";
const sendgrid = new SendGrid({
id: "sendgrid",
apiKey: process.env.SENDGRID_API_KEY!,
});
```
## Tasks
Once you have set up a SendGrid client, you can use it to create tasks.
{" "}
<Card title="Tasks" icon="sparkles" href="/integrations/apis/sendgrid-tasks">
Send emails with SendGrid.
</Card>
## Example jobs
<Card title="Code examples" icon="code" href="https://trigger.dev/apis/sendgrid">
Check out pre-built jobs using SendGrid in our API section.
</Card>