{
  "name": "Google Sheets UI for n8n Workflow",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        64
      ],
      "id": "891425c8-7f09-4a7e-8b18-4ca06a0111b6",
      "name": "When clicking \u2018Execute workflow\u2019"
    },
    {
      "parameters": {
        "content": "## Google Sheets UI for Workflow Control\n\nThis n8n template provides a practical and efficient way to manage your n8n workflows using Google Sheets as a user-friendly interface. It demonstrates how to leverage a simple spreadsheet to control inputs, capture outputs, and track the processing status of individual data rows, offering a clear and visual overview of your automation tasks.\n\n### Purpose of This Template:\n\nThe primary purpose of this template is to illustrate how Google Sheets can serve as a dynamic UI for your n8n automations. It's designed for n8n users who need:\n\n- A structured method to feed specific data into their workflows.\n- The ability to selectively trigger workflow execution based on data status.\n- A centralized place to view and store workflow outputs alongside original inputs.\n- A simple, no-code solution for managing workflow data without building custom applications.\n\n### Setup Instructions:\n\nTo use this template, follow these steps:\n\n1. **Create a Google Sheet:** Set up a new Google Sheet ([see the template here](https://docs.google.com/spreadsheets/d/13xu9zKI8yDqs7971qIq9zDCBCnhYzdVq8pdtnQ9vMkI/edit?usp=sharing)) with three columns: `Color`, `Status`, and `Number`. Populate the `Color` column with some sample data (e.g., color names) and set the `Status` for the rows you want to process to `READY`.\n2. **Import the n8n Workflow:** Import this n8n template into your n8n instance.\n3. **Configure Google Sheets Nodes:**\n   - For the first Google Sheets node (Read operation), ensure it's connected to your newly created Google Sheet and configured to read rows where the `Status` column is `READY`. You will need to authenticate your Google Sheets account.\n   - For the second Google Sheets node (Update operation), ensure it's also connected to the same Google Sheet. The node should automatically map the `row_number`, `Number`, and `Status` fields from the preceding nodes.\n4. **Execute the Workflow:** Run the workflow. Observe how it reads `READY` rows, processes them (calculates string length), and updates the `Number` and `Status` columns in your Google Sheet to `DONE`.\n5. **Control Execution:** To process new data, simply add new rows to your Google Sheet and set their `Status` to `READY`. Rerunning the workflow will then only process these new entries.\n\nFor more details and context on this approach, you can refer to the related blog post [here](https://n8nplaybook.com/post/2025/06/google-sheets-as-n8n-ui/).",
        "height": 744,
        "width": 1224
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -736
      ],
      "typeVersion": 1,
      "id": "6a12b4f8-95f3-4a19-9b4c-091e1a1450a1",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        448,
        64
      ],
      "id": "3567ea8e-c780-4bd2-bc34-5a88b681d9ee",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "4a875792-664d-4c97-af72-1252c86cc64a",
              "name": "row_number",
              "value": "={{ $json.row_number }}",
              "type": "number"
            },
            {
              "id": "cd47a508-aad7-4c7c-94cc-15752e8ede05",
              "name": "Number",
              "value": "={{ $json.Color.length }}",
              "type": "number"
            },
            {
              "id": "b67e8c39-f3f9-4614-9b5d-96876cb6a669",
              "name": "Status",
              "value": "DONE",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        672,
        112
      ],
      "id": "79583f64-4c09-4210-a440-57dbba28dc3c",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "authentication": "serviceAccount",
        "documentId": {
          "__rl": true,
          "value": "13xu9zKI8yDqs7971qIq9zDCBCnhYzdVq8pdtnQ9vMkI",
          "mode": "list",
          "cachedResultName": "Tip #2: Using Google Sheets as UI for your n8n workflow",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/13xu9zKI8yDqs7971qIq9zDCBCnhYzdVq8pdtnQ9vMkI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/13xu9zKI8yDqs7971qIq9zDCBCnhYzdVq8pdtnQ9vMkI/edit#gid=0"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Status",
              "lookupValue": "READY"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.6,
      "position": [
        224,
        64
      ],
      "id": "698a0745-a4cd-4f2f-84e4-e8f5402c5215",
      "name": "Read Google Sheets",
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "authentication": "serviceAccount",
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "13xu9zKI8yDqs7971qIq9zDCBCnhYzdVq8pdtnQ9vMkI",
          "mode": "list",
          "cachedResultName": "Tip #2: Using Google Sheets as UI for your n8n workflow",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/13xu9zKI8yDqs7971qIq9zDCBCnhYzdVq8pdtnQ9vMkI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/13xu9zKI8yDqs7971qIq9zDCBCnhYzdVq8pdtnQ9vMkI/edit#gid=0"
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {},
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "Color",
              "displayName": "Color",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Number",
              "displayName": "Number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.6,
      "position": [
        672,
        -96
      ],
      "id": "79f663cc-805a-453a-9e9f-8e8114c47083",
      "name": "Update Google Sheets",
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Read Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Update Google Sheets",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Google Sheets": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "40d78166-2f0e-4117-9ade-3032661b3c7f",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "6UxyvEC8t6hfrQvm",
  "tags": []
}