What You'll Set Up
By the end of this guide, your AI agent will be able to work with your SendGrid account — sending emails, managing contact lists, using email templates, and tracking delivery analytics. The entire setup takes about five minutes.
Once connected, your agent can handle tasks like "Send a welcome email to our new subscriber" or "How many emails did we send last week?" using your SendGrid account directly.
Before You Begin
Make sure you have:
- A SendGrid account — Sign up for free if you don't have one. The free tier includes 100 emails per day.
- A Pipeworks workspace — Sign up at pipeworks.ai if you haven't already
SendGrid's free plan lets you send up to 100 emails per day, which is enough to test the integration and handle low-volume workflows. Upgrade to a paid plan for higher volume.
Steps
Create an API key in SendGrid
Log into your SendGrid dashboard at app.sendgrid.com. In the left sidebar, navigate to Settings > API Keys.
Click Create API Key in the top right. Give it a name like "Pipeworks" and select the appropriate permissions:
- Choose Full Access if you want your agent to send emails, manage contacts, and access all features
- Choose Restricted Access if you want to limit what the API key can do — you can enable specific permission groups individually
Click Create & View. Copy the API key immediately — SendGrid only shows it once. It will start with SG..
Open your Pipeworks console
Log into your Pipeworks workspace and go to the Integrations page. Find SendGrid in the list and click on it.
Enter your credentials
Paste your SendGrid API key into the API Key field and click Connect.
Pipeworks encrypts your API key with AES-256-GCM before storing it. The plaintext is never saved to disk and is only decrypted when your integration container starts.
Start the integration
Click Start to launch the SendGrid integration container. Once the status shows Running, your agent is ready to send emails and manage your contacts.
Test the connection
Use the Test button to verify everything works. This sends a request to the SendGrid API to confirm your key is valid and your account is accessible.
What Your Agent Can Do
Once connected, your AI agent has access to SendGrid tools for:
- Send emails — Compose and send transactional or marketing emails to individuals or groups
- Contacts — Add, update, and search contacts in your SendGrid contact database
- Contact lists — Create and manage lists for organizing your recipients
- Templates — Use your pre-built email templates to send consistent, branded messages
- Analytics — Track email delivery rates, open rates, click rates, and bounces
- Sender verification — Manage verified sender identities for your emails
Use tool profiles to control what your agent can do. Set the profile to read-only if you want your agent to check analytics and contact data without sending any emails.
Connecting from Your AI Agent
Add the Pipeworks tools endpoint to your agent's configuration. Here's an example for Claude Desktop:
{
"mcpServers": {
"pipeworks-sendgrid": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://app.pipeworks.ai/tools/sendgrid"]
}
}
}
Claude Desktop will prompt you to sign in through Pipeworks when you first connect. No access key needed.
Troubleshooting
Connection test fails? Make sure you copied the full API key from SendGrid. Keys start with SG. and are quite long — double-check that nothing was cut off when you copied it.
Emails not being delivered? SendGrid requires sender identity verification before you can send emails. Go to Settings > Sender Authentication in your SendGrid dashboard and verify your sending domain or at least a single sender email address.
API key permissions issue? If your agent can read data but cannot send emails, your API key may have restricted permissions. Create a new key with Full Access or add the missing permission groups in SendGrid.
Agent can't find tools? Verify your Pipeworks session is authenticated and that the integration status shows "Running" in your Pipeworks console.