Hi,
I would like to read all the pre-existing tags in my Airtable database and provide them to my information extractor node, to prevent the creation of similar tags unnecessarily. Almost all of my Airtable base’s fields are multi-select, so I would like to extract organised JSON from the red area to give to my AI node.
Do you have any idea how I could do this?
PS : I can’t put the Workflow in the message cause it’s too heavy. sry
Good news - Airtable multi-select fields come through as arrays, so you can easily extract all the tags.
When you fetch records from Airtable, your multi-select field will look something like this:
{
"Tags": ["Option1", "Option2", "Option3"]
}
To get all unique tags from all your records:
- Use an Airtable node to fetch all records
- Add a Code node with this:
const allTags = new Set();
for (const item of $input.all()) {
const tags = item.json.Tags || []; // Replace 'Tags' with your field name
tags.forEach(tag => allTags.add(tag));
}
return [{
json: {
uniqueTags: Array.from(allTags)
}
}];
This gives you a clean array of all unique tags from your database.
Reference from Airtable community: https://community.airtable.com/development-apis-11/update-a-multiple-select-field-using-airtable-api-3880
I’ve used this exact approach for AI workflows where we needed to prevent duplicate category creation. Works perfectly!
Need help integrating this with your AI node?