Automating Markdown Content Import into WordPress with SEO Metadata Handling via n8n

Hello n8n Community,

I am working on a project where I need to automate the import of blog posts written in Markdown into a WordPress site. My Markdown files contain frontmatter for SEO metadata, author, tags, etc., and I want to integrate this metadata with the Yoast SEO plugin in WordPress.

Here’s the workflow I’m envisioning:

  1. Read Markdown Files: The workflow should start by reading Markdown files from a specified source (like a local folder or cloud storage).
  2. Extract Frontmatter and Content: Next, I need to extract the SEO metadata and other frontmatter information, along with the main content from these Markdown files.
  3. Create WordPress Posts: These extracted details should then be used to create posts in WordPress, with the Markdown content being converted to HTML.
  4. Update Yoast SEO Metadata: Finally, the SEO metadata from the frontmatter should be mapped and updated in the corresponding fields of the Yoast SEO plugin in WordPress.

I have a few questions and would greatly appreciate any guidance:

  • Are there existing nodes or functions in n8n that can facilitate the reading and parsing of Markdown files, especially for extracting frontmatter?
  • What is the best way to handle the conversion of Markdown to HTML within n8n?
  • Does n8n support direct integration with the Yoast SEO plugin, or will I need to make custom API calls to WordPress? If so, any tips on how to structure these calls?
  • Are there any examples or templates of similar workflows that I could refer to?

Any advice, suggestions, or pointers to resources would be incredibly helpful as I navigate setting up this workflow.

Thank you in advance for your support and insights!

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Wil_WilOnWeb :wave:

  • Are there existing nodes or functions in n8n that can facilitate the reading and parsing of Markdown files, especially for extracting frontmatter?
  • What is the best way to handle the conversion of Markdown to HTML within n8n?

Yes! n8n has a Markdown node that helps with conversions between Markdown and HTML.

Does n8n support direct integration with the Yoast SEO plugin, or will I need to make custom API calls to WordPress? If so, any tips on how to structure these calls?

No, n8n does not have a pre-built Yoast SEO integration, but you can send arbitrary requests to the WordPress API using the HTTP Request node. HELP - Upload feature image to Post wordpress - #31 by RedPacketSec for example shows a working WordPress API request made through the HTTP Request node.

Are there any examples or templates of similar workflows that I could refer to?

Yes, check out the example approach to querying Yoast data described by @martinhache over here: