Skip to main content
Question

Question about Gmail to Zapier to Airtable connection


Hi there. I’m pretty new to Zapier, but very familiar with Airtable in Gmail.

 

In Airtable, I have a Company Table with hundreds of companies in it. The Table has a Name field, which is the company name (ebay, chevron, etc). 

 

I get a lot of company updates in Gmail. I’d like way to capture those updates in Airtable pretty easily. 

 

I think my ideal workflow is

  • Email comes in with company update.
  • I decide I want to retain the update in Airtable
  • I label the email with “Airtable Update”. That’s the zapier trigger.
  • Zapier looks at (a) the email and (b) my Name field in my Company Table and parses the email to find the company name. 
  • If Zapier finds a company name match in the email & Airtable Name field, it pastes the body of the email in a “Notes” field.  
  • If Zapier doesn’t find a company name, something else happens (like, a new record is created, or maybe it changes the gmail email Label so that I have to review the email later. 

I think one of the challenges here is comparing the email body to the Airtable Name field — that is probably pretty sophisticated. Is that possible?

 

If that is NOT possible, or not ideal, I am happy to do something else to make it easier to match the name, like create a gmail Label for the actual company’s name. Or forward the email to myself, change the subject line to just the company’s name, and then label (sounds annoying but would be fine). 

 

Thoughts?

 

At this point I’m asking this question to get a better idea of what Zapier can do, so I appreciate any help folks can give me here!

 

 

Did this topic help you find an answer to your question?

6 replies

Forum|alt.badge.img+5

Not sure if it will work but worth giving it a try:

Step 1: Set Up the Trigger

  1. Trigger App: Gmail

  2. Trigger Event: "New Labeled Email"

    • This trigger will fire whenever you label an email with "Airtable Update" in Gmail.

Step 2: Use Formatter by Zapier to Extract Company Names

  1. Action App: Formatter by Zapier

  2. Action Event: "Text" > "Extract Pattern"

    • This step will search the email body for company names that match the entries in your Airtable "Name" field.

  3. Configure the Formatter:

    • Input: Map the email body (from the Gmail trigger) to the input field in Formatter.

    • Pattern: Use a regex (regular expression) or a simple text search to extract company names. For example:

      • If your company names are simple and consistent (e.g., "Chevron", "eBay"), you can use a regex pattern like:

        (Chevron|eBay|CompanyName3|CompanyName4)

        This pattern will search for any of the listed company names in the email body.

      • If your company names are more complex, you can use a dynamic list of company names from Airtable (see Step 2a below).

  4. Output:

    • Formatter will return the extracted company name (if found) or a blank value (if no match is found).

Step 2a: Optional - Use Airtable to Dynamically Fetch Company Names

If you want to dynamically fetch company names from your Airtable "Name" field and use them in the Formatter step:

  1. Action App: Airtable

  2. Action Event: "Find Records"

    • Search your Airtable Company Table to retrieve all company names.

    • Use the results to dynamically build the regex pattern in Formatter.

  3. Combine Company Names into a Regex Pattern:

    • Use Formatter by Zapier > "Utilities" > “Line-Item to Text” to combine the company names into a single string separated by | (regex OR operator).

    • Example output:

      Chevron|eBay|CompanyName3|CompanyName4
  4. Use the Dynamic Pattern in Formatter:

    • Pass the combined company names into the Extract Pattern step in Formatter.

Step 2b: Handle No Matches

If no company name is found in the email body:

  1. Use a Filter by Zapier step to check if the extracted company name is blank.

  2. If the company name is blank:

    • Route the email to a "Review Later" label in Gmail (see Step 4 below).

    • Alternatively, create a new record in Airtable with the email body and a placeholder company name (e.g., "Unknown").

Step 3: Search for the Company in Airtable

  1. Action App: Airtable

  2. Action Event: "Find Record"

    • Use the extracted company name from Step 2 to search the "Name" field in your Airtable Company Table.

    • Configure the search to return the matching record if found 

Step 4: Update or Create Records in Airtable

  1. If a Match is Found:

    • Action App: Airtable

    • Action Event: "Update Record"

    • Map the email body to the "Notes" field in the matching Airtable record.

  2. If No Match is Found:

    • Action App: Gmail

    • Action Event: "Add label to email"

    • Change the email label to "Review Later" or another label for manual review.

    • Alternatively, you can create a new record in Airtable with the company name and email body in the "Notes" field

Test the Zap and let me know if this works! You’ll have to do some trial and error here and there but thats what zapier is about!


  • Author
  • Beginner
  • 2 replies
  • January 13, 2025

Thank you! Amazing. I’m giving it a go.

 

For step 2a, am I inserting the find record here like this: 

I think probably not, but I’m not sure where else to put your step 2a.


Forum|alt.badge.img+5
jeffstonesfca wrote:

Thank you! Amazing. I’m giving it a go.

 

For step 2a, am I inserting the find record here like this: 

I think probably not, but I’m not sure where else to put your step 2a.

Any success with it?


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7396 replies
  • January 27, 2025

Hey there, ​@jeffstonesfca 👋

It’s been a while since you posted, so I just wanted to check in—were you able to get the rest of pranayshinde’s suggested setup in place?

Want to make sure you’re all set here so if you’re stuck or have any further questions please let us know. We’d be happy to help! 🙂


  • Author
  • Beginner
  • 2 replies
  • January 27, 2025

No, it didn’t work. No biggie, I kinda gave up on Zap for now. 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7396 replies
  • January 29, 2025

Thanks for getting back to me, ​@jeffstonesfca! Sorry to hear that it didn’t work out. If you ever want to give that Zap another go, we’d be happy to help troubleshoot any issues to get it up and running! ⚡