Help

Re: Add "is within" operator to automation conditions

2370 5
cancel
Showing results for 
Search instead for 
Did you mean: 
Christopher_Ha2
5 - Automation Enthusiast
5 - Automation Enthusiast

There is currently no way to do the following search when finding records in automations:

Where {text} is within {field}

I need this so that I can match records containing a tracking number assigned by an outside entity with incoming email messages that are entered into Airtable. I am currently using Zapier, which does this just fine, but would love to see this in Airtable natively.

6 Replies 6

Ah, just for my own curiosity may I have an example of what you’re trying to do?

It seems like the “{Field} contains {text}” condition would work in this context, but as you’ve said it doesn’t meet your needs I realize I must be not understanding something

I use airtable to track public records requests for my investigative reporting team at CBS News. I file hundreds of these requests to local governments every year, and need a system like this to manage communications with the agencies.

Here’s how it works:

  1. We submit a request to an agency through a records request portal. The agency assigns a tracking number to the request, which we manually enter into the “Requests” table in our base
  2. We receive email messages in our dedicated inbox, which triggers a Zapier automation that creates a new message in an “Email messages” table in our base
  3. When a new email message record is created, an automation searches the subject and body fields for tracking numbers in the requests table
    • Ideally would be Airtable but I’m using Zapier because AFAIK this is not possible in airtable
    • If a request is found whose tracking number is in the email message, links the email message record to the request record in airtable
    • If no matching request is found, the email goes into a queue in interfaces where it is manually assigned to a request or filtered out

As of right now (and I’ve tried several times lol) I do not believe it is possible to do that tracking number search in Airtable natively. If I’m wrong, though, please do let me know because Zapier is expensive for stuff like this.

Ahhhh, yes I see what you mean about the “is within” bit now

I was trying to think of a way to do this within Airtable, but the only method I could think of would break if you got two emails in quick succession and so I passed on that

I think you could get away with doing this fully in Airtable by:

  1. Forwarding those emails you’re getting into an Outlook account
  2. Using Airtable’s “Outlook Email → When email is received” trigger
  3. Running some JavaScript to find all the requests that match

Here’s something I threw together as a quick proof of concept:
is within

Ah yes I should’ve mentioned that for us scripts are blocked by our admins. The joys of working for a large company with weird security policies…

image001.png

Hah, yes, not being able to use scripts certainly will make things interesting

I had a think about this and you could potentially do this without any scripts I believe. You’d need to create some sort of queue system to overcome that issue I mentioned above about getting two emails in quick succession

I’ll run some experiments when I’ve got the time and get back to you

Hi @Christopher_Hacker , I think I figured out how to do this entirely within Airtable

The flow would be:

  1. Email gets sent to an Outlook account
  2. Airtable automation triggers and logs the email’s subject and body
  3. Another automation then triggers and checks whether any of the existing request IDs exist within the new email’s subject and body, and if it does, it’ll link those request IDs to the email

I managed to overcome that double email worry by creating a queue system, and all of the above is done without a script

You’d end up consuming three runs every time an email gets received though, so if that’s a problem you might be out of luck