Skip to content
Visual explainer 2h 30m to learn 5 steps

n8n connector nodes, HTTP requests and scoped credentials

Choose between a service connector and a generic HTTP request, use scoped credentials and rotate them without breaking the workflow.

By Invicly Tech, , in n8n, AI Automation and Voice Agents. About 10 minutes to read.

Topic 8 of 43

In short

n8n has ready-made connector nodes for many services and a generic HTTP Request node for the rest. Both use credentials, which n8n stores encrypted so secrets stay out of node fields. Pick the connector when it does what you need, and use scoped credentials so a leak does little harm.

Think of it like this: A connector is a ready-made key cut for one door. The HTTP Request node is a blank you cut yourself: more flexible, but you take care of the fit.

Explained simply

n8n ships with hundreds of connector nodes. A Google Calendar node, a Slack node and a Postgres node each know how to talk to one service. You choose an action such as Create event, fill a few fields, and the node builds the request for you.

Sometimes no connector has the endpoint you need. For that, n8n has the HTTP Request node. You give it a method such as GET or POST, a URL, and maybe a query or body. It works with any web API, but you must read the API documentation yourself.

Both kinds of node use credentials. A credential is a saved login or key that n8n stores encrypted. Nodes use it without showing the secret. This keeps keys out of the canvas, out of exports and out of the execution data you share.

Give each credential the least access it needs. A workflow that only reads a calendar should not hold a key that can delete events. If a key leaks, the harm stays small. And keep a plan for changing keys, because every key should be replaced one day.

Press Play on a diagram to walk through it one step at a time.

CompareConnector node or HTTP Request node
Connector node
  • Fields and options already named
  • Handles that service's paging and auth
  • Updated by n8n when the API changes
  • Limited to the actions it offers
HTTP Request node
  • Works with any REST API
  • You set method, URL, query and body
  • You read the API docs yourself
  • Needed when no connector has your endpoint
FlowRotate a credential without downtime
  1. 1
    Create new key

    In the service, with the same minimal scope

  2. 2
    Add to a new credential

    Keep the old one for now

  3. 3
    Test the node

    Run one safe call

  4. 4
    Switch nodes over

    Select the new credential

  5. 5
    Revoke old key

    Then delete the old credential

MapWhat to do with each API error
HTTP Request returns an error
  • 401 or 403
    • Stop
    • Alert the owner
    • Check the credential
  • 404
    • Treat as not found
    • Send to a review path
  • 429
    • Wait
    • Retry with backoff
  • 500 to 503
    • Retry a few times
    • Then alert

In depth

Choosing between a connector and HTTP Request

Start with the connector. It already knows the service's field names, paging and sign-in method, and n8n updates it when the service changes. You get clearer errors too.

Switch to HTTP Request when the connector does not offer your action, when you need a newer endpoint, or when you call your own service. The HTTP Request node can still use a stored credential: choose Authentication, then Predefined Credential Type for a service n8n knows, or Generic Credential Type for header, basic or bearer auth. Either way the secret stays in the credential.

  • Connector: faster to build, safer defaults
  • HTTP Request: any endpoint, more setup
  • Use a predefined credential type when one exists
  • Keep the base URL in one place, not repeated in many nodes

Scoped credentials and least privilege

Most services let you create a key with limited permissions: read-only, one calendar, one folder, or one project. Create a separate key for each workflow or purpose, and name the credential clearly, such as calendar-read-staging.

Separate keys also give you separate audit trails and a safe way to revoke one without breaking the rest. Use test accounts and test keys in your lab. Never reuse a production admin key, and never put a key into a Set node or an expression, because that value then appears in execution data.

  • One credential per purpose
  • Read-only when the workflow only reads
  • Separate staging and production keys
  • Name credentials so their scope is obvious
LayersWhere a secret may and may not live
  1. 1
    Service key vault

    Source of the key; you create and revoke it here

  2. 2
    n8n credential

    Encrypted storage; nodes use it by selection

  3. 3
    Node parameter or expression

    Never put a key here

  4. 4
    Execution data and exports

    Must hold no secret values

Testing error responses

A workflow that works once is not yet reliable. Test how the API fails. Try a wrong key to see a 401, a missing record for a 404, and a burst of calls for a 429 rate limit. Read the status code and the response body.

By default the HTTP Request node stops the workflow on a 4xx or 5xx. You can instead set the node's On Error setting to continue using the error output, and send failed items to a review path. The Retry On Fail setting retries with a wait, which suits temporary problems such as 429 or 503 but not a 401.

  • 401: key wrong or expired; do not retry
  • 404: record missing; handle as a business case
  • 429: slow down; retry with a wait
  • 5xx: service trouble; retry a few times then alert

