Integrating GoldAPI.io with n8n
n8n is useful when you want to fetch GoldAPI.io price data inside self-hosted or cloud automation workflows.
The simplest approach is to use an HTTP Request node.
What you need
- An n8n workspace.
- A GoldAPI.io API key.
- A workflow with an
HTTP Requestnode.
Step 1: Add an HTTP Request node
Create a workflow and add:
HTTP RequestSet the method to:
GETStep 2: Configure the request
Use a URL like:
https://www.goldapi.io/api/price/XAU/USD?melt_price=false¤cy_info=falseAdd headers:
x-access-token: YOUR_API_KEY
Content-Type: application/jsonIn n8n, add these in the Headers section of the HTTP Request node.
Step 3: Use the returned fields
GoldAPI.io returns JSON fields that can be used by later n8n nodes, such as:
priceaskbidtimestamp
You can then:
- send a Slack or email alert when price crosses a threshold
- append the price to Google Sheets
- write the value to a database
- trigger another workflow or webhook
Example workflow
Schedule Triggerruns every hour.HTTP Requestcalls GoldAPI.io.IFchecks whetherpriceis above or below a target.- Slack, email, database, or webhook node sends the result onward.
Example IF condition
After the HTTP Request node, add an IF node and compare the returned price:
{{ $json.price }} > 2400You can replace 2400 with your own alert threshold.
Security note
n8n can store API credentials in the workflow or in credential storage, depending on your setup. Keep the GoldAPI.io key out of public workflow exports, restrict access to your n8n workspace, and rotate the key if it is shared accidentally.
Conclusion
n8n is a flexible automation path for GoldAPI.io. A scheduled trigger, one HTTP Request node, and a conditional step are enough to build live metals price alerts, reporting jobs, and data sync workflows.
