I’ve made a Scenario setup like this, Google drive (watch a specific folder) > Google Doc (Get Content of a Document) > Wordpress (Create a Post). It worked but a few things I gotta try to figure out.
How to get it to post the html of the google doc (h2, h3), for the wordpress content area
How do I create an area for the Excerpt from a google doc?
How do I create an area for the Slug from the google doc (sometimes it can be different from the title)?
How do I make it so that if I make changes to the google doc, it will update the wp post.
The Get Content of a Document module returns an array of “Structural Elements” named Content, which can be paragraphs, section breaks, tables or ToC entries. You’d need to iterate through this array and pick out the Structural Elements that apply - probably only paragraph elements.
You’d then want to map the Paragraph Style for that Structural Element to the corresponding HTML tag. For that, you could use a mapping table in a Data Store.
It’s going to be quite a bit of work … mainly because Google Docs isn’t really an HTML editor.
If you don’t have to stick with Google Docs, it would be much better (and simpler) to use a real HTML editor to create your source document.
surely there’s an easier way to just parse the text to html when it feeds it into wordpress. Google doc is easier to handle since I’m sharing that folder with a bunch of writers.
Unfortunately you can’t just parse the text to html - each Structural Element is stored separately, and each Paragraph Style is held as a separate collection. It’s not held inline, so you can’t just parse it.
It’s a feature of how the Google Docs API works - Make just presents it in the same way.
One alternative would be to use the Google Drive Download a File module. Using the Advanced Settings on that module you can make it download the file in HTML format - which you could then simply upload to WordPress.
But that file might have a lot of extra HTML tags in it - you can get a sense of what’s produced by accessing your file in a browser as https://docs.google.com/document/d/<DOCID>/export?format=html
I forgot to mention that I managed to do this through Chat GPT and it worked but it stopped after a certain amount of text. I wonder why that keeps happening? Is there a limitation on the amount of text?
this seems (https://www.make.com/en/help/app/markdown) to be able to do cleaning of the html but I can’t quite figure out how to use it with google doc to wordpress.