I have a table which imports the sales tickets from my Shopify site. In the output are the SKUs of the items sold. I’d like to auto-populate a new table with rows representing each SKU to remove them from another site via API.
This is a sample of the input table, listing_id is what we’re trying to make 1:many rows.
I’ve found a script “Get Single or Multiple Select Options” that gets close (I had to make listing_id a ‘multiple select’ but that’s ok, I think), in that it will output the column values like so:
But I can’t quite thread the needle on getting that to save as a new column in another table. it feels like that should be easy to add to the script but I’m not quite there. open to any solution that creates a one to many value where each SKU is it’s own row basically (the API to remove the values from the other sales solution requires you do them one at a time).
If your Shopify table has a column of SKUs, and all that needs to exist in the SKU table is one row representing each SKU, then you can create a Link to Record field in the Shopify table links to your SKU table.
Since your data is coming in through an API, meaning all fields are filled in at creation, you can use an Automation triggered when “New Shopify table record is created”
Add an Update Record step that copies the value of the plain text SKU into the Link field. Now each unique SKU will be represented in the other table.
If you have a great many number of records that need to be processed, it may be better to do this in a single manual script instead of an Automation as bases only have a limited number of Automation runs each month.