Quick overview
This workflow accepts a competitor research request via n8n Chat, a POST webhook, or manual run, screens it with SoterAI for prompt-injection risk, gathers web intelligence, and uses Groq (via LangChain) to produce an executive dossier with anti-poisoning and DLP checks.
How it works
- Receives a research topic from the n8n Chat UI, an HTTP POST webhook, or a manual trigger and normalizes it into a consistent request payload with a session ID.
- Uses SoterAI’s inbound guard to enforce allowed research topics and block malicious or out-of-policy prompts, sending blocked requests to a SecOps alert endpoint and returning a 403 webhook response.
- For approved requests, retrieves multiple web intelligence documents and associated metadata for the research topic.
- Scans each retrieved document with SoterAI’s RAG anti-poisoning guard to quarantine indirect prompt injections and send web-poisoning alerts to a SecOps endpoint.
- Aggregates only the verified documents into a single research corpus for analysis.
- Uses a Groq-hosted Llama model through a LangChain agent (with a fee-calculation tool and short-term memory) to synthesize a structured executive competitive intelligence dossier from the verified corpus.
- Applies an outbound SoterAI DLP guard to redact sensitive data and then returns the final dossier to the webhook caller and/or the n8n Chat UI along with security metadata.
Setup
- Add SoterAI credentials for the inbound query guard, RAG anti-poisoning scanner, and outbound DLP guard.
- Add a Groq API credential for the LangChain chat model used by the research agent.
- Replace the SecOps alert HTTP endpoints (currently set to https://httpbin.org/post) with your Slack incoming webhook, SIEM, or incident-management webhook URL and adjust the payload as needed.
- If using the production webhook trigger, copy the POST webhook URL from n8n and configure your calling system to send a JSON body containing fields like researchTopic/query and optionally sessionId and targetCompany.
Requirements
- • n8n version 0.8.7 or higher
- • n8n-nodes-soterai community node installed (v0.8.7 recommended)
- • Free Groq API account (or OpenAI API key)
Customization
- • Replace the retriever node with live Tavily Search, Serper, or Firecrawl for live real-time internet scraping.
- • Connect Slack, Discord, or Notion to automatically publish executive briefs to your team channel.
- • Customize business focus areas (pricing, security compliance, APIs, customer sentiment) in the Prompt template.
Additional info
• OWASP Top 10 for LLM compliant: addresses LLM01 (Prompt Injection & Indirect Prompt Injection) and LLM06 (Sensitive Information Disclosure).
• Zero LLM token wastage: flagged attacks and poisoned web pages are quarantined before reaching the Groq model.