Hi Team.
Quick background in case I have the totally wrong approach here. I’m trying to migrate from Integromat, but without an iterator flow control, I’ve worked out that I need to make a custom Airtable step. My JS is rusty but passable.
I tried making a custom iterator step for flow control but that didn’t work. I was able to console.log all of the array objects, but when I put $.export inside the loop, only the final value seemed to be passed to the next step. So… I found that I needed to modify an air table step to put it in a loop. And since I have to make a custom step anyway, I thought I’d just combine the two required functions into one.
I want to input an array of VideoID’s (not Airtable ID’s, but they are unique). For each value, search a table to see if contains a row with that VideoID. Pass the result into the create / update (upsert) step to either update that row, or add a new row if now row was found. I have done this many times with Integromat. I tested the configuration without an iterator in PD and it worked fine for the first array object.
I think the correct path is to publish a custom component using CLI. So I set that all up and published the tutorial component.
Then I tried to copy the Airtable list-records code from github into my own JS file, but I’m already stuck unable to publish this. I get “npm install failed” in CLI. I adjusted the imports to look like:
import commonList from “@pipedream/components/airtable/actions/common-list.mjs”
Unsure if just my syntax is wrong, or I’m on the totally wrong path.
Any guidance would be much appreciated