Rotating a credential safely

Rotation is easy when you do it in the right order. First create the new key in the service with the same scope. Add it as a second credential in n8n and run one safe test call. Then switch each node to the new credential, one workflow at a time, and watch the next runs succeed. Only after that revoke the old key and delete the old credential.

If something breaks, you can switch a node back while the old key still works. That is your rollback. Write down which workflows use which credential so none is forgotten.

  • Create and test before you switch
  • Switch workflow by workflow
  • Revoke last
  • Keep a list of credential users

Learn it in 5 short steps

About 30m each. Track them with a timer in your plan.

  1. 1
    Compare connector and HTTP Request nodes~30m
  2. 2
    Create credentials with least privilege~30m
  3. 3
    Test API error responses~30m
  4. 4
    Rotate a credential safely~30m
  5. 5
    Keep secrets out of node parameters~30m

Key points

  • Use a connector node first. Use HTTP Request when the connector lacks the endpoint you need.
  • Create one credential per purpose with the smallest scope, for example read-only calendar access.
  • Never paste an API key into a node parameter, an expression or a Set node. Use the credential field.
  • Test failure cases: a 401, a 404 and a 429. Decide what the workflow does with each.
  • Rotate by adding the new credential first, testing it, switching, and only then revoking the old key.

Key terms

Tap a card to flip it. 0/5 known

Examples

Read-only lookup with a stored credential

An HTTP Request node reads a synthetic availability API. The key lives in a Header Auth credential. Prerequisite: a local mock API at the example address. Evidence: a 200 response with a list of slots. Cleanup: delete the credential after the lab.

json
{
  "method": "GET",
  "url": "https://api.example.com/v1/slots",
  "authentication": "genericCredentialType",
  "genericAuthType": "httpHeaderAuth",
  "sendQuery": true,
  "queryParameters": { "parameters": [{ "name": "date", "value": "2027-03-02" }] }
}

Rotate a key with no gap

You rotate the key for a calendar-read credential. Follow the order, and note what you expect to see at each step.

text
1. Service: create key B (read-only), keep key A
2. n8n: new credential calendar-read-b with key B
3. Run the node manually -> expect 200
4. Switch each node to calendar-read-b
5. Wait for one scheduled run -> expect success
6. Service: revoke key A
7. n8n: delete credential calendar-read-a
Rollback before step 6: select the old credential again.

Quick reference

  • Connector first; HTTP Request when no connector has the endpoint.
  • Store secrets only in n8n credentials, never in parameters, expressions or Set nodes.
  • One credential per purpose, with the smallest scope that works.
  • Test a 401, a 404 and a 429 before trusting a workflow.
  • Retry On Fail suits 429 and 5xx; do not retry a 401.
  • On Error can continue using the error output so failures go to review.
  • Rotate: create, test, switch, then revoke the old key.

Common mistakes

  • Using an admin key because it was quick. A leaked admin key can read and change everything.
  • Copying a key into a Set node or expression so it shows up in execution data and exports.
  • Revoking the old key before every workflow uses the new one, which breaks live runs.

Quick quiz

Pick an answer to see if you're right and why.

Question 1

1Which is the best reason to prefer a connector node?

Question 2

2Where should an API key be stored?

Question 3

3A call returns 429. What is a sensible response?

Question 4

4What is the safe order when rotating a key?

0/4 answered

Practice exercises

Try each one yourself first. Use the hint if you get stuck, then compare with the solution.

  1. Exercise 1easy

    Replace a key pasted in an HTTP Request node's header with a Header Auth credential.

  2. Exercise 2medium

    Call a mock API that returns 401, 404 and 429 on request. Show a different workflow path for each.

  3. Exercise 3hard

    Write a rotation runbook for a credential used by three workflows, including how you verify and how you roll back.

Check yourself

Answer in your head, reveal, then be honest with yourself.

Feel confident about this topic?

Frequently asked questions

Are n8n credentials safe?
n8n stores them encrypted using the instance encryption key. Keep that key backed up and private, or the credentials cannot be read after a restore.
Can I use the same credential in many workflows?
Yes, but then rotation affects all of them. One credential per purpose keeps changes small.
What if the connector lacks an option I need?
Use the HTTP Request node against the service's API, still with a credential.
How often should I rotate keys?
On a regular schedule your team agrees, and straight away if a key may have leaked.

Go deeper

ShareXLinkedInWhatsApp