Format Parsed Text output from Email to Telegram

When asking your question, please include:

:footprints: The steps you have taken
:camera_flash: Relevant screenshots
:link: Any links you have
[ Code { "and": "JSON", "in" : "code block"} ]
:x: Exclude Personal Information.

Hi folks!

I’m trying to retrieve the emails sent from my live chat provider (Purechat) and send them to relevant Telegram Channels. Here’s what I’ve come up with so far:

Emails from Gmail are sent to a Text Parser to convert HTML Content to Text Content → Text is sent to another Parser to strip some unwanted text → Keywords in the mail are matched with data in a Google Sheet and on successful match, sent to a router → Router sends the Text Content to Telegram channels based on filters.

This is the text that’s finally received in Telegram:

Telegram Purechat Text SS

I’m trying to format this kind of text output to at least have each of the fields in the next line (Your name, Phone, Email, etc) but unable to figure it out.

Really appreciate any insights!

One of the way can be, Split this entire text by new line. The result will carry all values in separate lines. The you can apply split and get variable functions.



Thanks for this solution Manish. I was somehow able to use a bit of this as well as your solution to another question on splitting an array into multiple rows by newline and then retrieving all the rows we want.

Thank you for helping me reach the solution, Manish :slight_smile: