How to automatically parse emails with Zapier (using AI by Zapier!)

  • 19 June 2024
  • 0 replies
  • 76 views

Userlevel 4
Badge +1

Parsing data from an email is an ingenious way to work around a missing trigger or to handle leads from various sources.

While our Email Parser by Zapier action is available, it can sometimes fail if the incoming data is in an unexpected format. At support, we frequently assist users in adjusting templates or recommending more specialized parsing tools.

But what if there were a simpler method to parse the data?

The newly updated "Parse Any Data From Freeform Text in AI by Zapier" action now supports up to 10,000 characters, accommodating most parsing scenarios. The best part? You don’t need separate subscriptions—it's all included with Zapier!

Want to know how to do it?

Let’s dive in!

For this demonstration, I used the following Zap:

  • Trigger: New Email Matching Search in Gmail
  • Action: Parse Any Data From Freeform Text in AI by Zapier
  • Action: Create Record in Zapier Tables

For the trigger, we’ll want to specify a particular set of emails to trigger on. I opted here for emails only in my inbox, where the subject is “Lead data.”

Setting up the trigger with a search string

We’ll then want to select the “Parse Any Data From Freeform Text in AI by Zapier” action and provide 3 examples, and the expected data. The logic behind this is:

  • In the first field “Freeform Text Input”, I mapped the Body Plain object (1)
  • In the second field “(Example 1) Free form Text” I manually pasted an example of an incoming email (2)
  • In the third field “(Example 1) Expected Data” I created the key-value pairs
    • Important: make sure they keys (the left column) are consistent in all the examples you’ll provide
Use AI by Zapier to parse your lead data!

(Need a larger screenshot for the above? Use this link)

You can clearly see that “Example Freeform Text” examples 1, 2 and 3 are different, but I use the same keys.

Lastly, we’ll want to map the output of this step in the Create Record in Zapier Tables step:

Don’t forget to publish the Zap!

We can then publish the Zap and submit a test. This is the email that I sent:

Fun fact: I use Mimestream as my preferred email client

And while the format was quite different from the samples, we got a record created in Zapier Tables as expected:

Success!

I hope this helps!

Should you need something more tricky and specific for your use-case, consider hiring a Zapier Expert!

Last tip: want to do this with ChatGPT? @Troy Tessalone wrote a great guide on this here.

All the best,
~ Leo


0 replies

Be the first to reply!

Reply