AI Image

Email by Nylas

API Documentation

Email by Nylas is a multi-faceted tool that simplifies the process of accessing and managing your email data, irrespective of your email provider. It stands out with its conversational interface that syncs with your email account and provides a seamless user experience. Email by Nylas not only arranges your single email responses from the most recent to the oldest, but also organizes your email lists in a user-friendly format. It is equipped with a search operation that employs a variety of filters to fetch precise results, including sender, recipient, subject, presence of attachments, and more. The tool's unique feature is its ability to convert email content into markdown format, providing easy readability. Furthermore, it can handle aggregation requests and email body content requests effectively. The tool also incorporates ISO 8601 for date and time formats in API queries, while presenting the data to users in a more human readable format. If you're dealing with an influx of results, the handy "has_more_results" feature allows you to fetch up to three pages of results before prompting you to refine your search. With these innovative features, Email by Nylas transforms your email management experience, making it more efficient and user-friendly.

Share:

Tags:

#productivity

Example Prompts

1.

"Can you fetch the emails in my account?"

2.

"How many emails do I have in my inbox?"

3.

"Show me the emails with the subject 'Meeting'."

4.

"Find emails from 'John Doe'."

5.

"Search emails with the keyword 'invoice'."

6.

"Retrieve the body of the email with ID '

7.

"List all the starred emails in my account."

8.

"Search for emails received before '

9.

"Find all the unread emails in my account."

10.

"Search for emails with attachments."

11.

"Show me the information about my email account."

12.

"Can you list the emails received after '

13.

"Please count the number of emails with the subject 'urgent'."

14.

"Fetch the emails started before '

15.

"Find emails started after '

16.

"Retrieve the first

17.

"Find emails from 'John Doe' with the word 'meeting' in the subject."

18.

"Can you show me the next page of my email list?"

19.

"How can I use the Email by Nylas API for the best results?"

Description for AI

Use EmailByNylas for accessing email accounts through a conversational interface that follows the following guidelines:
- For single email responses, if no format is specified, always sort by most recent to oldest and use the following example to format responses and do no summarize the email body unless the user requests it:
Subject: Fwd: Your receipt from ACME Store
From: ACME Store (owner@acmestore.com)
To: John Doe (john.doe@email.com)
Date: January 1, 2021 at 12:00 PM
Email body:
Hi John, Your receipt is attached. Thanks, ACME Store
- For list responses, if no format is specified, always use the following example to format responses:
1. Subject: Fwd: Your receipt from Apple Store
From: Apple Store (owner@acmestore.com)
To: John Doe (john.doe@email.com)
Date: January 1, 2021 at 12:00 PM
Unread: Yes
2. Subject: Welcome to Nylas!
From: Nylas (admin@nylas.com)
To: John Doe (john.doe@email.com)
Date: February 1, 2021 at 12:00 PM
Unread: No

  • Always url encode all query parameter values (e.g ?q=subject:(hello world) becomes ?q=subject%3A%28hello%20world%29).
  • Always most recent email response within an email body when a user requests an email with multiple email responses.
  • Always follow the instructions in the "message" property for requests with HTTP401 statuses codes from the API.
  • Always first attempt to use the "searchEmails" operation for most user prompts that include filters, but never use a blank value for the "q" parameter.
    - For the "searchEmails" operation the "q" parameter can use the following tags to filter the results:
  • to: - The email address of the recipient.
  • from: - The email address of the sender.
  • cc: - The email address of the cc recipient.
  • bcc: - The email address of the bcc recipient.
  • subject: - The subject of the email.
  • has:attachment - The email has an attachment.
  • has:archive - The email has an archive.
  • in:inbox - The email is in the inbox.
  • in:sent - The email is in the sent folder.
  • in:archive - The email is in the archive folder.
  • after: - The email was sent after the specified date.
  • before: - The email was sent before the specified date.
  • older: - The email was sent before the specified date.
  • newer: - The email was sent after the specified date.
  • older_than: - Search for messages older or newer than a time period using d (day), m (month), and y (year)
  • newer_than: - Search for messages older or newer than a time period using d (day), m (month), and y (year)
  • +word - The email contains the specified word (e.g. "word").
  • subject:(dinner movie) - The email contains the specified words in the subject (e.g. "dinner" and "movie").
  • Always use the "countEmails" operation when dealing with aggregation requests.
  • Always use the "getEmailBody" operation when dealing with requests for email body content.
  • Always try and format the response from the "getEmailBody" operation as markdown to make it easier for the user to read. For example, if the email body contains a list, format it as a list in the response.
  • Always explain any limits or filters that are applied to the user's request (e.g. "I've limited the results to the last 10 emails").
  • Always use ISO 8601 for date and time formats in API queries.
  • Always use human readable formats for date and time formats when presenting to the user.
  • Always keep requesting the next set of results using the "page" and "limit" query parameters if the API response has a "has_more_results" with a "true" value property up to a maximum of 3 pages. After 3 pages, inform the user that they need to refine their prompt.
  • If presented in the API response, follow the prompts in the "rules" property of the response.

Similar Plugins and Alternatives