Sending email to my subscribers is done by an automation flow.
In the last couple of days paragraphs in my emails started to disappear. It changed into one large blob of text which is very annoying to read. Sorry about this!
The automation depends on the RSS-feed of WordPress, where I keep an archive of my emails. After a change of the RSS-feed, it was only returning one big blob of text, no paragraphs.
Classic Block
My RSS-feed broke when a post was using the Classic Block from the Classic Editor. When converted to the blocks in the Block Editor it worked again.
Most of my posts, I create through the WordPress REST API. This uses the Classic Block for my post. I want to use the new blocks using the WordPress REST API.
There is a function in WordPress to convert the Classic Block Post to the new Blocks. You can use this function when posts are being made through the WordPress REST API, but that involved coding. I didn’t want to follow that route. My PHP skills are not up to date anymore.
Could I change what I’m posting to the WordPress REST API?
Yes, you can! By surrounding paragraph with the special WordPress <!– wp:paragraph –>, I could post it as Blocks! By transforming paragraphs like below, I could solve it.
<p>Every Productivity book: How to finish tasks quickly!</p>
// transform to
<!-- wp:paragraph --> <p>Every Productivity book: How to finish tasks quickly!</p> <!-- /wp:paragraph -->
Zapier
I use an automation in Zapier to create a post in WordPress. I now have extended this automation by adding the Text Formatter to add this special tag to each paragraph.
The flow now looks like this:
This should save the problem for the future!