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

# SendGrid

> Send emails using SendGrid

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Send emails using SendGrid. This connection hands your outgoing email to SendGrid's delivery service, so any feature that sends mail (for example a notification when an integration runs into trouble) goes out through your SendGrid account. You set it up once with your SendGrid API key, then reuse it wherever an email server is needed.

This documentation describes: [Schema](/schemas/email-server/sendgrid)

## Fields

<FormField property="apiKey" label="API key" required>
  The SendGrid API key Alumio uses to send your emails. Create the key in your SendGrid account and paste it here. Treat it like a password: anyone with the key can send mail on your account. You can reference an environment variable instead of typing the key directly.
</FormField>

<FormField property="region" label="Region">
  The SendGrid region your account uses. Leave it empty to use the global region, or set it to your account's region (for example `eu` or `us`) when SendGrid requires it. Most setups can leave this blank.
</FormField>

## Sample data

A typical SendGrid connection only needs your API key. The region is left empty so SendGrid uses its global endpoint.

| Field   | Value                                                              |
| ------- | ------------------------------------------------------------------ |
| API key | `SG.xxxxxxxxxxxxxxxxxxxxxx` (your key, or an environment variable) |
| Region  | (empty)                                                            |

```json Configuration theme={null}
{
  "prototype": "sendgrid",
  "parameters": {
    "apiKey": "SG.xxxxxxxxxxxxxxxxxxxxxx"
  }
}
```
