How do I extract specific text from an email body to use as a subject line in Zapier?
We are currently sending data to Zapier via email. Then, Zapier extracts the email address and sends it to our ticketing system as the user's email. This process initiates our helpdesk support.
How can I retrieve the text following the line "Problem?" from the body plain text, so that I can use it as the subject line for an email that is being sent through Zapier? The HTML text contains a short explanation of the issue following the "Problem?" line.
Page 1 / 1
Hi @miconib
We would need to see screenshots of the received email template to have context.
Check this help:
@miconib
Try this Zap action: Formatter > Text > Split
Split at “Problem?” then keep the last segment
ok I'm making progress, but it’s keeping everything after new phone extension
@miconib
Most of that info looks like a previous email in the thread.
You can add another Formatter > Text > Split step to
Ok, I’m sorry. I have tried this 10000 different ways I still get the same output as above it shows the output line I need, which is a new phone extension, but I don’t need anything after that.
@miconib
We would need to see updated screenshots with how your Zap steps are configured to have context.
@miconib
You need to add another Formatter step after Step 3.
You can add another Formatter > Text > Split step to
ok i put in the info, and the test on the formater work wooo hooo however it now gave me a different error on the send email :-(
@miconib
The \r indicate a return :return:]
Subject lines in emails can’t have returns.
You can add another step: Formatter > Text > Trim Whitespace
@miconib
FYI: Multiple Formatter steps can be replaced with 1 Code step to save Zap Tasks.
ok that works my god 6 steps. How would i go about doing it with one code stop lol I'm afraid to ask.
By the way THANK YOU THANK YOU
@miconib
Code is an advanced approach.
There is an AI feature in the Code step that you can try to use.
Or ask ChatGPT.
@miconib
Code is an advanced approach.
There is an AI feature in the Code step that you can try to use.
Or ask ChatGPT.
You rock man thank you so much for your help in getting me here.
I’m sorry i just realized i was trying to mark your answer as the answer and I accidentally marked my comment. I just messaged the admin to see if they can fix it. Thank you so much
I got you @miconib! I changed the best answer and passed it to Troy! Also, a big thanks to Troy for lending a hand here.
If you have any other questions, please don’t hesitate to reach out to the Community. We’re always happy to help!