Wordpress create tag/category - Error if exist

Hello Makers, I’m new with make but not new with my computer :smiley:

for a Wordpress post, I create category and tag with the AI. by using “add a tag” and "add a category, sometimes, one of them exist and it stops with a error. how to ignore the error and just do nothing, because exist alredy?

thanx for help

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.

For more information, see How to deal with WordPress errors

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.

i try to understand and test again. in the picture, where you split after the create a tag, how its handle if the tag exist, because there the error comes and stop.

here you see my current test. (first try). if tag and category not exist, runs well .. if exist it stop by tag or category.

in your picture with the split, it will be stop also before split if i understand it right.