A long-lived project that still receives updates
Gem for interacting with the Nylas API.


>= 1.3.0
~> 1.8
~> 1.0
~> 0.41
~> 0.14.1
~> 1.0.0
~> 3.7
~> 1.24.1
~> 0.21.2
~> 3.0
~> 0.9.0


>= 2.0, < 3.0
~> 1.2, >= 1.2.1
~> 1.2.7
~> 2.0.5
 Project Readme
Aimeos logo

Nylas Ruby SDK

GitHub Workflow Status codecov

The Nylas Communications Platform allows developers to quickly build features that connect to every inbox, calendar, and contacts book in the world. Nylas makes it easy to build an integration that can be completed in days, and provides pre-built security and compliance features, and a 99.9% guaranteed uptime. Integrations with the Nylas Communications Platform are secure, reliable, and easy to use and maintain.

Nylas provides REST APIs for Email, Calendar, and Contacts, and the Ruby SDK is the quickest way to build your first integration using Ruby.

This is the GitHub repository for the Nylas Ruby SDK and is primarily for anyone who wants to make contributions to the SDK or install it from source. If you are looking to use Ruby to access the Nylas Email, Calendar, or Contacts API you should refer to our official Ruby SDK Quickstart Guide.

Here are some additional resources to help you get started:

If you have a question that needs an answer, please reach out to to get help.

⚙️ Install


  • Ruby 2.3 or above.
  • Ruby Frameworks: rest-client, json, yajl-ruby.

We support Rails 4.2 and above. A more detailed compatibility list can be found in our list of Gemfiles.


Add this line to your application's Gemfile:

gem 'nylas'

And then execute:


To run scripts that use the Nylas Ruby SDK, install the nylas gem.

gem install nylas

To install the SDK from source, clone this repo and install with bundle.

git clone && cd nylas-ruby
bundle install

Setup Ruby SDK for Development

Install RubyGems if you don't already have it:

gem install bundler
gem update --system

Install the SDK from source

bundle install

You can run tests locally using rspec:

rspec spec

MacOS 10.11 (El Capitan) Note

Apple stopped bundling OpenSSL with MacOS 10.11. However, one of the dependencies of this gem (EventMachine) requires it. If you're on El Capitan and are unable to install the gem, try running the following commands in a terminal:

sudo brew install openssl
sudo brew link openssl --force
gem install nylas

⚡️ Usage

To use this SDK, you first need to sign up for a free Nylas developer account.

Then, follow our guide to setup your first app and get your API access keys.

All of the functionality of the Nylas Communications Platform is available through the API object. To access data for an account that’s connected to Nylas, create a new API client object and pass the variables you gathered when you got your developer API keys. In the following example, replace CLIENT_ID, CLIENT_SECRET, and ACCESS_TOKEN with your values.

require 'nylas'

nylas =
    app_id: CLIENT_ID,
    app_secret: CLIENT_SECRET,
    access_token: ACCESS_TOKEN

Now, you can use nylas to access full email, calendar, and contacts functionality. For example, here is how you would print the subject line for the most recent email message to the console.

message = nylas.messages.first

To learn more about how to use the Nylas Ruby SDK, please refer to our Ruby SDK QuickStart Guide.

💙 Contributing

Please refer to Contributing for information about how to make contributions to this project. We welcome questions, bug reports, and pull requests.

Taking part in Hacktoberfest 2023 (i.e. issue is tagged with hacktoberfest)? Read our Nylas Hacktoberfest 2023 contribution guidelines.

📝 License

This project is licensed under the terms of the MIT license. Please refer to LICENSE for the full terms.