GithubHelp home page GithubHelp logo

twiliodeved / twilio_sendgrid_101 Goto Github PK

View Code? Open in Web Editor NEW
3.0 6.0 0.0 14.05 MB

This workshop will help you get started with the Twilio SendGrid Mail Send API and Dynamic Templates.

License: MIT License

HTML 84.35% CSS 7.52% JavaScript 8.12%
email nodejs sendgrid sendgrid-api twilio

twilio_sendgrid_101's Introduction

Twilio SendGrid 101: An Introduction to Sending Transactional Email

Contents

Workshop description

Email is reliable, global, and offers flexibility that can't be met by other communications channels.

In this workshop, you'll learn how to implement the Twilio SendGrid Email API, and you can expect some deliverability tips to help you start sending at scale. What kind of scale? In 2022, SendGrid sent more than 1.6 trillion messages โ€” 50 billion of which were sent during the Black Friday and Cyber Monday week alone while maintaining a 99 percent delivery rate.

You'll also see how the SendGrid dynamic templating system makes it possible to personalize your messages for each customer, allowing you to build lasting connections with your audience.

Documentation and resources

The following documentation and resources will help you build upon what you learn in this workshop.

Twilio SendGrid documentation and API reference

Transactional vs Marketing email

Mail Send API quickstarts by language

API keys and environment variables

Helper libraries

Design and template documentation

Sender verification documentation

More information about Sender Identity and email authentication

Sending attachments with Node.js

Workshop outline

This outline provides abbreviated steps to help you follow along with the workshop. You can use this outline and the app in the 5K9 directory to replicate the workshop on your own.

Prerequisites and setup

  1. Sign up for a SendGrid account.
  2. Create and store an API key.
  3. Domain authentication.

Workshop steps

  • Introduction
    • Overview
      • Mail Send API
      • Transactional vs marketing email
      • Templates and personalization
      • Deliverability
    • App overview
      • Twilio SendGrid App
      • Gmail inbox
      • Running app
        • Goofy intro about 5K9
        • Show form fill and receipt of confirmation email
  • Transactional vs marketing email
    • Definitions and examples
    • 80/20 ratio for transactional messages
  • Building the app
    • Build signup-confirmation.js
      • Helper library
        • Install helpler library: npm i @sendgrid/mail
        • Import helper: const sg = require("@sendgrid/mail");
      • API keys
        • Set API key: sg.setApiKey(process.env.SENDGRID_API_KEY);
        • Create an API key in the SendGrid UI
          • Restricted access key
      • Message object
      • Send first request
      • Deliverability
        • Examine message warning
        • SPF, DKIM
        • Complete domain authentication
          • Automated security benefits
          • Send to a coworker
      • Modify code and send a second request: from: {email: "[email protected]"}
      • Show warning is gone
      • Drop full code sample
        • Callout
          • Set to address from reqData
          • Set from from process.env
      • Templates
        • Prepare code
          • Stage templateId
          • Set dynamicTemplateData from reqData
        • Build a template
          • Add template
          • Add version
            • Show premade templates
            • Design Editor benefits
            • Quick overview
            • Show modified template with dog
        • Handlebars
          • Walk handlebars examples in template
            • Variable replacement
            • Conditionals
        • Switch template version for Halloween

twilio_sendgrid_101's People

Contributors

wadethemaker avatar wadethemaker-work avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.