(For Agent Only) n8n Connection Method
Focus
Focus
Prisma AIRS

(For Agent Only) n8n Connection Method

Table of Contents


(For Agent Only) n8n Connection Method

Configure an n8n workflow as an agent target to run AI Red Teaming scans against custom AI models through webhook-based integration.
n8n is a workflow automation platform commonly used to build AI agents. A typical n8n agent uses a Chat Trigger node to receive input, routes it through an AI model node, and sends the response back through a Respond to Webhook node. The n8n connection method makes this agent a first-class target type in Prisma AIRS AI Red Teaming, so you can red team it without hand-configuring a generic REST or Streaming target.
When you select n8n as the connection method, AI Red Teaming sends attack prompts to your n8n workflow's production webhook URL using HTTP POST. Your workflow routes each prompt to the underlying AI model and returns the response. AI Red Teaming supports both REST (non-streaming) and Streaming response modes, single-turn and multi-turn conversations, and multimodal file attacks against n8n agents.
Prerequisites
Configure and publish your n8n workflow before you add it as a target in AI Red Teaming.
You also need the following:
  • An active n8n instance (cloud or self-hosted) with at least one published workflow
  • The production webhook URL from your n8n workflow
  1. After specifying Target Details, set Target Type to Agent and Connection Method to n8n.
  2. Configure Endpoint Accessibility. This field indicates if your endpoint is Public or Private (secured within a private network).
    1. Select IP Allowlist. To establish a successful connection, certain IP addresses must be allowed by your firewall. These IP addresses are region-specific, so you should allow the specific IP addresses shown in the tooltip within your interface.
    2. Select Network Channels to configure private channels for endpoint connectivity. If a network channel was previously configured, it appears as an option in a drop-down menu.
  3. Configure the n8n connection parameters.
    Each value must match the corresponding setting in your n8n workflow.
    1. For Webhook URL, enter the production webhook URL you copied from the n8n Webhook node.
    2. For Supports Streaming, choose Yes if your n8n workflow returns streaming responses, or No for standard REST responses.
      This setting must match your workflow's actual response behavior. If you enabled streaming in the Response Type field, set Supports Streaming to Yes.
    3. For Authentication, select the method that matches your n8n Webhook node configuration.
      • Header—enter the header name and secret value configured in n8n. The header name and value must match exactly.
      • Basic Auth—enter the username and password configured in n8n. AI Red Teaming encodes the credentials automatically; do not pre-encode them.
    4. Toggle Supports Multi-Turn to enable multi-turn conversation scanning.
      Multi-turn is enabled by default. When enabled, AI Red Teaming generates a stable session ID per conversation and sends it in the sessionId field, so your n8n Simple Memory node maintains context across turns. Disable this toggle only if your workflow does not include a memory node.
  4. Select Add/Verify Parameters.
    1. (Optional) Configure Supports File Upload for multimodal file attack support.
      Enable this option only if your n8n workflow includes the file extraction nodes described in n8n and AI Red Teaming Integration. When enabled, AI Red Teaming delivers attack files as base64-encoded data in the files array of the request body. The n8n workflow must decode and extract the file content before passing it to the AI model.
      The maximum supported document size is approximately 11.5 MB, determined by n8n's 16 MB webhook payload limit and base64 encoding overhead. Documents are extracted as text (image-only files are not supported).
      File attacks are not available during multi-turn scans; multi-turn scans run as text-only regardless of this setting.
    2. (Optional) Customize Request JSON to define the JSON body structure AI Red Teaming uses when sending attack prompts to your n8n webhook.
      The default request body sends the prompt in the chatInput field and the session identifier in the sessionId field. Modify this only if your n8n workflow expects a different field structure.
    3. (Optional) Customize Response JSON to specify the JSON path AI Red Teaming uses to extract the model's reply from your n8n workflow's response body.
      The default extracts the response from the top-level output field. Modify this if your workflow returns the reply under a different field name or nested path.
  5. Select Next: Advanced Configurations.
    In the Advanced Configurations page, configure Rate Limits and Guardrails/Content Filters.
  6. (Optional) Enable Rate Limits for the target endpoint.
    Rate limiting is recommended for n8n Cloud targets. When an n8n Cloud plan's concurrency limit is exceeded, requests queue rather than return a 429 error, adding latency that can cause scans to time out.
    1. Specify the Endpoint Rate Limit. This value represents the maximum number of requests per minute allowed for the endpoint.
    2. Specify the Endpoint Rate Limit Error Code.
    3. Provide a Sample Exception JSON.
  7. (Optional) Enable Guardrails/Content Filters for output guardrails or content filters on the target endpoint.
    1. Specify the Error Code for Guardrails or Content Filters.
    2. Provide a Sample Exception JSON.
    3. Select Validate Target.
      Only after a target is successfully validated, you can add target background information. If validation fails, verify that the workflow is Active, the production URL is correct, and authentication credentials match the n8n Webhook node configuration.
  8. (Mandatory) Configure Target Background.
    AI Red Teaming uses the target background to tailor attacks to the specific use case and risk profile of the AI agent under test. Target background is required for all target types.
    Target background information is mandatory for all target types.
    1. Add Industry information.
    2. Add Use Case, describing the specific role of the target, such as customer service or document processing.
    3. (Optional) Select Add Competitor to add the list of Competitors.
    4. Enable Agentic Profiling.
      Agentic Profiling in AI Red Teaming helps gather all relevant context about a target endpoint such as its business use case, background, key capabilities, technical architecture and other critical information. This is carried out by an autonomous agent probing the target endpoint with the right prompts. All information gathered through this exercise is presented as the Target's profile and is used downstream in AI Red Teaming Scans using the Agent.
  9. Select Submit.
    Once the target is created, you can start a scan or view previously created targets.