Has anyone made a workflow for deleting Woocommerce reviews?

Has anyone made a workflow for deleting Woocommerce reviews?

Hi,

I am working on a workflow that fetches all of the product reviews that I get on my webstore (Woocommerce), then processes them with an AI agent to find out which ones are more likely to be spam and in the last step it deletes them or “mark as spam”.

But this last step does not work? No mater which option I try. I checked my REST API and it is set to read/write.

Has anyone done this?

Can it be that the api endpoint should look like this?
DELETE /wp-json/wp/v2/comments/?force=true

Sadly no… same thing happens at “wp-json/wc/v2/comments/{{$json.review_id}}?force=true” than at “/wc/v3/products/reviews/{{$json.review_id}}?force=true”

the “/v3/products/reviews/{{$json.review_id}}?force=true” should be right

I would try how to delete a specific review first. Maybe with postman, or the http node.
When i have found out how to do that i would build the workflow.

Unfortunately i have no woocommerce installation at the moment where i can try it.

Maybe the documentation could help?

I’ve setup a new shop and tested it, here are the nodes for create, update and delete reviews.

Still does not work for me, same issue: Error code ECONNRESET on the last node

That sounds like a network issue, could be on the WP server side too.

I suggest testing the DELETE request with the same parameters in Postman, so you can tell if the issue is specific to n8n or to the server running WP.

I tried. Not an n8n problem as I see… as i get Error: socket hang up even on Postman

Hm, yeah then it seems to be something related to the network configuration of the server running Wordpress.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.