Help

Populating Linked Field fails via Automations (due to duplicates and/or new entries)

Topic Labels: Automations
946 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Martin_Kranz
6 - Interface Innovator
6 - Interface Innovator

Hi there,
I am struggling with an issue for over a week now and decided to ask for help.
In my base, I have a linked field pointing to another table of search keywords, describing the Product on the main table.

These keywords are being populated by multiple sources, firstly being Google Vision Block that writes image keywords into a text field from where they are supposed to be added into the Keyword Fields via Automation, secondly users manually entering keywords in the Keywords field itself, and lastly users who enter keywords in a separate field called Bulk Keywords, simply because filling down a separate column by hand is much much easier than adding the same keywords in many fields which already contain information, simply because copy&paste would cause this to overwrite the existing information.

So far so good.

Up to recently, i had Zapier going merging all of these fields into the main Keyword, which was working fine but was very very slow.

I wanted to make this work within Automations, while the setup itself seems to be working as it merges the keywords when testing, it’s not performing reliably in the wild, and I can’t make out why that is.

I am getting two different errors:
Field “ :heavy_check_mark: Keywords” cannot accept the provided value.
and
Field “ :heavy_check_mark: Keywords”: cannot find matching rows for string

which both aren’t particularly helpful for trouble shooting.

I have attempted to first merge all results from the three fields into a single array via script (see attached to eliminate duplicates, as this seems to cause errors (which is funny because Zapier could just dump the same term 10x in there and would be allowed to make those updates), but also seem to get errors when adding a new term to the linked table, meaning that it’s prevented from creating a new entry in the linked table (also something zapier was allowed to do)

I am really struggling with this, also just adding the fields that need to be merged into the automation step itself separated by commas did not work and produce the same error.

Am I right in assuming that the culprit is a) duplicates b) new entries on the linked table cannot be found/created?

What would be a dependable work around?
I tried to write this script to first merge all fields into one Set, turn that into a string and pass it as output to be picked up by the Automation’s next step, but this doesn’t seem to catch duplicates from different source fields

let inputConfig = input.config();
let uni = [new Set ([inputConfig.SER]).add([inputConfig.KEY])];
let uniquevalues = [...uni[0]].join(', ').toLowerCase().replace(", ,",",").replace(",,",",").replace(", ",",");
output.set("out", uniquevalues);
console.log(uniquevalues);
0 Replies 0