Help

Re: Text to Tags - script for automation

Solved
Jump to Solution
1478 0
cancel
Showing results for 
Search instead for 
Did you mean: 
jonnyelwyn
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello, I'm really enjoying building for the first time in Airtable but need some help creating a script (if that's the best approach).

I have a form where users will put in 3 comma separated words to describe the Niche they work in.

I want to turn this column into tags, so that I can group records by common Niche.

My understanding is that I need to write a script to go inside an automation that fires when that field is not empty on a new record (when the form is filled in). And takes the text, parses it based on the commas and then adds it to my Tags column which is a multi-select field.

I've tried using claude.ai and chatgpt to write the script portion but they're failing! I'm confident a real human can help me!

cheers

jonny

1 Solution

Accepted Solutions
jonnyelwyn
5 - Automation Enthusiast
5 - Automation Enthusiast

OK so humanity and chatgpt got me there in the end.

Follow the guide at the bottom of this post by Nathan Feemster: 

https://community.airtable.com/t5/show-tell/polish-your-data-with-auto-tagging/td-p/89774

Make sure to set up two separate input variables. (titlestring and recID) then here is the code I used with my niche column and tags column - replace those as you need.

// Import input variables from trigger let inputConfig = input.config();

// Clean string var str = inputConfig.titlestring.toString().toLowerCase().replace(/[^\w\d, ]/g, '');

// Tokenize var aTags = str.split(',').map(tag => tag.trim());

// Output tags as an array output.set('Tags', aTags);

See Solution in Thread

2 Replies 2
jonnyelwyn
5 - Automation Enthusiast
5 - Automation Enthusiast

OK so humanity and chatgpt got me there in the end.

Follow the guide at the bottom of this post by Nathan Feemster: 

https://community.airtable.com/t5/show-tell/polish-your-data-with-auto-tagging/td-p/89774

Make sure to set up two separate input variables. (titlestring and recID) then here is the code I used with my niche column and tags column - replace those as you need.

// Import input variables from trigger let inputConfig = input.config();

// Clean string var str = inputConfig.titlestring.toString().toLowerCase().replace(/[^\w\d, ]/g, '');

// Tokenize var aTags = str.split(',').map(tag => tag.trim());

// Output tags as an array output.set('Tags', aTags);