Issue with HTML formatting in emails

Hi everyone,

I’m currently working on automating email and I’m leveraging ChatGPT to draft the email content. Initially, I encountered a problem where the email appeared in a single line without proper formatting. To fix this, I asked ChatGPT to format the email in HTML, which solved the issue and gave me a nicely formatted email.

However, I now have a new issue: at the very beginning and end of my email, there are three apostrophes and the word “HTML” appears, which makes the email look unprofessional…

I want to keep the HTML formatting but eliminate the unwanted characters at the beginning and end. Has anyone encountered this issue before, or could you suggest a way to resolve this?

Thanks in advance for your help!

Beginning of the email:

End of the email:

Welcome to the Make community!

You can use the built-in function replace

e.g.:

{{ replace(1.html; "/(^```html\s*|\s*```$)/g"; emptystring) }}

For more information, see the function documentation in the Help Center.

Hope this helps! Let me know if there are any further questions or issues.

@samliew


P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!

3 Likes

Thank you for your quick reply Samliew! The problem is solved!
I didn’t know about this function, but I will remember it.

1 Like