AutomationFlowsE-commerce › One-way Sync Shopify Customers to Baserow Using Graphql

One-way Sync Shopify Customers to Baserow Using Graphql

ByRichard Uren @elricho on n8n.io

This template extracts all customers from shopify using GraphQL and the shopify admin API and sync them into a Baserow table.

Event trigger★★★★☆ complexity6 nodesGraphQLBaserow
E-commerce Trigger: Event Nodes: 6 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #5803 — we link there as the canonical source.

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
{
  "id": "FQTzFipB62nOZedB",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Shopify Export Customers to Baserow",
  "tags": [],
  "nodes": [
    {
      "id": "40a0a103-5ea0-4fdb-a162-b9c548e2d773",
      "name": "Start Workflow",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        -120
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "50091792-007d-405d-b185-e64173dd370c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        -400
      ],
      "parameters": {
        "width": 780,
        "height": 240,
        "content": "## Sync all Shopify customers to BaseRow table\n\n### Notes\n- Update the Endpoint in GraphQL node to reflect your Shopify store.\n- Create a shopify database with a customer table in Baserow.\n- Create columns in the Baserow customer table for first_name, last_name, and email.\n- It takes about 1 second per row to insert."
      },
      "typeVersion": 1
    },
    {
      "id": "ad16cc27-d69f-449f-8852-6b828a1f7a9c",
      "name": "hasMoreCustomers",
      "type": "n8n-nodes-base.if",
      "position": [
        520,
        -120
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a31f61a1-242c-418b-8e5a-ad878a439246",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.data.customers.pageInfo.hasNextPage }}",
              "rightValue": "true"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "3bf273e2-4929-4fc2-8629-72b371bc8085",
      "name": "Shopify, customers",
      "type": "n8n-nodes-base.graphql",
      "position": [
        280,
        -120
      ],
      "parameters": {
        "query": "query ($pageSize: Int!, $cursor: String) {\n    customers(first: $pageSize, after: $cursor) {\n        nodes {\n            id\n            firstName\n            lastName\n            defaultEmailAddress {\n                emailAddress\n                marketingState\n            }\n            createdAt\n            updatedAt\n        }\n        pageInfo {\n            hasNextPage\n            endCursor\n        }\n    }\n}",
        "endpoint": "https://store99563.myshopify.com/admin/api/2025-04/graphql.json",
        "variables": "={\n    \"pageSize\": 100,\n    \"cursor\": {{ $if($json?.data?.customers?.pageInfo?.hasNextPage !== undefined, \"\\\"\" + $json.data.customers.pageInfo.endCursor + \"\\\"\", \"null\"); }}\n}",
        "authentication": "headerAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "06c8ae80-253a-4023-8fff-6be79654ef30",
      "name": "Baserow, InsertCustomer",
      "type": "n8n-nodes-base.baserow",
      "position": [
        1020,
        -140
      ],
      "parameters": {
        "tableId": 600803,
        "fieldsUi": {
          "fieldValues": [
            {
              "fieldId": 4865948,
              "fieldValue": "={{ $json.firstName }}"
            },
            {
              "fieldId": 4865951,
              "fieldValue": "={{ $json.lastName }}"
            },
            {
              "fieldId": 4865952,
              "fieldValue": "={{ $json.defaultEmailAddress.emailAddress }}"
            }
          ]
        },
        "operation": "create",
        "databaseId": 254123
      },
      "credentials": {
        "baserowApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bb4c9760-da5d-4130-8d6e-366bdc924e91",
      "name": "Split Customer List",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        800,
        -140
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "data.customers.nodes"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "85fa23f8-406b-442f-831b-7d860e462dfa",
  "connections": {
    "Start Workflow": {
      "main": [
        [
          {
            "node": "Shopify, customers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "hasMoreCustomers": {
      "main": [
        [
          {
            "node": "Split Customer List",
            "type": "main",
            "index": 0
          },
          {
            "node": "Shopify, customers",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Split Customer List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Shopify, customers": {
      "main": [
        [
          {
            "node": "hasMoreCustomers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Customer List": {
      "main": [
        [
          {
            "node": "Baserow, InsertCustomer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Baserow, InsertCustomer": {
      "main": [
        []
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

This template extracts all customers from shopify using GraphQL and the shopify admin API and sync them into a Baserow table.

Source: https://n8n.io/workflows/5803/ — original creator credit. Request a take-down →

More E-commerce workflows → · Browse all categories →

Related workflows

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

E-commerce

Shopify + Mautic. Uses shopifyTrigger, noOp, mautic, crypto. Event-driven trigger; 26 nodes.

Shopify Trigger, Mautic, Crypto +1
E-commerce

Having a seamless flow of customer data between your online store and your marketing platform is essential.

Shopify Trigger, Mautic, Crypto +1
E-commerce

Campaign tracking is pivotal; it enables marketers to evaluate the efficacy of various strategies and channels. UTM parameters are particularly essential as they provide granular details about the sou

Baserow, GraphQL
E-commerce

Many Shopify GraphQL queries have the ability to return a cursor which you can loop over, however the N8N GraphQL node does not natively have the ability to fetch pages.

GraphQL
E-commerce

📖 Description (WooCommerce Version)

Woo Commerce Trigger, Odoo