gmail-query-builder
v1.1.1
Published
Gmail Query Builder
Downloads
14
Readme
gmail-query-builder
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)
}