> ## Documentation Index
> Fetch the complete documentation index at: https://trigger-v3-fix-additional-files.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SendGrid 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>
