Skip to main content

Hello Zapier Community,

I'm currently working on automating the process of parsing email responses to bulk price inquiries and structuring the extracted data into Airtable records. My industry often requires sending bulk emails to request pricing information, and I'm using ChatGPT to parse these emails. However, I'm encountering a challenge with managing follow-up emails and promotional content within the same email chains, which clutters my Airtable base with redundant or irrelevant records.Here's how my current Zap is set up:

  1. Trigger: New Labeled Email in Gmail
  2. Action: Conversation in ChatGPT to parse the email
  3. Action: Run JavaScript in Code by Zapier to convert JSON to fields
  4. Action: Create a record in Airtable

The issue arises when follow-up emails or promotional messages are sent in the same email thread. I want to ensure that only the first reply related to the price inquiry from each company is recorded in Airtable, ignoring subsequent messages in the same thread.

 

Key Details:

  • Each email thread can contain multiple responses, but I only need data from the first relevant reply.
  • I have unique identifiers available such as Company Name and Product Name.

The issue I'm facing is that the current setup creates multiple records in Airtable for a single product inquiry, especially when there are follow-up emails or promotional messages in the same email chain. I'm looking for a way to link one price inquiry to one chain of emails and disregard the rest, ensuring that new records aren't created in Airtable for subsequent emails in the same chain.

Any insights or suggestions on how to achieve this would be greatly appreciated. Thank you in advance for your help!

 

BR,

Anton

Hi @Anton111 

Try adding this logic:

  • Action: Airtable - Find Record
    • Log and search by the Thread ID
      • Will be the same across Message IDs
    • Else Create record
      • Check the checkbox for “Create if not found”

Hi @Troy Tessalone appreciate your tip - I will try to test it out asap.

Upon further investigation, this is what I’ve discovered:

Apparently, the trigger step eGMAIL] is set up incorrectly. Currently, ChatGPT parses absolutely every message in the email chain, including first sent message, all followup emails, and all answers within the same chain of emails.

Each message creates a new record in Airtable, but I need to have 1 record per each quote.

After analyzing submitted records in the Airtable, it’s pretty clear that I need to set the trigger only for the first incoming message within the email chain.

Any advise on how to properly setup Gmail as a trigger are welcome!

Anton


@Anton111 

When an email is Labeled in Gmail that applies to all the messages in the email thread.

So if there is a sent email or a reply, then those automatically have the Label already.

Did you try the previously shared logic? (include again below)

 

Each Gmail trigger has a specific length of time in the past that it can "see" emails in your Gmail account. If the email in question is older than the time limit, the trigger won't be able to detect that email.

These limits are as follows:

  • New Labeled Email - Unlimited

 

Try adding this logic:

  • Action: Airtable - Find Record
    • Log and search by the Thread ID
      • Will be the same across Message IDs
    • Else Create record
      • Check the checkbox for “Create if not found”

Reply