auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps, auths) => {
}
const algoliasearch = require("algoliasearch");
const client = algoliasearch(auths.algolia.application_id, auths.algolia.api_key);
//const index = client.initIndex('raymondcamden');
//console.log(index);
const indices = await client.listIndices();
this.myIndex = indices.items.find(i => i.name === 'raymondcamden');
console.log(this.myIndex);
auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps) => {
}
if(steps.algolia.myIndex.entries > 6000) $end(`Looks like I have data. Total was ${steps.algolia.myIndex.entries}`);
async
params => {
}
const options = {
subject: params.subject,
text: params.text,
}
if (params.html) {
options.html = params.html
}
if (params.include_collaborators) {
options.include_collaborators = params.include_collaborators
}
$send.email(options)