How add Yoast Metadata to Wordpress Post

Hello,

I would like to know what is the best way to add metadata (_yoast_wpseo_metadesc) via API to Wordpress post ?

I cannot have external access of my database so I cannot use SQL node.

In Make.com we can add custom fields in the API call but it’s look like to not working here.

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:
  • **n8n version: Version 1.36.4
  • **Database (default: SQLite): Wordpress
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • **Operating system: Windows 10

:wave: Hi @Val_G
Welcome to the n8n community!

You could try using an HTTP request node and call the WordPress POST /wp/v2/posts/<id> endpoint (details here).

Then you should pass the meta which is an object that can contain the Yoast meta.

I haven’t tested this out but it seems the best way to try.
Here’s an HTTP request node to start from:

Let me know if that helps!

Hey, thank you for try help me !

It’s not working :frowning: it’s ok for post article in wordpress but this way don’t add metadata.

I am so lost, I don’t understand. In Make I know I have to create custom fields, but here I don’t know how to do…

Hi @Val_G

I gave it a try and it seems it’s not straightforward to edit Yoast metadata via API.
Looking at their docs it seems that the APIs are read only:

The way you could do it is create your custom WordPress end point where you pass the Yoast fields with the n8n HTTP request node and then change the Yoast medatata fields within WordPress. Make.com provides a custom WordPress plugin and dedicated node that I assume does something like that.

How it helps :slight_smile: