AutomationFlowsGeneral › Webhook GraphQL Data Query Workflow

Webhook GraphQL Data Query Workflow

Original n8n title: API Queries Data From Graphql

Api Queries Data From Graphql. Uses graphql. Webhook trigger; 4 nodes.

Webhook trigger★★★★☆ complexity4 nodesGraphQL
General Trigger: Webhook Nodes: 4 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "nodes": [
    {
      "name": "GraphQL",
      "type": "n8n-nodes-base.graphql",
      "position": [
        800,
        300
      ],
      "parameters": {
        "query": "=query {\n  country(code: \"{{$node[\"Webhook\"].data[\"query\"][\"code\"].toUpperCase()}}\") {\n    name\n    phone\n    emoji\n  } \n}",
        "endpoint": "https://countries.trevorblades.com/",
        "requestMethod": "GET",
        "responseFormat": "string"
      },
      "typeVersion": 1
    },
    {
      "name": "Function",
      "type": "n8n-nodes-base.function",
      "position": [
        1000,
        300
      ],
      "parameters": {
        "functionCode": "items[0].json = JSON.parse(items[0].json.data).data.country;\nreturn items;"
      },
      "typeVersion": 1
    },
    {
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "position": [
        1200,
        300
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "data",
              "value": "=The country code of {{$node[\"Function\"].data[\"name\"]}} {{$node[\"Function\"].data[\"emoji\"]}} is {{$node[\"Function\"].data[\"phone\"]}}"
            }
          ],
          "boolean": []
        },
        "keepOnlySet": true
      },
      "typeVersion": 1
    },
    {
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        600,
        300
      ],
      "parameters": {
        "path": "webhook",
        "options": {},
        "responseMode": "lastNode"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "GraphQL": {
      "main": [
        [
          {
            "node": "Function",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "GraphQL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Function": {
      "main": [
        [
          {
            "node": "Set",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Api Queries Data From Graphql. Uses graphql. Webhook trigger; 4 nodes.

Source: https://github.com/Zie619/n8n-workflows — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

Code. Uses httpRequest, graphql, stickyNote. Webhook trigger; 15 nodes.

HTTP Request, GraphQL
General

Webhook Graphql. Uses noOp, httpRequest, graphql, stickyNote. Webhook trigger; 9 nodes.

HTTP Request, GraphQL
General

A clean, extensible REST-style API routing template for n8n webhooks with up to 3 path levels. Serves API routes via Webhooks with path variables Normalizes incoming requests into "global" REQUEST and

General

PUQ Docker NextCloud deploy. Uses respondToWebhook, stickyNote, httpRequest, ssh. Webhook trigger; 44 nodes.

HTTP Request, Ssh
General

puq-docker-immich-deploy. Uses respondToWebhook, ssh, stickyNote. Webhook trigger; 35 nodes.

Ssh