auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps) => {
}
// I can require any npm package in code steps
const expect = require("expect")
expect(event.body).toHaveProperty('name')
// The event data (here, the HTTP request) is in the variable 'event'.
// console.log messages and other standard output appears below the step
console.log(`My name is ${event.body.name}`)
// Saving data to properties of 'this' exports the data for use in
// steps below. See https://docs.pipedream.com/workflows/steps/#step-exports
this.firstName = event.body.name.split(/\s+/)[0]
auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps) => {
}
// You can reference the first name we exported from the step above
// here. In general you reference data using 'steps.STEP_NAME.PROPERTY_NAME'
console.log(`I can reference the first name from the last step: ${steps.get_first_name.firstName}`)
async
params => {
}
const options = {
subject: params.subject,
text: params.text,
}
if (params.html) {
options.html = params.html
}
$send.email(options)