Expression
Expression action is a way to freely write any JavaScript logic that you need for transforming data, you can also write use Web Fetch API to fetch or send any data. Important concept in Syncmate is ctx object that is passed from action to its children and next action. If you want to pass the data to the next actions assign your data to the ctx object, for example:
ctx.computedUrl = `https://${cxx.dataFromPreviousAction}/rest/of/url`
if (Array.isArray(ctx.res.data)) {
const lastElementIdx = ctx.res.data.length - 1
ctx.lastElement = ctx.res.data[lastElementIdx]
}
// Only values stored in ctx object are passed to next actions.

Last updated