Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

html2sendgrid

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html2sendgrid

A CLI command to publish HTML files as Dynamic Templates on Sendgrid

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

HTML2Sendgrid

NPM

A CLI command to publish HTML files as Dynamic Templates on Sendgrid.

WTF

In order to automatically publish some HTML templates to SendGrid you can use this script to:

  • scan for existing templates
  • match any existing template by name
  • create a new template if missing
  • rotate template versions (as they are limited to 300 per account)
  • create a new version and set it active

You just need to specify the sendgrid api key as an environment variable named SENDGRID_API_KEY then run the script as per instruction here below.

Usage

export SENDGRID_API_KEY=YOUR_API_KEY
npm start <HTML_DIR>

if you want to upload also some test variables

export SENDGRID_API_KEY=YOUR_API_KEY
npm start <HTML_DIR> <VARIABLES.JSON>

Max version per template

export MAX_VERSION_PER_TEMPLATE=5

If you set this variable the module will automatically rotate the versions of the template by keeping the last N versions.

This is useful because Sendgrid has a limit of 300 versions per account.

If you have multiple template within the same account you might want to limit how many versions of a template you want to keep in order to not hit this limit.

FAQs

Package last updated on 01 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc