On Wordpress adding Category and Tags : Bad request - please check your parameters Invalid parameter(s): categories, tags

Bad request - please check your parameters Invalid parameter(s): categories, tags

Hi @Ankur

This is a classic issue! The error message is telling you exactly what is wrong.

The Problem: The WordPress node requires the ID numbers for categories and tags, not their names as text strings.

You are sending the text “Separation Anxiety” and “Crate training, dog loneliness…”, but WordPress needs the numbers that represent them (e.g., 17, 84).

The Solution:

You need to add steps before your final WordPress node to get the IDs for your category and tag names.

  1. Split the Tags: Your Post_Tags is a single string. First, you must split it into separate items. You can do this easily in an expression using .split(‘,’).
  • Example: {{ $json.data[0].output.Post_Tags.split(‘,’) }}
  1. Find the IDs:
  • Add a WordPress node before your current one.

  • Set its Resource to Category and Operation to Get Many . Use the “Filters” to search for the category by name (using your Post_Category input). This will return the category’s ID.

  • Do the same for Tags. You may need to loop through the split tags to get the ID for each one.

  1. Use the IDs:
  • In your final WordPress node (the one that is failing), use the IDs you found in the previous steps. The input should now be an array of numbers.

This will solve the “Invalid parameter” error because you will be providing the data in the exact format WordPress requires.

If you found this helpful, please mark it as the solution and give it a like .