> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firstwork.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SendGrid

> Send transactional emails, templated notifications, and bulk communications via SendGrid

## Overview

Firstwork integrates with **SendGrid** for all email delivery — from application confirmations and stage notifications to onboarding welcome emails and compliance reminders.

## Setup

### Get your SendGrid API key

1. Log in to your [SendGrid account](https://app.sendgrid.com)
2. Navigate to **Settings > API Keys**
3. Create a new API key with **Mail Send** permissions

### Configure in Firstwork

Go to **Settings > Integrations > Email** in the Firstwork dashboard and enter your SendGrid API key.

### Verify sender

Ensure your sending email address is verified in SendGrid:

* **Single sender verification** for testing
* **Domain authentication** for production

## Email Templates

Firstwork uses **Company Notification Templates** for email content:

| Template Component | Description                             |
| ------------------ | --------------------------------------- |
| Subject            | Email subject line (supports variables) |
| Body               | HTML email body (supports variables)    |
| Sender             | From address and name                   |
| Reply-To           | Reply-to address                        |

### Template Variables

Templates support [dynamic variables](/knowledge-base/dynamic-variables) for dynamic content. Variables that read Firstwork data use [Object Graph](/knowledge-base/object-graph) paths:

```
Hello {{application.candidate.first_name}},

Your application for {{application.hiring_flow.name}} has been 
advanced to the {{application.current_stage.name}} stage.

Best regards,
{{company.name}}
```

## Email Actions in Automations

The **Send Email** action is available in automations:

| Configuration | Description                                  |
| ------------- | -------------------------------------------- |
| Template      | Which notification template to use           |
| Recipient     | Dynamic recipient (candidate, admin, custom) |
| CC / BCC      | Additional recipients                        |
| Attachments   | Dynamic file attachments                     |
| Delay         | Optional send delay                          |

### Common Email Automations

* Application confirmation on submission
* Stage transition notifications
* Document request reminders
* Offer letter delivery
* Onboarding welcome emails
* Training assignment notifications

## Delivery Tracking

Firstwork tracks email delivery status:

* Sent
* Delivered
* Opened (when tracking enabled)
* Bounced
* Failed

Failed deliveries are logged in the automation execution history for debugging.
