Skip to main content

Overview

n8n is an open-source workflow automation platform. Connect AIOKA to Telegram, Discord, Slack, email, or any webhook destination — without writing code. Tier: Basic ($49/mo) 🔒 Endpoint: GET /v1/integrations/zapier/signal Poll interval: 5 minutes (respects 60s server-side cache)

Quick Start — Import the Template

The fastest way to get started is to import the pre-built workflow template.
1

Download the workflow template

Download n8n-workflow.json and save it locally.
2

Open n8n and import

In your n8n instance:
  1. Go to Workflows in the sidebar
  2. Click + Add Workflow
  3. Click the menu → Import from File
  4. Select the downloaded n8n-workflow.json
3

Set your API key credential

The workflow uses an HTTP Request node with a header credential:
  1. Open the HTTP Request node
  2. Under Authentication, click Create New Credential
  3. Set Header Name: X-API-Key
  4. Set Header Value: aik_basic_YOUR_KEY_HERE
  5. Save the credential
4

Configure your Telegram bot (optional)

If you want Telegram alerts:
  1. Open the Telegram node
  2. Click Create New Credential
  3. Enter your Bot Token and Chat ID
  4. Customize the message template if desired
5

Activate the workflow

Toggle the workflow to Active. It will poll AIOKA every 5 minutes and send a Telegram message whenever the verdict changes.

Manual Setup

If you prefer to build the workflow from scratch:

1. Schedule Trigger

Add a Schedule Trigger node:
  • Trigger at: Every 5 minutes

2. HTTP Request — Fetch AIOKA Signal

Add an HTTP Request node:
  • Method: GET
  • URL: https://api.aioka.io/v1/integrations/zapier/signal
  • Authentication: Header Auth
    • Name: X-API-Key
    • Value: aik_basic_YOUR_KEY

3. Store Last Verdict ID

Add a n8n Static Data node (or a Set node writing to workflow static data):
lastVerdictId = {{ $json.id }}

4. IF Node — Check for New Verdict

Add an IF node:
{{ $json.id }} is not equal to {{ $workflow.staticData.lastVerdictId }}
True branch → New verdict detected, continue to notification
False branch → Same verdict, stop

5. Update Stored ID

After the IF (true branch), add a Code node:
$workflow.staticData.lastVerdictId = $input.item.json.id;
return $input.item;

6. Send Telegram Message

Add a Telegram node:
  • Operation: Send Message
  • Chat ID: YOUR_CHAT_ID
  • Text:
🤖 AIOKA Verdict: {{ $json.verdict }} ({{ $json.confidence }}% confidence)

📊 Regime: {{ $json.regime }}
🌊 Dark Pool: {{ $json.dark_pool }}/100
📈 RSI: {{ $json.rsi }}
👻 Ghost Trader: {{ $json.ghost_status }}

🕐 {{ $json.readable_time }}

Response Fields Reference

FieldTypeDescription
idstringSHA-256[:16] deduplication key — changes on new verdict
verdictstringSTRONG_BUY / BUY / ACCUMULATE / HOLD / REDUCE / SELL / STRONG_SELL / PENDING
confidencefloatJudiciary composite confidence 0–100
regimestringCurrent HMM market regime
dark_poolintOTC/institutional flow score 0–100
rsifloatBTC 1H RSI(14)
ema_200floatBTC 1H EMA(200)
btc_pricefloatLive BTC spot price
ghost_statusstringWAITING or IN_POSITION
timestampstringISO 8601 with Prague TZ offset
readable_timestringHuman-readable Prague CEST/CET time

Example: Discord Notification

Replace the Telegram node with a Discord node:
  • Operation: Send Message
  • Message:
**AIOKA** | {{ $json.verdict }} @ {{ $json.confidence }}% confidence
Regime: {{ $json.regime }} | Dark Pool: {{ $json.dark_pool }}/100
{{ $json.readable_time }}

Example: Google Sheets Logging

Append every verdict change to a spreadsheet for historical tracking:
  1. After the IF node (true branch), add Google Sheets → Append Row
  2. Map columns:
    • A: {{ $json.timestamp }}
    • B: {{ $json.verdict }}
    • C: {{ $json.confidence }}
    • D: {{ $json.regime }}
    • E: {{ $json.btc_price }}
    • F: {{ $json.id }}

Troubleshooting

SymptomCauseFix
HTTP 401Missing or wrong API keyCheck X-API-Key header value
HTTP 403Free tier keyUpgrade to Basic at aioka.io/pricing
HTTP 429Rate limit exceededReduce poll frequency — 5 min is the recommended minimum
Duplicate alertsDeduplication not wiredAdd the IF node checking id field
Always same idVerdict hasn’t changedThis is expected — id only changes when AIOKA issues a new ruling