Wordpress tags are driving me crazy

I want to add tags to a wordpress post, but I keep getting this error:

[400] Invalid parameter(s): tags (error code: rest_invalid_param)
tags: tags[0] is not of type integer.

I don’t understand what I need to do. I already made sure the tags exists in wp, I extracted the IDs. I tried pushing it as an array and as simple text, separated by comma. But it doesn’t work.

I am probably missing something extremely simple, but I’ve been sitting with this for hours and are about to go insane. Please help.

Hi @H_Ravn , you need to map it to the tag number. You can find the tag numbers by using search a tag or get a tag then you can map that number into the post module.

1 Like

Welcome to the Make community!

You’ll need to split the categories by comma-space so that it becomes an array.

Then, use an iterator on the array so that you can process each category at a time.

Create new category using the name.

Then, if category exists, there will be an error. Handle the error by searching for the category, and resuming with the existing category ID.

Then, aggregate the category IDs into an array using the Array Aggregator.

You can then insert the array of category IDs into the tag/category field.

Similarly, this works the same way for the Wordpress Tags field.

As you can see, comparing my screenshots to what you have done so far, you are using the wrong Aggregator.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

1 Like

Thanks. This worked.