How to Clean WordPress API Data When Using Elementor in n8n?

Hello, n8n community! I hope you’re all doing well.

I have a workflow in n8n that triggers when a user sends a message via WhatsApp. The agent already has a prompt and retrieves information from my WordPress site using scraping. However, since I use Elementor, the WordPress API returns the entire content in HTML, which slows down the agent’s response time.

Is there a way to clean the data before processing it, removing unnecessary HTML tags and keeping only the relevant content?

I’d really appreciate any guidance. Thanks!

wordpress embedd html inside content, i wouldn’t use any page builder or at least only generating blocks.

Only hack could do the job (but i never tested) is to use some seo plugin like rankmath and a SEO content type structure: it should add a json tag in html output with clean text for scraping.

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