Resources · n8n integration

GraphQL n8n integrationAutomate GraphQL with n8n.

Your data sits behind one GraphQL endpoint, and n8n knows how to ask it. The GraphQL n8n integration ships one operation: it sends your query and drops the answer into a property you name. No trigger comes with it, so a schedule or another tool starts the run. Made for schema readers.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the GraphQL n8n integration actually do?

A GraphQL endpoint answers exactly the query it receives, no more and no less, and the n8n node is the client that sends that query. You hand it the endpoint URL, the query text, and the name of the property that will hold the response. Every node placed after it reads that property like any other data. One operation, one resource, no menu to explore.

Start with a watch loop. A Schedule Trigger, the node that starts a workflow at a fixed interval, fires every hour, the node asks Product Hunt for the top 5 products of the moment, and the list goes out as a Discord message. Nobody opens a dashboard, the channel carries the update.

Then the bulk load, the kind you run once and forget. Product rows leave Google Sheets, the node sends one mutation per row to Shopify to create the product and set its inventory, and the sheet stays the place where the catalog is edited. Each answer comes back into the workflow under the property you named, so the execution keeps a record of what the API replied.

Third, a reporting feed. A single query pulls yesterday's figures in one round trip, the response lands in the named property, and the rows continue into Postgres or Supabase. GraphQL earns its place here because the query decides which fields travel, so the workflow carries nothing it will never read.

The node covers one operation, which is what a generic client looks like. For a REST endpoint on the same service, or for a call this node cannot express, the HTTP Request node reaches any URL and reuses the credential, the login saved once in n8n and reused across workflows, through its predefined authentication.

Two limits deserve a mention before you build. There is no GraphQL trigger, the node that would start a workflow on its own, so the run begins with a Schedule Trigger at a fixed interval, an n8n Webhook (a URL that an outside service calls) or the trigger of another tool. And the node has no Return All or Limit switch: how many items come back is decided by the query you send. For the wider picture, the n8n review looks at the platform itself, and n8n training covers building a workflow from the first node.

Connect

How do you connect GraphQL to n8n?

  1. 01

    Match the authentication to the API

    GraphQL is a query language, not a single service, so the node leaves authentication open. None suits a public endpoint. Header Auth or Query Auth fit an API that expects a token in a header or in the URL. Basic Auth and Digest Auth take a user and a password. OAuth1 and OAuth2 cover delegated access to an account, and Custom Auth handles the APIs that mix several of these. The API documentation settles it.

  2. 02

    Save the credential once

    A credential is the block of secrets n8n stores for you. Create it in the Credentials menu, give it a name you will still recognize in six months, and every workflow on the instance can use it. The GraphQL node then offers it in its dropdown. Rotating a token later means editing that one credential, not each node that calls the API.

  3. 03

    Point the node at the endpoint

    Paste the API URL into Endpoint, in the shape of http://example.com/graphql. Set HTTP Request Method to GET or POST depending on what the API accepts, write a short query in Query, and run the node once. A readable answer under the property named in Response Data Property Name tells you the connection holds.

Actions

What the GraphQL node can do

The GraphQL node exposes one operation. For each one: the node as you configure it in n8n, the required fields, and our field notes.

01

Makes a GraphQL request and returns the received data

execute

What you see in n8n

Notes & use cases

The node sends one request to the endpoint you set and passes the answer to the next node, stored under the property name you chose.

Key parameters

  • Endpoint: the URL that accepts the queries, in the shape of http://example.com/graphql.
  • Request Format: graphql sends the query as raw text, json wraps it in a JSON body.
  • Query: the query itself, where the expression {{ $json.id }} reads a value from the incoming item.
  • Response Data Property Name: the property that receives the response, and the name later nodes will read.
Use cases
collect in one call the exact fields a weekly report needs, instead of chaining several requests.
Need help

Need help automating GraphQL with n8n?

A person reads every message.

FAQ

GraphQL and n8n: common questions

01Is the GraphQL n8n integration free?
Yes. The GraphQL node ships with n8n, so there is nothing to install and nothing extra to pay on the n8n side, on n8n Cloud as well as on a self-hosted instance running the Community Edition under its Sustainable Use licence. The workflow behaves the same way in both places, so you can prepare it on one and move it to the other without touching the query. Credentials cost nothing to create and serve every workflow on the instance. What the API behind the endpoint charges is a separate question, settled with whoever runs that API.
02Which credentials does the GraphQL node need?
It depends entirely on the API you query, and the node covers 8 possibilities: None, Basic Auth, Digest Auth, Header Auth, Query Auth, OAuth1, OAuth2 and Custom Auth. A public endpoint that asks for no identification runs on None. An API that expects a token in a header uses Header Auth, and one that expects it in the URL uses Query Auth. Basic Auth and Digest Auth take a user and a password. OAuth1 and OAuth2 apply when access is delegated to an account. Custom Auth covers the endpoints that combine several of these. The credential is created once in the Credentials menu, then selected in the node.
03What are the limits of the GraphQL node in n8n?
The node does one thing: it sends a request and returns the data it receives. There is no Return All or Limit switch, so the number of items that come back depends on the query, and paging through a long list has to be expressed in that query. The whole response lands under a single property, the one named in Response Data Property Name, and later nodes read from there. There is no GraphQL trigger either. When an endpoint sits outside what this node can express, the HTTP Request node calls any URL of the same API and can reuse the credential already saved.
04Does the GraphQL node react in real time?
No, because n8n has no GraphQL trigger node. Nothing on the endpoint side wakes a workflow up on its own, so you decide what starts it. A Schedule Trigger runs the query again at a fixed interval, every hour for a watch loop, once a day for a report. An n8n Webhook gives the workflow its own URL, and any service able to call that URL starts the run. The trigger of another tool works just as well: a new row, a new message, a new file, and the GraphQL query follows inside the same execution.
05n8n or Make for GraphQL?
It depends on where the workflow should live. n8n runs on n8n Cloud or on your own server through Docker or npm, and a self-hosted instance keeps the query and the answer inside your network, which counts when the endpoint is internal. Make is hosted by Make, with no self-hosting option, and bills per operation, so an hourly query turns into a per-operation cost on one side and a server bill on the other. Both draw the workflow visually. The honest criteria are hosting, control over the data, the cost model, and which canvas the team reads faster.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.