SendGrid Integration
About this integration
SendGrid is one of our most popular integrations. By connecting an AI chatbot to SendGrid, Botpress users can send transactional emails, marketing messages, and automated notifications directly from their chatbot flows.
A SendGrid integration in your chatbot makes it simple to deliver confirmations, follow-ups, and personalized messages in real time.
With a SendGrid integration for chatbots, businesses can streamline communication, reduce manual work, and improve customer experience — all while keeping messages consistent and automated.
Key features of the SendGrid integration
- Send emails automatically
- Personalize email content
- Use email templates
- Trigger follow-up messages
- Deliver event-based notifications
- Track email performance
FAQs
What chatbot platforms connect with Sendgrid?
Botpress, Landbot, UChat, and Voiceflow all connect with SendGrid. Some do it natively, others through automation tools like Zapier, but all let you trigger emails directly from chatbot conversations.
How can I make a chatbot automatically send emails?
You connect your bot to SendGrid and set a trigger in the workflow in order to auto-send emails. When the condition you set is met — like a form submission — the bot sends an email through the integration.
Can I use SendGrid with AI chatbots for customer support?
Yes, SendGrid can handle confirmations, ticket updates, and follow-up messages. This reduces manual email handling and keeps support communication consistent.
How do I set up a SendGrid integration in Botpress?
Enter your SendGrid API key in the Botpress integration settings. From there, drop a SendGrid action into your flow and map chatbot data to email fields.
What are the benefits of connecting SendGrid to a chatbot?
Connecting a chatbot to SendGrid allows you to automate lead generation, lead nurturing, and email campaigns at scale. Email automation leads to less waiting time for your recipients, personalized emails at scale, and a higher quality of high-volume email campaigns.
Does SendGrid support sending bulk emails through a chatbot?
SendGrid doesn’t directly support sending bulk emails through chatbots. You’ll need a third-party platform like Botpress in order to automate bespoke email campaigns.
Can I personalize SendGrid emails with chatbot data?
Yes, you can personalize SendGrid emails by passing chatbot variables into SendGrid templates. This lets you send emails that reflect the user’s unique name, preferences, or recent actions.
How secure is a SendGrid integration with chatbots?
A SendGrid integration is secure when implemented correctly. SendGrid uses encryption and compliance standards like GDPR and SOC 2, but you need to store API keys safely and limit access. Using a third-party platform that follows the correct safety measures for your industry and geographic location is also a must.
Do I need coding skills to connect SendGrid with my chatbot?
You don't necessaarily need coding skills to build a SendGrid chatbot. Platforms like Botpress offer no-code SendGrid integrations, but developers can use the API for advanced customization.
Which industries use SendGrid chatbots the most?
SendGrid chatbots are commonly used in e-commerce, sales, SaaS, and customer service. They’re also used in healthcare, finance, and education for time-sensitive notifications. In short: they're useful wherever automated emails are useful.
What’s the difference between using SendGrid vs. other email providers with chatbots?
SendGrid specializes in transactional and high-volume email. Compared to general providers, it offers stronger deliverability, template control, and analytics. This means it's ideal for larger-scale email needs.
Can I track email performance when sending via chatbot?
Yes, all SendGrid emails include performance tracking. You’ll see metrics like opens, clicks, and bounces, even if the message was triggered by a chatbot. Most chatbot platforms will also provide analytics, so you can see how recipients respond.
# SendGrid Integration
## Overview
`@botpresshub/sendgrid` is an integration that allows a Botpress chatbot to send emails via the SendGrid API.
## Configuration
### Authenticating your domain (https://app.sendgrid.com/settings/sender_auth)
1. Login to the SendGrid dashboard (https://app.sendgrid.com/)
2. In the navigation bar on the left, open "Settings" submenu, click on "Sender Authentication"
3. In the center-right part of the screen, click the "Get Started" button (First domain authentication only)
- (2nd+ domain auth) Near the lower left in the "Domain Authentication" section, click "Authenticate Your Domain"
4. Select the provider for your domain, if the provider is not listed, pick "I'm Not Sure" (It's easier than "Other host" option)
- Also tested with SquareSpace Domains
5. In the "From Domain" field, enter your domain (e.g. "Botpress.com")
6. Add the DNS records in the portal of your domain provider (e.g. Cloudflare, GoDaddy, SquareSpace, etc.)
7. Check "I've added these records" & click "Verify" and wait for SendGrid to confirm it's been verified.
- If an error is still shown in spite of correctly adding the 'CNAME' DNS records to your domain provider, try removing the domain suffix from the host key. (e.g. "em1234.botpress.com" > "em1234")
8. Now you're ready to send emails with your domain. Happy Emailing!
### Acquiring an API key (https://app.sendgrid.com/settings/api_keys)
1. Login to the SendGrid dashboard (https://app.sendgrid.com/)
2. In the navigation bar on the left, open "Settings" submenu, click on "API Keys"
3. Near the top-right, click "Create API Key"
4. Give the key a name
5. Grant the key permissions with either "Full Access" or if using "Restricted Access" select the following:
- "Mail Send" (Full Access)
6. Click "Create & View"
### Setting up Webhooks (https://app.sendgrid.com/settings/mail_settings/webhook_settings)
1. Login to the SendGrid dashboard (https://app.sendgrid.com/)
2. In the navigation bar on the left, open "Settings" submenu, click on "Mail Settings"
3. In Mail Settings, click on "Event Webhooks"
4. In the center-right part of the screen, click "Create new webhook"
5. (Optional) Give the webhook a "Friendly Name" (e.g. "Botpress Bot")
6. Copy the webhook URL from the Botpress integration config & paste it into Sendgrid's "Post URL" field
7. Select the "Actions to be posted", these will be the events that the Botpress integration will receive.
1. Note: This integration doesn't support all the events yet
8. (Optional, but recommended) Enable "Signature Verification"
1. If you've enabled this, once the webhook is saved, click the cog on the webhook and click "edit"
2. Copy the "Verification key" from Sendgrid and paste it into the "Webhook Verification Key" field of the Botpress integration config
9. Click "Save" and you're ready to use the events in your Botpress bot
## Side Notes
The current implementation is limited to only sending [markdown](https://spec.commonmark.org/0.31.2/) rich text emails, though this will be expanded upon in the future.
## Resources
- https://www.twilio.com/docs/sendgrid/for-developers
- https://www.twilio.com/docs/sendgrid/api-reference
- https://www.twilio.com/docs/sendgrid/ui/account-and-settings/api-keys
- https://www.twilio.com/docs/sendgrid/ui/account-and-settings/how-to-set-up-domain-authentication