Hello,
I have 9 Code steps all with the same structure as below, but with different input data and variables being used. I am triggering this zap with a webhook from TallyFy. When I triggered this zap yesterday, it proceeded to run the entire zap 6,400 times. I am thinking it may be due to not having a Callback in the last Code step. The Code step presented below is the first of nine that are identical other than inputs and variables, in order to pull out only the human readable values I need in order to store them into a document for client digestion. Can anyone give me some idea as to why the zap ran 6,400 times and how to implement the Callback in the structure below, if that is indeed the problem? HUGE THANKS.
inputData:
addrSvcs:
id: 1 required: True selected: True text: Return Service Requested value: None id: 2 selected: True text: Address Service Requested value: None id: 3 selected: True text: NCOA value: None
JavaScript Code:
var addrSvc = inputData.addrSvcs.match(/text:\s(NCOA|Return Service Requested|Address Service Requested|None)/gi);
return addrSvc.map(function(svc) {
if (addrSvc) {
var originalTxt = addrSvc.join(',');
var newText = originalTxt.replace(/text:\s/gi,'')
return {addrServices: newText};
}});
Output from Testing:
addrServices
Return Service Requested,Address Service Requested,NCOA
id: 8QscrpVth1aKNE9NKXqYC4r1nZktOUqO
runtime_meta
memory_used_mb: 72
duration_ms: 100
logs:
async: false