# Twilio SendGrid — Pipedream Connect

> Send marketing and transactional email through the Twilio SendGrid platform with the Email API, proprietary mail transfer agent, and infrastructure for scalable delivery.

- API slug: `sendgrid` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Marketing
- Website: https://sendgrid.com/
- This page (HTML): https://pipedream.com/apps/sendgrid
- Tools: 32 actions · 2 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: sendgrid`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "sendgrid",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Add Email to Global Suppression:
const result = await mcp.callTool({
  name: "sendgrid-add-email-to-global-suppression",
  arguments: {
    recipientEmails: ["Recipient Emails"],
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Twilio SendGrid endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.sendgrid.com/v3/user/account

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuc2VuZGdyaWQuY29tL3YzL3VzZXIvYWNjb3VudA?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "sendgrid-add-email-to-global-suppression",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    sendgrid: { authProvisionId: "apn_xxxxxxx" },
    recipientEmails: ["Recipient Emails"],
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (32)

### `sendgrid-add-email-to-global-suppression` — Add Email to Global Suppression (Write)

Allows you to add one or more email addresses to the global suppressions group. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/add-email-to-global-suppression.md

### `sendgrid-add-or-update-contact` — Add or Update Contact (Write)

Adds or updates a contact. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/add-or-update-contact.md

### `sendgrid-create-contact-list` — Create Contact List (Write)

Allows you to create a new contact list. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/create-contact-list.md

### `sendgrid-create-send` — Create Send (Write)

Create a single send. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/create-send.md

### `sendgrid-delete-blocks` — Delete Blocks (Write)

Allows you to delete all email addresses on your blocks list. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/delete-blocks.md

### `sendgrid-delete-bounces` — Delete Bounces (Write)

Allows you to delete all emails on your bounces list. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/delete-bounces.md

### `sendgrid-delete-contacts` — Delete Contacts (Write)

Allows you to delete one or more contacts. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/delete-contacts.md

### `sendgrid-delete-global-suppression` — Delete Global Suppression (Write)

Allows you to remove an email address from the global suppressions group. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/delete-global-suppression.md

### `sendgrid-delete-list` — Delete List (Write)

Allows you to delete a specific contact list. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/delete-list.md

### `sendgrid-get-a-block` — Get a Block (Read-only)

Gets a specific block. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/get-a-block.md

### `sendgrid-get-a-global-suppression` — Get A Global Suppression (Read-only)

Gets a global suppression. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/get-a-global-suppression.md

### `sendgrid-get-all-bounces` — Get All Bounces (Read-only)

Allows you to get all of your bounces. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/get-all-bounces.md

### `sendgrid-get-contact-lists` — Get Contact Lists (Read-only)

Allows you to get details of your contact lists. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/get-contact-lists.md

### `sendgrid-list-asm-group-id-options` — List ASM Group ID Options (Read-only)

Retrieves available options for the ASM Group ID field.

Full schema: https://pipedream.com/apps/sendgrid/actions/list-asm-group-id-options.md

### `sendgrid-list-asm-groups-to-display-options` — List ASM Groups to Display Options (Read-only)

Retrieves available options for the ASM Groups to Display field.

Full schema: https://pipedream.com/apps/sendgrid/actions/list-asm-groups-to-display-options.md

### `sendgrid-list-blocks` — List Blocks (Read-only)

Allows you to list all email addresses that are currently on your blocks list. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/list-blocks.md

### `sendgrid-list-category-ids-options` — List Categories Options (Read-only)

Retrieves available options for the Categories field.

Full schema: https://pipedream.com/apps/sendgrid/actions/list-category-ids-options.md

### `sendgrid-list-design-id-options` — List Design Id Options (Read-only)

Retrieves available options for the Design Id field.

Full schema: https://pipedream.com/apps/sendgrid/actions/list-design-id-options.md

### `sendgrid-list-contact-email-options` — List Email Options (Read-only)

Retrieves available options for the Email field.

Full schema: https://pipedream.com/apps/sendgrid/actions/list-contact-email-options.md

### `sendgrid-list-global-suppression-email-options` — List Email Options (Read-only)

Retrieves available options for the Email field.

Full schema: https://pipedream.com/apps/sendgrid/actions/list-global-suppression-email-options.md

### `sendgrid-list-blocked-emails-options` — List Emails Options (Read-only)

Retrieves available options for the Emails field.

Full schema: https://pipedream.com/apps/sendgrid/actions/list-blocked-emails-options.md

### `sendgrid-list-bounced-emails-options` — List Emails Options (Read-only)

Retrieves available options for the Emails field.

Full schema: https://pipedream.com/apps/sendgrid/actions/list-bounced-emails-options.md

### `sendgrid-list-from-email-options` — List From Email Options (Read-only)

Retrieves available options for the From Email field.

Full schema: https://pipedream.com/apps/sendgrid/actions/list-from-email-options.md

### `sendgrid-list-global-suppressions` — List Global Suppressions (Read-only)

Allows you to get a list of all email address that are globally suppressed. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/list-global-suppressions.md

### `sendgrid-list-segment-ids-options` — List Segment Ids Options (Read-only)

Retrieves available options for the Segment Ids field.

Full schema: https://pipedream.com/apps/sendgrid/actions/list-segment-ids-options.md

### `sendgrid-list-sender-id-options` — List Sender Id Options (Read-only)

Retrieves available options for the Sender Id field.

Full schema: https://pipedream.com/apps/sendgrid/actions/list-sender-id-options.md

### `sendgrid-list-template-id-options` — List Template ID Options (Read-only)

Retrieves available options for the Template ID field.

Full schema: https://pipedream.com/apps/sendgrid/actions/list-template-id-options.md

### `sendgrid-remove-contact-from-list` — Remove Contact From List (Write)

Allows you to remove contacts from a given list. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/remove-contact-from-list.md

### `sendgrid-search-contacts` — Search Contacts (Read-only)

Searches contacts with a SGQL query. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/search-contacts.md

### `sendgrid-send-email-multiple-recipients` — Send Email Multiple Recipients (Write)

This action sends a personalized e-mail to multiple specified recipients. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/send-email-multiple-recipients.md

### `sendgrid-send-email-single-recipient` — Send Email Single Recipient (Write)

This action sends a personalized e-mail to the specified recipient. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/send-email-single-recipient.md

### `sendgrid-validate-email` — Validate Email (Read-only)

Validates an email address. This action requires a Sendgrid's Pro or Premier plan. See the docs here

Full schema: https://pipedream.com/apps/sendgrid/actions/validate-email.md

## Triggers (2)

### `sendgrid-new-contact` — New Contact (Polling)

Emit new event when a new contact is created

Full schema: https://pipedream.com/apps/sendgrid/triggers/new-contact.md

### `sendgrid-events` — New Events (Instant) (Instant)

Emit new event when any of the specified SendGrid events is received

Full schema: https://pipedream.com/apps/sendgrid/triggers/events.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
