Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

gmail-query-builder

1.1.1 • Public • Published

gmail-query-builder

NPM version CircleCI Coverage percentage

Gmail query builder

See https://support.google.com/mail/answer/7190

Install

$ npm install gmail-query-builder --save

Usage

import QueryBuilder from 'gmail-query-builder';
 
const $q = QueryBuilder.q;
const query = $q().subject(
    $q().group('dinner', 'movie')
  ).build();
 
console.log(query);
// subject:(dinner movie)

Library on Apps Script

You can use it as a Library.

  • Script ID (Library ID) : 1eiP-uPUkgpSLncdNOABPsqBOGulOQ5GJG4YZRIOC5UnBZ6kVjfiaiGKA

appsscript.json

{
  "timeZone": "Asia/Tokyo",
  "dependencies": {
    "libraries": [{
      "userSymbol": "GmailQueryBuilder",
      "libraryId": "1eiP-uPUkgpSLncdNOABPsqBOGulOQ5GJG4YZRIOC5UnBZ6kVjfiaiGKA",
      "version": "1"
    }]
  },
  "exceptionLogging": "STACKDRIVER"
}

Code.gs:

function myFunction() {
  var $q = GmailQueryBuilder.QueryBuilder.q;
  var query = $q().subject(
    $q().group('dinner', 'movie')
  ).build();
 
  Logger.log(query);
  // subject:(dinner movie)
}

Install

npm i gmail-query-builder

DownloadsWeekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

47.2 kB

Total Files

17

Last publish

Collaborators

  • avatar