Skip to main content
Best answer

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


jacob-DAS
Forum|alt.badge.img

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)

Best answer by Troy Tessalone

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.

View original
Did this topic help you find an answer to your question?
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

Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 30942 replies
  • Answer
  • August 30, 2023

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.


jacob-DAS
Forum|alt.badge.img
  • Author
  • Beginner
  • 9 replies
  • August 30, 2023

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


ken.a
Forum|alt.badge.img+6
  • Zapier Staff
  • 6380 replies
  • August 31, 2023

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! 😊