Integrations · SendGrid
A Guild agent can send transactional email, manage templates, schedule and cancel sends, and inspect suppression lists through the Twilio SendGrid API. Guild stores your SendGrid API key server-side and injects it into every request, so agent code never sees the credential. Credential policies let you restrict which operations each agent may call, and every request is audited through Guild’s credential proxy.
Book a demo
See how teams govern agents that use SendGrid.
Talk to sales
Get access to Guild, then connect SendGrid to your first agent.
What the SendGrid integration exposes
The integration covers sending mail, creating and activating dynamic templates, creating and updating scheduled sends, and managing suppressions including bounces, blocks, spam reports, invalid emails, and suppression groups. Tools also cover email validation and bulk validation jobs. Message activity tools let agents search and filter Email Activity and export results as CSV.How it works
1
Create a SendGrid API key
In SendGrid, go to Settings > API Keys and create a key with the permissions your agent needs. Sending requires Mail Send; templates, suppressions, and message activity each need their own permission.
2
Connect the credential in Guild
In Guild, go to Access & setup > Credentials, click Connect, select sendgrid-email, and paste the key into API Key. See Credentials for workspace, member, and agent-scoped options.
3
Import tools into your agent
Import SendgridEmailTools from the integration package and spread it into your agent’s tools object. Use pick() to include only the tools your agent needs, referencing them by their sendgrid_email_ prefix names.
Why SendGrid access needs governing
SendGrid API keys do not expire, so a key connected once stays active indefinitely. Guild stores the key server-side and injects it through its credential proxy: agent code, prompts, and containers never see the raw credential. You can scope a credential to an account, a single workspace, a specific member, or one agent, limiting which agents can reach the service at all. See Credentials for the full scoping model. Credential policies add a second layer. You can write ALLOW and DENY rules that the proxy enforces before any request reaches SendGrid, targeting specific operations such as sendgrid_email_send_mail or patterns like sendgrid_email_delete_*. Rules can be scoped to specific agents or workspaces on the same credential, so one agent may send mail while another may only read suppressions. Where no scoped rule matches, the default posture is deny once you remove the allow-all fallback. Guild enforces policies server-side; agents cannot bypass them.About the SendGrid integration
The SendGrid integration gives agents the Twilio SendGrid email API: sending mail, dynamic templates, scheduled sends, message activity, and suppressions such as bounces, blocks, and spam reports. The integration isguildai~sendgrid-email.
Authentication
- Type: API key
- Header: Guild sends the key as a bearer token in the
Authorizationheader - Token management: SendGrid API keys don’t expire
Setup
1
Create an API key
In SendGrid, go to Settings > API Keys and create a key with the permissions your agent needs.
2
Connect SendGrid
In Guild, go to Access & setup > Credentials, click Connect, select sendgrid-email, and paste the key into API Key.
Usage
Selecting specific tools
Tools are named with thesendgrid_email_ prefix. Use pick() to include only what your agent needs.
Tools
Tools in the latest published version ofguildai~sendgrid-email:
All 60 tools
All 60 tools
Frequently asked questions
Can I give one agent send access and another only read access on the same SendGrid credential?
Can I give one agent send access and another only read access on the same SendGrid credential?
Yes. Credential policies let you write rules scoped to specific agents. You can ALLOW sendgrid_email_send_mail for one agent and restrict another to read-only operations like sendgrid_email_list_bounces or sendgrid_email_get_message, all on the same connected credential. See Credential policies.
Does Guild support SendGrid webhook events?
Does Guild support SendGrid webhook events?
Not yet. The catalog entry for guildai~sendgrid-email lists no webhook events, so agents cannot be triggered by inbound SendGrid events through Guild’s event trigger system.
How do I limit which SendGrid tools my agent can use?
How do I limit which SendGrid tools my agent can use?
Use pick() when importing SendgridEmailTools and pass only the tool names your agent needs. You can also add credential policy rules that DENY specific operations at the proxy level, so the restriction is enforced server-side regardless of what the agent code requests.
Do I need a separate API key for each Guild workspace?
Do I need a separate API key for each Guild workspace?
No. A credential connected at the account level serves every workspace the account owns by default. You can connect a separate key scoped to a single workspace or agent if a different SendGrid account or permission set is needed for that context. See Credentials for the full precedence order.
Put a governed agent on SendGrid this week
Book a demo
See how teams govern agents that use SendGrid.
Talk to sales
Get access to Guild, then connect SendGrid to your first agent.