Skip to content

Sendgrid

Shannon Benson edited this page Jan 29, 2019 · 2 revisions

Pricing Plans

If we want to use a dedicated IP to help protect against our emails going to spam and improve deliverability, we would need the Pro plan at $79.95/month, which allows us 100,000 emails per month.

However, we probably don't need the dedicated IP. In that case, we can go for the Essentials Plan, which has 2 options.

  • $14.95/month: 40,000 emails per month
  • $29.95/month: 100,000 emails per month
  • Both options include responsive email templates, global support, and real-time analytics.

This really depends on our estimated user base. Since we could send an email report for every task completed, if there are a lot of users we could quickly surpass 40,000/month. But the smaller plan should be fine to start.


Sendgrid provides tools for creating, retrieving, and updating HTML dynamic templates (with versioning).

Creating a Dynamic Template

  1. Navigate to Sendgrid's transaction templates page and click Create Template.
  2. Add a unique template name and click Save.
  3. To begin editing the template, click Add Version.
  4. Select an editor and click Continue.
  5. Design the template, using the Handlebars.js syntax for dynamic values, e.g.

<p>{{name}} completed a task at {{company}}.</p>

Sending an Email with a Dynamic Template

  1. Set up a POST request to Sendgrid's POST /mail/send endpoint.
  2. In the request body, specify the template_id from the template you created above.
  3. Inside the personalizations array in the request body, provide a dynamic_template_data object that includes the variable names (as specified in the template) and their values.

Example Request Body:

{
  "personalizations": [
    {
      "to": [
        {
          "email": "[email protected]",
          "name": "John Doe"
        }
      ],
      "dynamic_template_data": {
        "name": "Anthony Wang",
        "company": "Starbucks"
      }
    }
  ],
  "from": {
    "email": "[email protected]",
    "name": "Sam Smith"
  },
  "template_id": "d-a6eda312ad2a4e6d876135c0e0d4bdb0"
}

More examples including full code for setting up a Sendgrid POST request with Node.js can be found here.

Developer Documentation

Mockup

Database

API

User Management

React Native

Research

Clone this wiki locally