Tracira

n8n

Use n8n's HTTP Request node to send AI outputs to Tracira, then route on the verdict with an IF node.

Use n8n's built-in HTTP Request node to send AI outputs to Tracira. Route your workflow based on the verdict using an IF node.

Add an HTTP Request node after your AI node

In your workflow, click + after the node that produces the AI output and search for HTTP Request.

Configure the node

Set these fields:

  • Method: POST
  • URL: https://tracira.com/api/logs
  • Authentication: Header Auth, Name: Authorization, Value: Bearer YOUR_TOKEN
  • Body Content Type: JSON

Set the body

Under Body Parameters, paste the JSON from below. Replace {{ $json.aiOutput }} with an expression pointing to the AI output field from the previous node.

Branch on the result

Add an IF node after the HTTP Request node:

  • Condition: {{ $json.status }} equals pass
  • True branch then continue; False branch then notify or stop

Request body

{
  "project": "support-replies",
  "output": "{{ $json.aiOutput }}",
  "task": "Tone Validator",
  "sync": true
}
{
  "project": "support-replies",
  "output": "{{ $json.aiOutput }}",
  "task": "Tone Validator"
}

Response

{
  "ok": true,
  "id": "b1c2d3e4-...",
  "status": "pass"
}
{
  "ok": true,
  "id": "b1c2d3e4-...",
  "status": "flagged",
  "verdict": {
    "pass": false,
    "rules": [{ "name": "Tone Validator", "triggered": true }]
  }
}

Attaching files

For small files, add an attachments array to the body with { "source": "url", "url": "..." } (Tracira fetches it, up to 32 MB) or { "source": "upload", "data": "<base64>" } (kept under the 4.5 MB request-body cap).

For large documents, the request body cannot carry the file. Use three HTTP Request nodes:

  1. POST https://tracira.com/api/uploads with body { "filename": "invoice.pdf" }. It returns { uploadUrl, key, contentType }.
  2. PUT the binary to {{ $json.uploadUrl }} with header Content-Type: {{ $json.contentType }} (set the node's body to n8n Binary File).
  3. POST https://tracira.com/api/logs with attachments: [{ "source": "uploaded", "key": "{{ $json.key }}" }].

Tip

In n8n, enable Always Output Data on the HTTP Request node so the IF node receives the response even on a 4xx (for example, credits exhausted). This prevents the workflow from halting silently.

On this page