AutomationFlowsSlack & Telegram › Send Gold and Wti Price Alerts to Telegram Using the Siftingio API

Send Gold and Wti Price Alerts to Telegram Using the Siftingio API

BySiftingIO @siftingio on n8n.io

This workflow runs every 15 minutes, pulls Gold (XAUUSD) and WTI crude oil (WTIUSD) prices from the SiftingIO API, checks them against configurable thresholds (or a test mode), and sends price alert messages to a Telegram chat. Runs every 15 minutes on a schedule. Requests the…

Cron / scheduled trigger★★★★☆ complexity10 nodesHTTP RequestTelegram
Slack & Telegram Trigger: Cron / scheduled Nodes: 10 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #17650 — we link there as the canonical source.

This workflow follows the HTTP Request → Telegram recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "kjm0WTQM3an5e7Ng",
  "name": "Send gold and WTI price alerts to Telegram with SiftingIO",
  "tags": [],
  "nodes": [
    {
      "id": "4dea1c3d-8deb-413e-ac0d-6153fe76423c",
      "name": "Workflow overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -992,
        144
      ],
      "parameters": {
        "width": 526,
        "height": 548,
        "content": "## Gold & WTI price alerts \u2014 SiftingIO \u2192 Telegram\n\nMonitor **Gold (XAUUSD)** and **WTI crude oil (WTIUSD)** every 15 minutes and send Telegram alerts when your chosen thresholds are crossed.\n\n### Requirements\n- An n8n Cloud workspace\n- A SiftingIO API key\n- A Telegram bot credential\n- A Telegram chat ID\n\nThis template uses only built-in n8n nodes. No community package or hardcoded secret is required.\n\nGet a SiftingIO API key:\nhttps://sifting.io/register?utm_source=n8n&utm_medium=workflow_template&utm_campaign=commodity_price_alerts"
      },
      "typeVersion": 1
    },
    {
      "id": "eea5ea55-0412-4424-8d66-6cc6b5d470fe",
      "name": "SiftingIO setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        0
      ],
      "parameters": {
        "width": 356,
        "height": 316,
        "content": "### 1. Connect SiftingIO\n\nCreate one **HTTP Header Auth** credential:\n\n- **Header name:** `X-API-Key`\n- **Header value:** your SiftingIO API key\n\nSelect the same credential in both HTTP Request nodes:\n- **Get gold price**\n- **Get WTI price**"
      },
      "typeVersion": 1
    },
    {
      "id": "4a1517f2-6346-45ac-9426-d3c455e318a8",
      "name": "Threshold setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        0
      ],
      "parameters": {
        "width": 366,
        "height": 332,
        "content": "### 2. Configure alert thresholds\n\nOpen **Check alert thresholds**.\n\nFor the first manual test, keep:\n`TEST_MODE = true`\n\nAfter Telegram receives the test message:\n1. Set `TEST_MODE = false`\n2. Edit the Gold and WTI `above` / `below` values\n3. Save the workflow"
      },
      "typeVersion": 1
    },
    {
      "id": "79bc9d7e-b5ee-45a0-b5fd-9199764f6d2a",
      "name": "Telegram setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        0
      ],
      "parameters": {
        "width": 386,
        "height": 336,
        "content": "### 3. Connect Telegram and activate\n\n1. Select or create a Telegram bot credential\n2. Replace `REPLACE_WITH_YOUR_CHAT_ID`\n3. Click **Execute workflow** once\n4. Confirm both API requests succeed and Telegram receives the message\n5. Disable test mode, then activate the workflow\n\nThe workflow imports inactive and contains no credentials or API keys."
      },
      "typeVersion": 1
    },
    {
      "id": "cda4158e-c3f2-461e-8966-d3034c8c29c8",
      "name": "Every 15 minutes",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -384,
        480
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 15
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "1642ca28-f197-4663-b6e7-ca862b8192d8",
      "name": "Get gold price",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -96,
        368
      ],
      "parameters": {
        "url": "https://api.sifting.io/v1/last/trade/commodities/XAUUSD",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.3
    },
    {
      "id": "45f5958e-21c4-4efa-9d42-32b759f6d710",
      "name": "Get WTI price",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -96,
        608
      ],
      "parameters": {
        "url": "https://api.sifting.io/v1/last/trade/commodities/WTIUSD",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.3
    },
    {
      "id": "78268a2f-2ff4-416a-8f3e-0aacd46ef2d6",
      "name": "Wait for both prices",
      "type": "n8n-nodes-base.merge",
      "position": [
        192,
        480
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "e3337276-6d90-4d21-9221-2b4b5a17ccac",
      "name": "Check alert thresholds",
      "type": "n8n-nodes-base.code",
      "position": [
        400,
        480
      ],
      "parameters": {
        "jsCode": "// First run: keep TEST_MODE = true so Telegram receives a test message.\n// After the test succeeds, set it to false and edit the thresholds below.\nconst TEST_MODE = true;\n\nconst thresholds = {\n  XAUUSD: { label: 'Gold', above: 4000, below: 2000 },\n  WTIUSD: { label: 'WTI crude oil', above: 120, below: 40 },\n};\n\nfunction readPrice(payload) {\n  const queue = [payload];\n  while (queue.length) {\n    const current = queue.shift();\n    if (!current || typeof current !== 'object') continue;\n\n    const candidates = [\n      current.p, current.price, current.last, current.last_price,\n      current.c, current.close, current.mid, current.m\n    ];\n    for (const value of candidates) {\n      const n = Number(value);\n      if (Number.isFinite(n)) return n;\n    }\n\n    const bid = Number(current.b ?? current.bid);\n    const ask = Number(current.a ?? current.ask);\n    if (Number.isFinite(bid) && Number.isFinite(ask)) return (bid + ask) / 2;\n\n    for (const key of ['data', 'result', 'trade', 'quote']) {\n      if (current[key] && typeof current[key] === 'object') queue.push(current[key]);\n    }\n  }\n\n  throw new Error(`No numeric price found in response: ${JSON.stringify(payload)}`);\n}\n\nconst rows = [\n  { symbol: 'XAUUSD', payload: $('Get gold price').first().json },\n  { symbol: 'WTIUSD', payload: $('Get WTI price').first().json },\n];\n\nconst alerts = [];\nfor (const row of rows) {\n  const price = readPrice(row.payload);\n  const cfg = thresholds[row.symbol];\n\n  if (TEST_MODE) {\n    alerts.push({\n      symbol: row.symbol,\n      price,\n      message: `SiftingIO test alert\\n${cfg.label} (${row.symbol}): ${price}\\nUTC: ${new Date().toISOString()}`\n    });\n    continue;\n  }\n\n  if (price >= cfg.above) {\n    alerts.push({\n      symbol: row.symbol,\n      price,\n      message: `${cfg.label} alert\\n${row.symbol} is ${price}, at or above ${cfg.above}.\\nUTC: ${new Date().toISOString()}`\n    });\n  } else if (price <= cfg.below) {\n    alerts.push({\n      symbol: row.symbol,\n      price,\n      message: `${cfg.label} alert\\n${row.symbol} is ${price}, at or below ${cfg.below}.\\nUTC: ${new Date().toISOString()}`\n    });\n  }\n}\n\nreturn alerts.map((alert) => ({ json: alert }));"
      },
      "typeVersion": 2
    },
    {
      "id": "a668344c-1299-4fcb-a4f3-2a7b84b123fa",
      "name": "Send Telegram alert",
      "type": "n8n-nodes-base.telegram",
      "maxTries": 3,
      "position": [
        640,
        480
      ],
      "parameters": {
        "text": "={{ $json.message }}",
        "chatId": "REPLACE_WITH_YOUR_CHAT_ID",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "retryOnFail": true,
      "typeVersion": 1.2,
      "waitBetweenTries": 1000
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "2a5586ef-f276-4150-8b9f-dad961323492",
  "nodeGroups": [],
  "connections": {
    "Get WTI price": {
      "main": [
        [
          {
            "node": "Wait for both prices",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get gold price": {
      "main": [
        [
          {
            "node": "Wait for both prices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every 15 minutes": {
      "main": [
        [
          {
            "node": "Get gold price",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get WTI price",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for both prices": {
      "main": [
        [
          {
            "node": "Check alert thresholds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check alert thresholds": {
      "main": [
        [
          {
            "node": "Send Telegram alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow runs every 15 minutes, pulls Gold (XAUUSD) and WTI crude oil (WTIUSD) prices from the SiftingIO API, checks them against configurable thresholds (or a test mode), and sends price alert messages to a Telegram chat. Runs every 15 minutes on a schedule. Requests the…

Source: https://n8n.io/workflows/17650/ — original creator credit. Request a take-down →

More Slack & Telegram workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Slack & Telegram

⚠️ Heads up: this is satire. The "Hell Yeah!" workflow is a parody of "automate your whole life with AI agents" grindset content. The API endpoints are fictional and the function nodes are illustrativ

HTTP Request, Salesforce, Telegram +4
Slack & Telegram

This workflow tracks a configurable crypto watchlist using the CoinGecko API, sends Telegram alerts when price, % change, or volume-spike conditions are met (with optional RSI filtering), optionally l

HTTP Request, Telegram, Google Sheets +1
Slack & Telegram

This workflow continuously monitors the Meta Ads Library for new creatives from a specific competitor pages, logs them into Google Sheets, and sends a concise Telegram notification with the number of

HTTP Request, Telegram, Google Sheets +1
Slack & Telegram

This n8n workflow template is designed to provide real-time alerts on new cryptocurrency exchange listings and delistings. It caters especially to crypto traders, investors, and enthusiasts who want t

Supabase, HTTP Request, Telegram +2
Slack & Telegram

&gt; n8n, Binance API, Google Sheets, Slack, Telegram, Jira & Email

HTTP Request, Google Sheets, Slack +3