GithubHelp home page GithubHelp logo

actions-email's Introduction

Twilio SendGrid Send an Email GitHub Action

Send an Email from GitHub Actions.

Prerequisites

Usage

  1. Create an API Key to access the API.

  2. Store the key in SENDGRID_API_KEY

  3. Create an Unsubscribe Group for the email receipents to unsubscribe from. This can be done here (https://app.sendgrid.com/suppressions/group_unsubscribes) and documentation here (https://sendgrid.com/docs/ui/sending-email/group-unsubscribes/#gatsby-focus-wrapper)

  4. (Optional) Create an Email Template here: https://mc.sendgrid.com/dynamic-templates

  5. Add the following to your workflow

- name: 'Sending Email with SendGrid'
  uses: mmeisels/action-send-an-email-@v1
  with:
    emailToAddress: '[email protected]'
    emailFromAddress: '[email protected]'
    emailBody: 'email body text - can be html also'
    unSubscribeGroupID: 'unsusbcribe group ID from step 3'
    emailTemplateID: 'Email Template ID from Step 4'
  env:
    SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }}

Inputs

emailToAddress

Required This is the Email Address you wish to send an email to

emailFromAddress

Required This is the Email Address you wish to send an email from

SENDGRID_API_KEY

Required The SendGrid API Key

emailBody

If you are not using an email template, you need to pass the email body either as text or html in the message

unSubscribeGroupID

The SendGrid Unsubscribe Group

emailTemplateID

The SendGrid Email Template ID from Step 4

Outputs

response

The Response of the Email Interaction. Emails are Async - you can review the actual email response in the SendGrid Analytics or setup a webhook.

Contributing

Third Party Licenses

This GitHub Action uses a couple of Node.js modules to work.

License and other copyright information for each module are included in the release branch of each action version under node_modules/{module}.

More information for each package can be found at https://www.npmjs.com/package/{package}

License

MIT license

actions-email's People

Contributors

mmeisels avatar

Stargazers

啊爆 avatar

Watchers

James Cloos avatar  avatar

actions-email's Issues

Cannot find module 'twilio'

Run mmeisels/[email protected]
  with:
    emailToAddress: ***
    emailFromAddress: ***
    emailBody: some email title
  env:
    SENDGRID_API_KEY: ***
internal/modules/cjs/loader.js:800
    throw err;
    ^

Error: Cannot find module 'twilio'
Require stack:
- /home/runner/work/_actions/mmeisels/actions-email/v1.1/dist/main.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
    at Function.Module._load (internal/modules/cjs/loader.js:690:27)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/runner/work/_actions/mmeisels/actions-email/v1.1/dist/main.js:3:16)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/runner/work/_actions/mmeisels/actions-email/v1.1/dist/main.js'
  ]
}

BTW: The action name listed in the market place (mmeisels/action-send-an-email-@v1) is invalid and does not match the name of the action in the marketplace (twilio-sendgrid-email).

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.