npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mailmerge-js

v1.0.24

Published

A powerful CLI for gmail automation, supercharged by AI ⚡

Downloads

72

Readme

MailMerge-JS ⚡

MailMerge-JS is a next-generation Gmail automation tool supercharged by AI. Effortlessly draft and send highly personalized templated emails without worrying about email templating and data massaging, all from your Gmail inbox.

How it Works

MailMerge-JS leverages the power of GenAI and the Gmail API to streamline the email drafting process. Write your templates in any format you prefer (HTML/Markdown/Text/Jinja) and loosely express variables and directives in pseudocode using double curly braces {{ }}. The AI will then generate the actual email content for you, synthesized against any data file format you provide.

Features

  • Bring Your Own Keys and Credentials: Maintain control over your API keys and credentials.
  • Scale: Draft and send emails at scale, perfect for large outreach campaigns.
  • Flexibility: Understands loose or missing data requirements, making it adaptable to various data sources.
  • Free and Open-Source: Completely free to use and modify.
  • OpenAI Integration: Enhances the email drafting process with AI-powered content generation.

Installation

To install MailMerge-JS, use the following commands:

npm install -g mailmerge-js
mailmerge setup

Setup will guide you through the process of setting up your MailMerge-JS environment. To get the most out of this tool, you will need an OpenAI API key and Google App credentials.

Setting up Google App Credentials

This tool requires Google App credentials to draft and send emails. Here is how you can obtain those credentials:

  1. Go to the Google Developer Console.
  2. Create a new project.
  3. Enable the Gmail API for that project.
  4. Add the following scopes to the project:
    • https://www.googleapis.com/auth/gmail.send
    • https://www.googleapis.com/auth/gmail.compose
  5. Create credentials for a desktop application.
  6. Download the JSON file

NOTICE (5/22/2024) - We used to provide a simple way to authorize via a hosted web server. This is no longer supported due to difficulties with getting Google App Approval. You will need to provide your own application credentials

Setting up OpenAI API Key

To use OpenAI features you will need an OpenAI developer API key (read more to see how you can use our tool with local LLMs)

You can sign up on OpenAI's website. Get your API key from the OpenAI API Keys page.

Setting up Local LLM with Ollama

We also support using this tool with local language models thru Ollama. For example, to compose emails using llama3, you will feed the following flag to the compose command: --renderer llama3

Install Ollama by following the instructions here.

Nunjucks (Non-AI Template Engine)

We also support a non-AI version of this tool via Nunjucks. You need to modify your contact and template files according to the Nunjucks example provided in the examples folder. To compose emails using Nunjucks, use the following flag with the compose command: --renderer nunjucks.

Quickstart

Draft personalized emails

mailmerge compose --contacts ./examples/sample-contacts.csv ./examples/outreach-template.md

Template: examples/outreach-template.md

# Subject

{{ "Insert some subject related to connecting via their company or title, whichever more appropriate" }}

# Body

Hi {{first name}},

I hope this message finds you well. I'm Bob from MailMerge-JS, a startup that's building a tool to automate email outreach.
I came across your profile and was impressed by your track record in {{ industry in company }} and wanted to show
you how our tool can help you automate {{ insert reason to use the outreach tool based on their title }}

Would you be open to a quick chat next week?

Best,
Bob @ MailMerge-JS
[https://mailmerge-js.dev](https://mailmerge-js.dev)

Contact Data: examples/sample-contacts.csv

name,email,company,position
John Doe,[email protected],Crunch Fitness,Fitness Instructor
Jane Smith,[email protected],Coca-Cola,CTO
Alice Johnson,[email protected],Microsoft,Product Manager
Bob Brown,[email protected],Bank of America,Marketing Director

Contributing

We welcome contributions! See CONTRIBUTING.md for details.

License

Licensed under the MIT License. See LICENSE for details.

Privacy

Our hosted server endpoint on the mailmerge-js.dev domain is used solely for authorizing our app against Google APIs. We do not store any data; all tokens are stored on the user side. We do not collect or store any data. The server code can be inspected in this repository.

Note: This privacy policy only applies if you are using the hosted server.

Terms of Service

The server exists to make the app more accessible for users setting up the CLI. Its purpose is to obfuscate our own credentials from abuse. We do not collect or store any data.

Note: These terms of service only apply if you are using the hosted server.


Made with ❤️ by charlesyu108 & ryanhuang519