I have three code steps in Pipe Dream. Trigger, Node.js and Coda. Everytime there is a trigger event, Node.js process it and find something and store the output in variable ‘found’. If ‘found’ is 0 , I dont want to implement the third code step which is the Coda Upsert Rows. How will I do that in pipedream ? Thanks. Below is my code in Node.js
export default defineComponent({
async run({ steps, $ }) {
console.log(steps);
var found = 0;
for(var a in steps.trigger.event.body.references){
if(steps.trigger.event.body.references[a]['name'] == 'add_toCoda'){
found = 1;
}
if(found==1){
console.log('i-add');
}else{
console.log('dili i-add');
}
},
})