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.Download the workflow template
Download n8n-workflow.json and save it locally.
Open n8n and import
In your n8n instance:
- Go to Workflows in the sidebar
- Click + Add Workflow
- Click the ⋮ menu → Import from File
- Select the downloaded
n8n-workflow.json
Set your API key credential
The workflow uses an HTTP Request node with a header credential:
- Open the HTTP Request node
- Under Authentication, click Create New Credential
- Set Header Name:
X-API-Key - Set Header Value:
aik_basic_YOUR_KEY_HERE - Save the credential
Configure your Telegram bot (optional)
If you want Telegram alerts:
- Open the Telegram node
- Click Create New Credential
- Enter your Bot Token and Chat ID
- Customize the message template if desired
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
- Name:
3. Store Last Verdict ID
Add a n8n Static Data node (or a Set node writing to workflow static data):4. IF Node — Check for New Verdict
Add an IF node:False branch → Same verdict, stop
5. Update Stored ID
After the IF (true branch), add a Code node:6. Send Telegram Message
Add a Telegram node:- Operation: Send Message
- Chat ID:
YOUR_CHAT_ID - Text:
Response Fields Reference
| Field | Type | Description |
|---|---|---|
id | string | SHA-256[:16] deduplication key — changes on new verdict |
verdict | string | STRONG_BUY / BUY / ACCUMULATE / HOLD / REDUCE / SELL / STRONG_SELL / PENDING |
confidence | float | Judiciary composite confidence 0–100 |
regime | string | Current HMM market regime |
dark_pool | int | OTC/institutional flow score 0–100 |
rsi | float | BTC 1H RSI(14) |
ema_200 | float | BTC 1H EMA(200) |
btc_price | float | Live BTC spot price |
ghost_status | string | WAITING or IN_POSITION |
timestamp | string | ISO 8601 with Prague TZ offset |
readable_time | string | Human-readable Prague CEST/CET time |
Example: Discord Notification
Replace the Telegram node with a Discord node:- Operation: Send Message
- Message:
Example: Google Sheets Logging
Append every verdict change to a spreadsheet for historical tracking:- After the IF node (true branch), add Google Sheets → Append Row
- Map columns:
- A:
{{ $json.timestamp }} - B:
{{ $json.verdict }} - C:
{{ $json.confidence }} - D:
{{ $json.regime }} - E:
{{ $json.btc_price }} - F:
{{ $json.id }}
- A:
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| HTTP 401 | Missing or wrong API key | Check X-API-Key header value |
| HTTP 403 | Free tier key | Upgrade to Basic at aioka.io/pricing |
| HTTP 429 | Rate limit exceeded | Reduce poll frequency — 5 min is the recommended minimum |
| Duplicate alerts | Deduplication not wired | Add the IF node checking id field |
Always same id | Verdict hasn’t changed | This is expected — id only changes when AIOKA issues a new ruling |