Lookup UID and delete single row with google sheets node

I have a Google Sheet with a UID from another software in column A. Is it possible to lookup for one UID in column A that I get from my trigger node to delete this specific row afterwords? I found the lookup and the delete function in sheets node but have no clue how to combinde to get the result. Thanks for helping me. Is it possible to get the row number after lookup?

No that is currently sadly not supported.

The only thing you can do right now is to use “Read” and then query only the UID column (best in “RAW Data” mode). In a Function-Node you can search through that data to gets its index which you can then use to delete it.

Hope that helps!

ok, np. Would you be so kind to give me an example for the function node? have no clue how I can get the row index…

Sure, here a complete example:

{
  "nodes": [
    {
      "parameters": {},
      "name": "NoOp",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1300,
        100
      ]
    },
    {
      "parameters": {
        "operation": "delete",
        "sheetId": "",
        "toDelete": {
          "rows": [
            {
              "sheetId": 0,
              "startIndex": "={{ $json.index }}"
            }
          ]
        }
      },
      "name": "Google Sheets12",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1300,
        -100
      ],
      "typeVersion": 1,
      "credentials": {
        "googleApi": ""
      }
    },
    {
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{$json[\"index\"]}}",
              "operation": "larger"
            }
          ]
        }
      },
      "name": "IF",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        1100,
        0
      ]
    },
    {
      "parameters": {
        "functionCode": "return [\n  {\n    json: {\n      index: items[0].json.data.map(data => data[0]).indexOf($node[\"Set\"].json.valueToDelete)\n    }\n  }\n];"
      },
      "name": "Function",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        900,
        0
      ]
    },
    {
      "parameters": {
        "sheetId": "",
        "range": "SheetName!A:A",
        "rawData": true,
        "options": {}
      },
      "name": "Google Sheets11",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        700,
        0
      ],
      "typeVersion": 1,
      "credentials": {
        "googleApi": ""
      }
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "valueToDelete",
              "value": "Jan"
            }
          ]
        },
        "options": {}
      },
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        500,
        0
      ]
    }
  ],
  "connections": {
    "IF": {
      "main": [
        [
          {
            "node": "Google Sheets12",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "NoOp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Function": {
      "main": [
        [
          {
            "node": "IF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets11": {
      "main": [
        [
          {
            "node": "Function",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set": {
      "main": [
        [
          {
            "node": "Google Sheets11",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

thank you so much!

Sure, happy if it helped. Have fun!