Skip to main content

Hello, y’all

How can i format a text in that way so i can remove the last 2 lines of it?!
I have an email and the last 2 lines are:
Empty line

Date of the email being sent.
I tried to use date as a separator it didn’t worked!

I am very grateful for your support!

i splited the email in the following way

[:newline:]Date

and then selected the first part! 
Thanks for the reply!! @Danvers


Hi @dzlatan 

It sounds like you’re using the Split text function of the Formatter app to split the body of text so that it removes the date at the end, is that right? It’s a tricky one because obviously there could be a new line anywhere in the email, so you don’t want to split the text based on that. 

 

Is the date in the email always the date that the email is sent through the Zap? If so, it should be possible to do this, but it’s a little fiddly. 

 

You would first need to add a Formatter step to the Zap - selecting the option to format dates. For the input of the step, use the text “{{zap_meta_human_now}}” (without the quotes). that will add the time/date that the step runs into the Zap. Then set up the Formatter to format the date in the exact same way as you’re seeing it in the email. The output of that Formatter step should now give you the date as it appears at the bottom of the email. 

Then add a  Formatter step, select text and then the ‘Replace’ Transform

Put your formatted date as the input to the step and then leave the ‘Replace’ field blank, that will delete any matching text that’s found. 

31801324f22bc37353473fe85f0f070e.png
(View image larger)

​I hope that helps, please let me know if you have any questions!


Awesome, nice work @dzlatan 🙌