Skip to content
How to parse the en...
 
Notifications
Clear all

How to parse the entire email body

4 Posts
2 Users
0 Reactions
4 Views
Pranav_Ghatraju
(@pranav_ghatraju)
Posts: 2
New Member
Topic starter
 

Hello everyone,

I'm developing an auto-reply system that captures customer replies and stores them in AirTable.

When I utilize the Email module, the Text Content field produces output similar to this:

Hi Pranav,

I am looking forward to our call!

On Sat, Nov 11, 2023 at 12:38 PM Pranav Ghatraju pghatraju@gmail.com

wrote:

Yes definitely!

On Sat, Nov 11, 2023 at 12:37 PM Pranav Ghatraju pranav@integr8ai.io

wrote:
<<<BLOCKQUOTE:
Thank you, looking forward to it.
>>>

Could someone help me craft a regex expression? I need to extract only the text preceding the line "On Sat, Nov 11, 2023 at 12:38 PM Pranav Ghatraju pghatraju@gmail.com wrote:". The expression should be flexible enough to handle variations in date, time, and sender email addresses.

Thanks,
Pranav

 
Posted : 11/11/2023 5:44 pm
Donald_Mitchell
(@donald_mitchell)
Posts: 36
Eminent Member
 

Hello,

I'm not certain if this approach will suit your needs, but you might consider using a Match Pattern Text Parser module with the following pattern:
([sSrn]_?)(?=[rn]On w_, w* d{1,2}, d{4} at)

Here's how the module's options could be configured:

 
Posted : 11/11/2023 6:56 pm
Pranav_Ghatraju
(@pranav_ghatraju)
Posts: 2
New Member
Topic starter
 

Hi Donald,

Thanks for getting back to me!

Unfortunately, that didn't resolve the issue.

 
Posted : 11/11/2023 8:27 pm
Donald_Mitchell
(@donald_mitchell)
Posts: 36
Eminent Member
 

I just realized when I copied and pasted the regex, I forgot to quote it, so markdown took over. You would need to adjust the regex to work with your exact output from the email module.

 
Posted : 11/11/2023 8:42 pm
Share: