var Airtable = require('airtable');
var base = new Airtable({apiKey: process.env.airtable_crm_key}).base('app9PM447JXb83nL0');
var endpoint = require("@runkit/runkit/json-endpoint/1.0.0");
// const email = 'cothenet'
// base('People').select({
// // Selecting the first 3 records in By Tag:
// maxRecords: 3,
// view: "By Tag",
// fields: ['Priority Circle'],
// filterByFormula: 'OR({Primary Email} = \'' + email + '\', SEARCH(\''+ email +'\', {Other Emails}) != 0)'
// }).eachPage(function page(records, fetchNextPage) {
// // This function (`page`) will get called for each page of records.
// records.forEach(function(record) {
// console.log(record.fields);
// });
// // To fetch the next page of records, call `fetchNextPage`.
// // If there are more records, `page` will get called again.
// // If there are no more records, `done` will get called.
// fetchNextPage();
// }, function done(err) {
// if (err) { console.error(err); return; }
// });
endpoint(module.exports, async function(req, done)
{
done({yo: "uy"})
// var result = incomingData.body
// console.log(result)
// return result
})