To automate live gold prices in n8n, import the credential-free goldprice.dev workflow JSON, create a Header Auth credential named X-API-Key, and attach it to the HTTP Request v4.2 node. The inactive workflow calls api.goldprice.dev/v1/spot/XAU-USD-SPOT once per hour through Schedule Trigger v1.2. Hourly execution is about 720 calls in a 30-day month, within the Free tier's 5,000 calls/month. Publish it only after one successful manual run.
Get your goldprice.dev API key
Sign up for a free account at goldprice.dev/onboarding. Your dashboard shows a key starting with ga_live_. You will store it in n8n credentials in the next step, never paste it inline into a node.
The free tier includes 5,000 calls/month and gold spot in 31 currencies. No credit card required.
Import the credential-free workflow
**Download the hourly n8n workflow JSON**, then choose Import from File in n8n. It contains Schedule Trigger v1.2 and HTTP Request v4.2 nodes, is inactive by default, and contains no API key or credential binding.
Create and attach Header Auth
Create an n8n Header Auth credential. Set Name to X-API-Key and Value to your goldprice.dev key. Open Get gold price, choose Generic Credential Type → Header Auth, and select that credential. Keeping the secret in n8n credentials prevents it from appearing in exported workflow JSON.
{ "parameters": { "url": "https://api.goldprice.dev/v1/spot/XAU-USD-SPOT", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "options": { "response": { "response": { "neverError": false, "responseFormat": "autodetect" } }, "timeout": 5000 } }, "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "retryOnFail": true, "maxTries": 3, "waitBetweenTries": 2000, "onError": "continueErrorOutput"}Run it once and inspect the output
Click Execute Workflow. Confirm that Get gold price returns price, computed_at, and is_stale. Bid/ask are paid-only and may be absent. Fix any credential error before publishing. When the manual run succeeds, publish the workflow to enable the hourly schedule.
Switch currency or metal
Edit the final URL segment in Get gold price. Symbols use METAL-CURRENCY-SPOT. For multiple symbols, create input items and use https://api.goldprice.dev/v1/spot/{{ $json.symbol }} in the HTTP Request node.
[ { "symbol": "XAU-USD-SPOT" }, { "symbol": "XAU-INR-SPOT" }, { "symbol": "XAU-EUR-SPOT" }, { "symbol": "XAG-USD-SPOT" }]Expected output
{ "symbol": "XAU", "quote_currency": "USD", "unit": "troy_ounce", "contract_type": "spot", "price": "4012.75", "is_stale": false, "computed_at": "2026-08-18T08:00:00Z"}The HTTP Request node output panel shows the full JSON. Downstream nodes reference any field via expressions like {{ $json.price }} or {{ $json.computed_at }}.
Common errors
| Code | What you see | Fix |
|---|---|---|
| 401 | HTTP Request node fails with 401 Unauthorized | API key missing or invalid. Open Credentials → X-API-Key, paste a fresh key from your dashboard. Verify the credential is selected in the HTTP Request node's Authentication dropdown, Generic Credential Type → Header Auth. |
| 429 | Sporadic 429 Too Many Requests on the error output branch | Schedule cadence is too aggressive or several workflows share the same plan. Hourly is about 720 calls in 30 days; every 15 minutes is 2,880. Reduce the trigger cadence and wait for the API reset guidance before retrying. Persistent failed executions are visible through the node's error output. |
| N/A | Workflow JSON contains the API key in plaintext after export | You pasted the key into the URL or a header field instead of using a credential. Delete it, create a Header Auth credential as in step 3, and select it in the Authentication dropdown. n8n does not export credential values; inline values are exported verbatim. |
| N/A | The manual run works but the hourly workflow never runs | The imported workflow is intentionally inactive. Publish it after the manual credential test succeeds; the Schedule Trigger only fires for a published workflow. |
Going further
- Add a Postgres node after HTTP Request to insert
{symbol, price, computed_at}rows for time-series analytics - Branch on
price > thresholdvia an IF node and trigger a Slack/Discord alert when the alert fires - Loop over multiple input items to track gold, silver, and copper in one workflow
- Wire the error output to a Slack channel so 429s become visible alerts instead of silent failures