Lesson 39 lessons

Connecting to External APIs

The HTTP Request node

This node is your universal connector — it can call any REST API. Set the method (GET/POST), URL, headers, and body. Most third-party services also have dedicated n8n nodes that wrap this for you (Gmail, Slack, Airtable, etc.).

Authentication methods

APIs commonly require an API key in a header, a Bearer token, or OAuth. n8n's "Credentials" system stores these securely and reuses them across workflows — never paste raw secrets directly into node fields.

Handling API responses

Use expressions like {{ $json.data.name }} in later nodes to reference fields from a previous node's response. Test with a real call first to see the exact JSON shape you're working with.

Key Takeaways

  • The HTTP Request node connects to any REST API.
  • Store API keys and tokens in n8n's Credentials system, not raw in fields.
  • Use expressions to reference data from previous nodes.
  • Always test with a real call to see the actual JSON response shape.

Connect a real external API

Add credentials for a free API (e.g., a public weather or news API) and build a workflow that fetches and displays one piece of live data.