auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps) => {
}
// Take the HTTP payload, assumed to be a JavaScript object, and add it to an array,
// which we'll add to our Algolia index below
this.array = [event.body]
The name of your Algolia index
An array of JavaScript objects, each corresponding to a new object in your search index. It's recommended you create this array of objects in a prior code step, then select expression mode and enter a variable reference to that array here.
If an objectID property is not present on objects, automatically assign on. Defaults to true.
async
(params, auths) => {
}
const algoliasearch = require("algoliasearch");
const client = algoliasearch(auths.algolia.application_id, auths.algolia.api_key);
const index = client.initIndex(params.index);
this.objectIds = await index.saveObjects(params.objects, {
autoGenerateObjectIDIfNotExist: params.autoGenerateObjectIDIfNotExist || true
})