n8n Integration

Oil Price WorkflowsWithout Writing Code

Two nodes β€” a Schedule Trigger and an HTTP Request β€” turn OilPriceAPI into a recurring price feed inside n8n. Route prices to Slack, email, Google Sheets, a database, or any of n8n's hundreds of connectors.

1. Add a Schedule Trigger

In a new workflow, add the Schedule Trigger node and set an interval of 30 minutes. A single workflow then makes 48 requests per day and 48 per day, inside the Free allowance of 50 requests per day (check the pricing page for current limits). Faster schedules may require a paid plan.

2. Add the HTTP Request node

Connect an HTTP Request node to the trigger and configure it:

  • Method: GET
  • URL: https://api.oilpriceapi.com/v1/prices/latest
  • Query parameter: by_code = BRENT_CRUDE_USD (or WTI_USD, NATURAL_GAS_USD, …)
  • Authentication: Generic Credential Type β†’ Header Auth. Create a Header Auth credential with Name Authorization and Value Token YOUR_API_KEY. Credentials are stored encrypted β€” prefer this over pasting the key into the node.

Execute the node once and you should see the price under data.price:

{
  "status": "success",
  "data": {
    "price": 86.24,
    "formatted": "$86.24",
    "currency": "USD",
    "code": "BRENT_CRUDE_USD",
    "created_at": "2026-08-10T14:22:19.000Z",
    "type": "spot_price"
  }
}

3. Or import this minimal workflow

Copy the JSON below, then in n8n use Workflow menu β†’ Import from Clipboard. It wires the two nodes for you. The Authorization header carries a YOUR_API_KEY placeholder so nothing secret lives in the JSON β€” replace it, or better, switch the node to a Header Auth credential after import:

{
  "name": "30-minute Brent price pull",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [{ "field": "minutes", "minutesInterval": 30 }]
        }
      },
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [0, 0]
    },
    {
      "parameters": {
        "url": "https://api.oilpriceapi.com/v1/prices/latest",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            { "name": "by_code", "value": "BRENT_CRUDE_USD" }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "Authorization", "value": "Token YOUR_API_KEY" }
          ]
        },
        "options": {}
      },
      "name": "Get latest price",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [220, 0]
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [{ "node": "Get latest price", "type": "main", "index": 0 }]
      ]
    }
  }
}

4. Do something with the price

From the HTTP Request node, chain any n8n node. Popular next steps:

  • IF node on {{ $json.data.price }} β†’ Slack/email alert when a threshold is crossed.
  • Google Sheets node β†’ append a row per run for a free price history.
  • Postgres/MySQL node β†’ land prices next to your own operational data.