Add only new records to Airtable

This solution will help you append new data to your Airtable base. It will check if the record already exists. If the record exists it will not update the values. But if the record doesn’t exist it will add it to the Airtable.

The workflow uses the following nodes:

  1. Airtable node: This will list all the entries from your table. If you want to return only specific entries you can use the Filter by Formula option.
  2. Set node: The new values that need to be appended in the Airtable are generated here. Replace this node with another node that contains the data you want to append.
  3. Merge node: This is where the magic happens. The Remove Key Matches option will remove the records if they already exist in your table. If the record doesn’t exist, it will return the values from the Set node and continue the workflow.

{
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "operation": "list",
        "additionalOptions": {}
      },
      "name": "Airtable",
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 1,
      "position": [
        500,
        400
      ],
      "credentials": {
        "airtableApi": "Airtable Credentials @n8n"
      }
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "Name",
              "value": "n8n"
            }
          ],
          "number": []
        },
        "options": {}
      },
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        500,
        200
      ]
    },
    {
      "parameters": {
        "mode": "removeKeyMatches",
        "propertyName1": "Name",
        "propertyName2": "fields.Name"
      },
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 1,
      "position": [
        700,
        300
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "options": {}
      },
      "name": "Airtable1",
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 1,
      "position": [
        900,
        300
      ],
      "credentials": {
        "airtableApi": "Airtable Credentials @n8n"
      }
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Set",
            "type": "main",
            "index": 0
          },
          {
            "node": "Airtable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Airtable": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Set": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Airtable1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Example Table: Airtable - Grid view