Help

Re: Automation to auto categorize new records

695 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Gustavo_VD
6 - Interface Innovator
6 - Interface Innovator

Hi everybody,

I'm trying to create an automation that auto categorizes new records based on a Rules table.

For example:

Rules table:

 

NAME  |  CATEGORY
Uber     Transport
Airbnb   Travel
Nike     Sports

 

So when I add a record to my apps table, it checks it against the rules table and adds a category in case it finds a match.

Transactions table:

 

PAYEE              |    DATE     |     AMOUNT   |     CATEGORY
Uber Amsterdam         03/01          $40,00

 

I got close with an Automation:

Gustavo_VD_1-1677688334465.png

Gustavo_VD_2-1677688350989.png

But I could only check for the exact match of Payee on my Rules table. I'd need to check the other way around whether any of the Rules are contained in the Payee filed of the new record.

Any insights or ideas about how could I accomplish this?

3 Replies 3
Lom_Labs
7 - App Architect
7 - App Architect

Hello @Gustavo_VD , I have created an Airtable template for just this purpose and you can purchase it on Gumroad here

Let's say you have a table where each record contains text you want to find matches for like this:

Lom_Apps_0-1677556041829.png

And so whenever a new string gets added to your base, you want to check if that new string contains any of the text in the table above, and if it does, link them together:

Lom_Apps_1-1677556041965.png

This template helps you do exactly that, and you can test it before buying it!

First, check out the view of all the text that we're searching for: Text to find view
Then, check out the view of all the strings that we want to do the search through: Strings view
Finally, submit a new string to search through via this form: Form

The automation will take 1-15 seconds to trigger, so please refresh the page if you do not see any changes! You will be able to see whether the automation has ran via the "Checked" field, once the automation has ran the "Checked" field will be marked.

Here is an example:

Lom_Apps_2-1677556042324.gif

Gustavo_VD
6 - Interface Innovator
6 - Interface Innovator

Hi @Lom_Labs , thanks for sharing your template. Impressive stuff.

I'm close to finding a solution, so I can't justify buying your ready solution. For me, it's also part of the fun to try and solve the problem.

I changed my automation to the following:

Gustavo_VD_0-1677761722946.png
Basic trigger to watch for new records. I'm thinking about changing it to When Record Updated. Because when the record is created, the fields are still empty, so it doesn't find a match.

Gustavo_VD_1-1677761833320.png
Then, I grab all my Rules table. So I can iterate through it in the next step.

Gustavo_VD_2-1677761862797.png
And finally, I loop through my Rules table.

Gustavo_VD_4-1677761986828.png

I find the records that match: newly created record_ID (I just want to update the new record) AND where the Payee column matches the record in my Rules table.

Gustavo_VD_5-1677762090591.png

Gustavo_VD_7-1677762109091.png
And finally, update the record.

 

The problem is. I can't find a way to test if the previous "Find Record" returns any record. So the following action, Update Record" errors because Im trying to update it with an invalid variable.

Any hints about what could I do differently?

 

 

Gustavo_VD
6 - Interface Innovator
6 - Interface Innovator

I'm still struggling with this automation. Does anyone have any idea about how to get closer to what I'm trying to do?