Best answer

How can I use Formatter to extract part of an email body in Gmail to save in Dropbox?

  • 30 August 2023
  • 3 replies
  • 447 views

Userlevel 1
Badge

First time here - thanks in advance!

I have a zap that saves the body of select email messages in Gmail as a new text file in Dropbox. I'm trying to revise the zap with formatter so only the middle portion of the email body is saved in the text file.

The output I want is the middle portion of the body, which is between two parts of the emails that are always the same, but different than each other (StaticText1 and StaticText2 below). The output text would include numbers & punctuation, if that makes a difference. It doesn’t matter if the Static Texts are included in the output or not. 

This is the format of the email body:

(blank space)

(email signature)

(SOLID LINE)

(email forwarding info)

StaticText1

(main body of email I want)

StaticText2

(A lot more stuff I don’t need)

icon

Best answer by Troy Tessalone 30 August 2023, 16:15

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.

3 replies

Userlevel 7
Badge +14

Hi @jacob-DAS 

Good question.

Try these Zap actions:

  • Action: Formatter > Text > Split
    • Split on the first value and keep the last segment
  • Action: Formatter > Text > Split
    • Split on the second value and keep the first segment

 

NOTE: These could be done using 1 Code step.

Userlevel 1
Badge

Thanks a lot. I hadn’t thought of breaking it down into 2 actions.   

Userlevel 7
Badge +6

That’s great news @jacob-DAS! Glad to hear Troy was able to point you to the right direction!

If you have any other questions, please don’t hesitate to reach out to the Community. We’re always happy to help! 😊