Best answer

How can I parse email subjects to create rows in Google sheets?

  • 4 December 2022
  • 7 replies
  • 183 views

Hello,

  1. I need to send zaps that create a row in Google sheet. 
  2. Colums are “email” |  “Subject”  | “Attachment”
  3. The email is always the same, it’s the system email. The subject line has 2 parts: The subject which is the same for all, and than another part of the subject line which is different in each email, and it’s the sender name. For example: subject: new form from ____ the line is the part that changes (sender name)

How do I set it in my zap trigger? 

Thank you,

Talia

icon

Best answer by franimal 20 December 2022, 19:21

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

7 replies

Userlevel 7
Badge +14

Hi @Talia 

Good question.

Try using this Zap trigger: Gmail New Attachment

 

Thanks but unfortunately it didn’t work. I need a trigger that has a sentence with a sentence that after it comes a different name. for example:

Subject:contact form from _______ the line stands for the variant that in each  subject line is different. 

Userlevel 7
Badge +14

@Talia 

The Gmail New Attachment trigger will include the Subject of the email. (see screenshot example)

 

If you are trying to parse out data from the Subject, then you can use Formatter > Text > Split

 

 

Userlevel 7
Badge +8

Hey there @Talia, Troy’s suggestion is on par for what I’d recommend as well. Were you able to give it a shot?

Unfortunately it didn’t work. Let me try to explain more:

Subject:Reservation of movie theater by John Doe

I need to separate the name John Doe because it is changed with every user. 

The zap configuration should create a row in Google Sheets with the colums: date and name (e.g. John Doe). 

date name
12/18/2022 John Doe
12/19/2022 Jane Doe

 

Thanks so much for your support and sorry for the late reply. 

Talia

Userlevel 5
Badge +7

Hi @Talia 

Hm, I’m curious if you can share with us the configuration of the action step of your Zap? Seeing how you have it set up in Google Sheets will likely provide our culprit with where you are getting stuck. 

 

Just a heads up before you post, we will need to have any personal info removed such as email, names, phone numbers. We hope to hear from you soon. 

Userlevel 3
Badge +3

Hey @Talia 


Happy to help! So, as long as the subject line stays the same (other than name) a formatter step I think would be your best bet. Rather than split text, perhaps replace?

More info on replace: https://zapier.com/blog/zapier-formatter-guide/#replace  

Looking at a test I ran here.. 

You can see you have your subject line in the input, and we are asking the replace step to find the first half of the subject “reservation of movie theater by” and replace it with a space/nothing, so basically to delete it...


(view larger)

So when you pull out everything else, that should just leave, just the part that is different (the name) like this..


(view larger)

 

You can then use the output of the formatter, in that row in google sheets


(view larger)

 

Please give that a try :) if it doesn’t work, please grab a screenshot of what is going wrong so we can troubleshoot from there