AutomationFlowsGeneral › N8n-3-41: Graphql

N8n-3-41: Graphql

n8n-3-41: GraphQL. Uses graphql, formTrigger, form. Event-driven trigger; 5 nodes.

Event trigger★★★★☆ complexity5 nodesGraphQLForm TriggerForm
General Trigger: Event Nodes: 5 Complexity: ★★★★☆ Added:

This workflow follows the Form → Form Trigger recipe pattern — see all workflows that pair these two integrations.

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
{
  "name": "n8n-3-41: GraphQL",
  "nodes": [
    {
      "parameters": {
        "requestMethod": "GET",
        "endpoint": "https://countries.trevorblades.com/",
        "query": "=query {\n  country(code: \"{{ $json['Country Code'].toUpperCase() }}\") {\n    name\n    phone\n    emoji\n  } \n}",
        "responseFormat": "string"
      },
      "name": "GraphQL",
      "type": "n8n-nodes-base.graphql",
      "position": [
        220,
        0
      ],
      "typeVersion": 1,
      "id": "d3c260c2-e309-4cef-a8f4-4dc19e051b32"
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "data",
              "value": "=The country code of {{ $json.countryEmoji }} {{ $json.countryName }} is {{ $json.countryPhone }}"
            }
          ],
          "boolean": []
        },
        "options": {}
      },
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "position": [
        640,
        0
      ],
      "typeVersion": 1,
      "id": "3e24eb6b-e820-411a-a10b-3b2e02702863"
    },
    {
      "parameters": {
        "formTitle": "County Code and Name",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Country Code",
              "placeholder": "RU",
              "requiredField": true
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        0,
        0
      ],
      "id": "df8020cd-816e-4a29-a56c-a3591f316f34",
      "name": "On form submission"
    },
    {
      "parameters": {
        "jsCode": "// \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 - \u043e\u043d\u0438 \u0443\u0436\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c, \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c JSON.parse\nconst inputData = items[0].json;\n\n// \u041f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u043d\u0443\u0436\u043d\u044b\u043c \u043f\u043e\u043b\u044f\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0447\u0435\u0447\u043d\u0443\u044e \u043d\u043e\u0442\u0430\u0446\u0438\u044e\nconst countryName = inputData.data.data.country.name;\nconst countryPhone = inputData.data.data.country.phone;\nconst countryEmoji = inputData.data.data.country.emoji;\n\n// \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438\nreturn {\n  json: {\n    countryName,\n    countryPhone,\n    countryEmoji\n  }\n};"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        440,
        0
      ],
      "id": "7096eb45-d349-4077-8f09-2b2bf363a8e5",
      "name": "Code"
    },
    {
      "parameters": {
        "operation": "completion",
        "completionTitle": "Answer",
        "completionMessage": "={{ $json.data }}",
        "options": {}
      },
      "type": "n8n-nodes-base.form",
      "typeVersion": 1,
      "position": [
        860,
        0
      ],
      "id": "d01361c4-fee8-4eff-8f90-7fa3125cc45d",
      "name": "Form"
    }
  ],
  "connections": {
    "GraphQL": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "GraphQL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Set",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set": {
      "main": [
        [
          {
            "node": "Form",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "tags": [],
  "id": "Bq2iZyOsfMpA3oBU",
  "versionId": "359ec823-e2c4-4e2f-a138-fe069833874e"
}
Pro

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

About this workflow

n8n-3-41: GraphQL. Uses graphql, formTrigger, form. Event-driven trigger; 5 nodes.

Source: https://github.com/kossakovsky/n8n-install/blob/6b223b89648511a1df779e2c60fdd6cc88f62add/n8n/backup/workflows/n8n_3_41__GraphQL.json — 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

This interactive tutorial teaches you how to build in n8n from scratch, using a live walkthrough with real-time examples. Rather than static documentation, this guided workflow explains key n8n concep

Form Trigger, Form
General

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Form Trigger, n8n, Form +2
General

Credentials Transfer. Uses form, httpRequest, executeCommand, readWriteFile. Event-driven trigger; 22 nodes.

Form, HTTP Request, Execute Command +2
General

Waitlist Form Stored In Googlesheet With Email Verification Step. Uses googleSheets, emailSend, form, stickyNote. Event-driven trigger; 19 nodes.

Google Sheets, Email Send, Form +2
General

xSend and check TTS (Text-to-speech) voice calls end email verification. Uses stickyNote, httpRequest, formTrigger, emailSend. Event-driven trigger; 19 nodes.

HTTP Request, Form Trigger, Email Send +1