Skip to content

Use SendGrid to send email from your SendGrid dynamic templates, filled in with your app’s data, and to add people to your SendGrid marketing lists. To connect, you need a SendGrid API key. To send email, you also need a verified sender in SendGrid, under Settings › Sender Authentication: a single sender address, or an authenticated domain.

Connect SendGrid

To connect SendGrid, you must be a project owner. Everyone on the project can use SendGrid after an owner connects it. First, create an API key in SendGrid under Settings › API Keys. Give it Full Access, or Custom Access with Mail Send, Template Engine (read), and Marketing (full). The key starts with SG., and SendGrid shows it only once.

  1. Open Project Settings › Connections, and then turn on the switch for SendGrid.

  2. In the Connect SendGrid dialog, paste the key into API key. To open SendGrid’s API keys page, click Find it beside the label. Then click Connect.

    If SendGrid is already connected in another of your apps, the dialog first lists that key. Choose Use the key from that app, or click Paste an API key to use a new key.

For more about connecting, see Connect a service.

What to ask

Ask the agent for the email or sign-up that you want, and name the SendGrid template or list that it uses. Your app can list your dynamic templates and marketing lists, send an email from a template with your app’s data or with its own subject and body, and add a person to your marketing contacts and lists.

Example request

When a person places an order, send them my Order receipt template in SendGrid from orders@example.com, filled in with their first name, the items, and the total.

Example request

Add a newsletter checkbox to the sign-up screen. When a person selects it, add their email address and name to my Newsletter list in SendGrid.

The from address must be your verified sender, or an address on your authenticated domain. Add only people who agreed to join a list. SendGrid adds a contact shortly after your app sends it, so a new contact can take a moment to show in the list.

Agent questions

If SendGrid isn’t connected, the agent asks you to connect it in a card above the message box. If you aren’t a project owner, ask one to connect SendGrid. See Connect when the agent asks.

Review

After the agent finishes, read the turn’s Summary and review its Changes. Check the affected screens in Screens, and try the change in Preview. If the change uses records or sign-in, test it with the thread’s own data in Data.

After you push a backend change, check the result in Backend.

Test with an email address that you own. To check a sign-up, find the contact in your SendGrid list.

Push

After you test the feature, push the changes to your app.

Next steps

Troubleshooting

  • The dialog says the key can’t send email: the key has no Mail Send access. In SendGrid, give the key Mail Send access or create a Full Access key, and then paste it again.
  • SendGrid refuses an email: check that the from address is your verified sender or on your authenticated domain.
  • For a key that’s refused or a connection that needs attention, see Troubleshoot connections.