I’m trying to create a simple workflow that stores every new mail from Venmo & Paypal to Google Sheets and for that, I need plain text, however, because Venmo and Paypal send HTML mails I cannot get that. When I tried the same workflow with Zapier it gave me a plain text from Venmo mails. Is there a way to get plain text from those emails on n8n?
Welcome to the community @Josip_Ivancevic!
Are you sure there is no plain text version of the email? I would expect that it is there but you simply have to scroll down a lot as the HTML version is so long and the fields are vertically centered. Probably easier to switch to JSON-View.
Yes, I scrolled to the middle where there is metadata, date, subject and other data but for some reason there is no plain text.
Also I tried the same workflow with my test plain text mail and it worked.
In this case, does the email did not get sent with a plain text version. So you would have to make it yourself with a HTML Extract node.
Here an example:
Thanks Jan! It worked for Venmo mails that have pure HTML as a JSON parameter, however, for Paypal mails that have binary data nested in a JSON object (as in the screenshot above) I had to write a function to extract that data to HTML, and then to plain text.
I’m pasting code snippet if anyone finds himself in the same situation as I did.
Great, thanks a lot for sharing! Very appreciated!