AutomationFlowsAI & RAG › Auto-document and Backup Workflows with Gpt-4 and Airtable

Auto-document and Backup Workflows with Gpt-4 and Airtable

ByGuillaume Duvernay @duv on n8n.io

Never worry about losing your n8n workflows again. This template provides a powerful, automated backup system that gives you the peace of mind of version control without the complexity of Git.

Cron / scheduled trigger★★★★★ complexityAI-powered38 nodesMove Binary DataAirtableChain Llmn8nHTTP RequestOpenAI Chat
AI & RAG Trigger: Cron / scheduled Nodes: 38 Complexity: ★★★★★ AI nodes: yes Added:

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

This workflow follows the Airtable → Chainllm 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
{
  "nodes": [
    {
      "id": "8261a2c4-7000-4eea-950d-8cbcec82a3c9",
      "name": "Move Binary Data",
      "type": "n8n-nodes-base.moveBinaryData",
      "position": [
        -3248,
        16
      ],
      "parameters": {
        "mode": "jsonToBinary",
        "options": {
          "fileName": "=file",
          "useRawData": true
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9ccbe56e-941f-4ad2-9272-54dc8461c4ad",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -7024,
        16
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "8020a4d9-3600-42ef-b2bb-6f2f3e3490e3",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -3024,
        16
      ],
      "parameters": {
        "options": {},
        "operation": "binaryToPropery"
      },
      "typeVersion": 1
    },
    {
      "id": "338a4507-94e0-4308-b969-87cf8266bdcb",
      "name": "Search all snapshots",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -6480,
        16
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appPFFj6CUUhZyDPT",
          "cachedResultUrl": "https://airtable.com/appPFFj6CUUhZyDPT",
          "cachedResultName": "n8n workflows backup (template)"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblavE6Zl51smbyGV",
          "cachedResultUrl": "https://airtable.com/appSYKqZwWcxbEdKq/tblavE6Zl51smbyGV",
          "cachedResultName": "Snapshots"
        },
        "options": {},
        "operation": "search",
        "filterByFormula": "={Workflow ID} = '{{ $('Loop Over Items').item.json.id }}'"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1,
      "alwaysOutputData": true
    },
    {
      "id": "165438d4-3e23-4cf9-9372-d51080fb1969",
      "name": "Re-summarise workflow",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -4272,
        -304
      ],
      "parameters": {
        "text": "={{ JSON.stringify($('Loop Over Items').first().json, null, 2) }}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "=Your role is to return a 1 sentence description of what the n8n workflow provided by the user does. You have a deep understanding of how n8n works.\n\nExample shapes of 1-sentence summaries:\nSummarises incoming product feedback from the form or as a subworkflow and sends it to Slack in #general before storing the summary in Airtable and Drive.\nTriggers on a new Gmail message, downloads the PDF attachment, converts it to base64, and uploads it to a Google Drive folder while saving metadata in Airtable.\nDetects new successful Stripe payments, retrieves customer details, creates a HubSpot contact, and sends a templated welcome email via SendGrid."
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "0f83a04c-0979-467d-a4b3-60b8a165e657",
      "name": "Store new workflow summary",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -3920,
        -304
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appPFFj6CUUhZyDPT",
          "cachedResultUrl": "https://airtable.com/appPFFj6CUUhZyDPT",
          "cachedResultName": "n8n workflows backup (template)"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblfjTaQd9nnVt9WP",
          "cachedResultUrl": "https://airtable.com/appSYKqZwWcxbEdKq/tblfjTaQd9nnVt9WP",
          "cachedResultName": "Workflows"
        },
        "columns": {
          "value": {
            "AI summary": "={{ $json.text }}",
            "Airtable record ID": "={{ $('Create or update workflow').first().json.id }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Workflow name",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Workflow name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Workflow ID",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Workflow ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Open in n8n",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Open in n8n",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "AI summary",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "AI summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Snapshots",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Snapshots",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Snapshots count",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Snapshots count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last snapshot version ID",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Last snapshot version ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last update time",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Last update time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last version file",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Last version file",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Comment",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Comment",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Creation time",
              "type": "dateTime",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Creation time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Airtable record ID",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "Airtable record ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Airtable record ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1,
      "alwaysOutputData": true
    },
    {
      "id": "32ad534c-3b4d-4388-894e-630954153bfa",
      "name": "Get full workflow JSON",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -3472,
        16
      ],
      "parameters": {
        "operation": "get",
        "workflowId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Loop Over Items').first().json.id }}"
        },
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "72df750a-b797-4e6b-b0de-4ecf5d6e894e",
      "name": "Only keep new snapshots",
      "type": "n8n-nodes-base.filter",
      "position": [
        -7248,
        16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "34d44462-f09f-4f8c-910a-be361eb56c10",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json['n8n version ID'] }}",
              "rightValue": ""
            },
            {
              "id": "2b0c4d48-b77c-4dd5-a2bd-6257dcae2f20",
              "operator": {
                "type": "string",
                "operation": "notExists",
                "singleValue": true
              },
              "leftValue": "={{ $json['n8n version ID'] }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "5e310efb-1892-4baa-a7c0-ff3c00523f19",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        -2496,
        384
      ],
      "parameters": {
        "amount": 3
      },
      "typeVersion": 1.1
    },
    {
      "id": "ebde51ba-5dd3-45c7-87bb-18e5d8770a8a",
      "name": "Get all n8n workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -7696,
        -80
      ],
      "parameters": {
        "filters": {
          "excludePinnedData": true
        },
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5e6d74f2-67c5-4f89-9532-82245f02530f",
      "name": "Match snapshot IDs",
      "type": "n8n-nodes-base.merge",
      "position": [
        -7472,
        16
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "advanced": true,
        "joinMode": "keepNonMatches",
        "mergeByFields": {
          "values": [
            {
              "field1": "versionId",
              "field2": "n8n version ID"
            }
          ]
        },
        "outputDataFrom": "input1"
      },
      "typeVersion": 3.2
    },
    {
      "id": "e10fab34-aea2-4c08-a1a0-307f1199932c",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -8048,
        16
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2b9546ed-ba58-48b1-b43d-21572d0fbec8",
      "name": "Search all existing snapshots",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -7696,
        112
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appPFFj6CUUhZyDPT",
          "cachedResultUrl": "https://airtable.com/appPFFj6CUUhZyDPT",
          "cachedResultName": "n8n workflows backup (template)"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblavE6Zl51smbyGV",
          "cachedResultUrl": "https://airtable.com/appPFFj6CUUhZyDPT/tblavE6Zl51smbyGV",
          "cachedResultName": "Snapshots"
        },
        "options": {
          "fields": [
            "n8n version ID"
          ]
        },
        "operation": "search"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1,
      "alwaysOutputData": true
    },
    {
      "id": "5d3175e6-0f5c-4bd3-92a6-93f97ee0aea9",
      "name": "Download previous snapshot",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -5776,
        -320
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appPFFj6CUUhZyDPT",
          "cachedResultUrl": "https://airtable.com/appPFFj6CUUhZyDPT",
          "cachedResultName": "n8n workflows backup (template)"
        },
        "limit": 1,
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblavE6Zl51smbyGV",
          "cachedResultUrl": "https://airtable.com/appSYKqZwWcxbEdKq/tblavE6Zl51smbyGV",
          "cachedResultName": "Snapshots"
        },
        "options": {
          "downloadFields": [
            "Workflow_file"
          ]
        },
        "operation": "search",
        "returnAll": false,
        "filterByFormula": "={n8n version ID} = '{{ $('Create or update workflow').first().json.fields['Last snapshot version ID'][0] }}'"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1,
      "alwaysOutputData": false
    },
    {
      "id": "071d5954-a253-4900-98cb-3ef035855d2a",
      "name": "Extract from File1",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -5552,
        -320
      ],
      "parameters": {
        "options": {},
        "operation": "fromJson",
        "destinationKey": "Previous JSON",
        "binaryPropertyName": "Workflow_file_0"
      },
      "typeVersion": 1
    },
    {
      "id": "ed9bb794-da8c-42df-b9fd-fa169d178db7",
      "name": "Create or update workflow",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -6720,
        16
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appPFFj6CUUhZyDPT",
          "cachedResultUrl": "https://airtable.com/appPFFj6CUUhZyDPT",
          "cachedResultName": "n8n workflows backup (template)"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblfjTaQd9nnVt9WP",
          "cachedResultUrl": "https://airtable.com/appSYKqZwWcxbEdKq/tblfjTaQd9nnVt9WP",
          "cachedResultName": "Workflows"
        },
        "columns": {
          "value": {
            "Workflow ID": "={{ $('Loop Over Items').item.json.id }}",
            "Creation time": "={{ $('Loop Over Items').item.json.createdAt }}",
            "Workflow name": "={{ $('Loop Over Items').item.json.name }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Workflow name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Workflow name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Workflow ID",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Workflow ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Open in n8n",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Open in n8n",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "AI summary",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "AI summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Snapshots",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Snapshots",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Snapshots count",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Snapshots count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last snapshot version ID",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Last snapshot version ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last update time",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Last update time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last version file",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Last version file",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Comment",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Comment",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Creation time",
              "type": "dateTime",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Creation time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Airtable record ID",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Airtable record ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Workflow ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "upsert"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1,
      "alwaysOutputData": true
    },
    {
      "id": "9afc3bb4-3923-43de-9695-ea517afb630b",
      "name": "Check workflow status",
      "type": "n8n-nodes-base.code",
      "position": [
        -6256,
        16
      ],
      "parameters": {
        "jsCode": "// Count the number of items from the previous node\nlet numItems = $items().length;\n\n// Check for the specific case where the previous node is empty but returns\n// a single item without the expected 'id' key in its JSON.\nif (numItems === 1 && $items()[0].json && $items()[0].json.id === undefined) {\n  numItems = 0;\n}\n\n// Determine the boolean value.\n// The new rule is to regenerate when the number is 0, 1, 2, or a multiple of 5.\nconst regenerate = (numItems === 0 || numItems === 1 || numItems === 2 || numItems % 5 === 0);\n\n// Return a single item with the renamed keys\nreturn [\n  {\n    json: {\n      \"Number of snapshots\": numItems,\n      \"Re-generate AI summary?\": regenerate\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "74884b3d-dd8f-4e13-919e-709aa3b32fad",
      "name": "Existing workflow?",
      "type": "n8n-nodes-base.if",
      "position": [
        -6032,
        16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "273d684c-b737-4dab-9e89-3af3a08f4570",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $json['Number of snapshots'] }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "8923c1a8-5189-43e1-a599-c51d9652ea24",
      "name": "Prepare edits since last snapshot",
      "type": "n8n-nodes-base.set",
      "position": [
        -4976,
        -320
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0f6c8c19-e75e-4cdc-a0fa-49320ba89006",
              "name": "Edits since last snapshot",
              "type": "string",
              "value": "={{ $json.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "08e5c6e2-0afe-47bc-82a3-878c809a2b28",
      "name": "State that this is the first version",
      "type": "n8n-nodes-base.set",
      "position": [
        -5008,
        144
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0f6c8c19-e75e-4cdc-a0fa-49320ba89006",
              "name": "Edits since last snapshot",
              "type": "string",
              "value": "=N/A - First identified version of the workflow"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "2d8d28df-6cab-419a-93d7-b0d3e78253b8",
      "name": "Consolidate edits since last snapshot",
      "type": "n8n-nodes-base.set",
      "position": [
        -4720,
        16
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0f6c8c19-e75e-4cdc-a0fa-49320ba89006",
              "name": "Edits since last snapshot",
              "type": "string",
              "value": "={{ $json['Edits since last snapshot'] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "1e3c97c4-6685-4e38-8a6b-ef90894dc77c",
      "name": "Needs new workflow summary?",
      "type": "n8n-nodes-base.if",
      "position": [
        -4496,
        16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c065fb3f-54ce-4f45-8c91-d7f7972adc3b",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $('Check workflow status').item.json['Re-generate AI summary?'] }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "fb6cd7e8-8ed4-4b8b-a070-151eb4646bc8",
      "name": "Document workflow differences",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -5328,
        -320
      ],
      "parameters": {
        "text": "={{ JSON.stringify($('Loop Over Items').first().json, null, 2) }}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "=Your role is to return a 1 sentence explanation of the difference between 2 n8n workflow versions.\n\nYou are detail-oriented when it comes to analysing and comparing workflows, but your output is rather concise as it is strictly one sentence.\n\nThe user message contains the JSON of the new version, and here is the previous version of the workflow to compare it to:\n\n{{ JSON.stringify($json['Previous JSON'], null, 2) }}"
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "8022caab-0a00-47fd-b25f-659b237ee0dc",
      "name": "Store new snapshot",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -3696,
        16
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appPFFj6CUUhZyDPT",
          "cachedResultUrl": "https://airtable.com/appPFFj6CUUhZyDPT",
          "cachedResultName": "n8n workflows backup (template)"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblavE6Zl51smbyGV",
          "cachedResultUrl": "https://airtable.com/appSYKqZwWcxbEdKq/tblavE6Zl51smbyGV",
          "cachedResultName": "Snapshots"
        },
        "columns": {
          "value": {
            "Workflow": "={{[ $('Create or update workflow').first().json.id ]}}",
            "n8n version ID": "={{ $('Loop Over Items').first().json.versionId }}",
            "Last update time": "={{ $('Loop Over Items').first().json.updatedAt }}",
            "Edits since last snapshot": "={{ $('Consolidate edits since last snapshot').first().json['Edits since last snapshot'] }}"
          },
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "n8n version ID",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "n8n version ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last update time",
              "type": "dateTime",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Last update time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Time added",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Time added",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Workflow",
              "type": "array",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Workflow",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Workflow ID",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Workflow ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Workflow_file",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Workflow_file",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Edits since last snapshot",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Edits since last snapshot",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Comment",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Comment",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Airtable record ID",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Airtable record ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "typecast": true
        },
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1,
      "alwaysOutputData": true
    },
    {
      "id": "19a0d146-27a3-4cbd-8249-bf883cb54862",
      "name": "Store workflow file into Airtable",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2768,
        16
      ],
      "parameters": {
        "url": "=https://content.airtable.com/v0/<AIRTABLE-BASE-ID>/{{ $('Store new snapshot').first().json.id }}/Workflow_file/uploadAttachment",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "contentType",
              "value": "text/plain"
            },
            {
              "name": "file",
              "value": "={{ $json.data }}"
            },
            {
              "name": "filename",
              "value": "={{ $('Loop Over Items').first().json.versionId }}.json"
            }
          ]
        },
        "nodeCredentialType": "airtableTokenApi"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f0c35245-4949-41bf-ab9f-1a2b2dccc131",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -4848,
        672
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-nano",
          "cachedResultName": "gpt-4.1-nano"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8e5f5a92-9111-4891-beb3-cd3d9fe7e923",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2880,
        -368
      ],
      "parameters": {
        "color": 3,
        "width": 352,
        "height": 576,
        "content": "## Insert your Airtable base ID into the URL\nThe current URL contains <AIRTABLE-BASE-ID>\nwhich should be replaced by the Airtable base ID. \n\nOpen the Airtable base you've prepared for this workflow and get the value starting with \"app...\" in the URL of the page:\nhttps://airtable.com/appxyz/...\n\nThis is your base ID.\n\n*NB: Using this Airtable API endpoint allows to store a file based on b64 file data instead of using workarounds with Drive or Dropbox!*\n"
      },
      "typeVersion": 1
    },
    {
      "id": "75fc1067-486e-4718-9893-7baba3402591",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3504,
        -112
      ],
      "parameters": {
        "color": 7,
        "width": 608,
        "height": 320,
        "content": "## Preparing this workflow version to be imported into Airtable as a file"
      },
      "typeVersion": 1
    },
    {
      "id": "8daa99f7-f960-4675-9a9e-111aba5eebc1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4352,
        -608
      ],
      "parameters": {
        "color": 5,
        "width": 608,
        "height": 528,
        "content": "## (re)-summarising the workflow with AI\nIf this is the first, second, third or a multiple of 5 # of snapshot we have for this workflow, we want to let AI re-generate a summary of the workflow as some changes might make the previous summary outdated.\n\nGenerating it at every backup wouldn't be token-efficient, but feel free to update the code of the \"Check workflow status\" node to change the frequency.\n\nNB: LLMs are able to read and understand the workflow based on its JSON which describes all nodes and parameters."
      },
      "typeVersion": 1
    },
    {
      "id": "ae3cb5a1-56be-4a68-8039-0fa5b943df00",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5824,
        -480
      ],
      "parameters": {
        "color": 5,
        "width": 992,
        "height": 432,
        "content": "## AI-documenting the edits VS the previous snapshot\nAs we have stored the file of the last snapshot, we might want to store for each new version a summary of the changes compared to the previous one."
      },
      "typeVersion": 1
    },
    {
      "id": "37ddafe2-30ea-40f1-8db1-346a2e09b750",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -6800,
        -32
      ],
      "parameters": {
        "width": 256,
        "height": 416,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nIf the workflow didn't have a record yet in the \"Workflows\" tab in Airtable, this is when it gets created.\nIf it already existed, it resets the name anyway, in case it has changed since the last snapshot."
      },
      "typeVersion": 1
    },
    {
      "id": "4d94c74f-be8d-41a4-870e-149533e303bc",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -6336,
        -32
      ],
      "parameters": {
        "color": 6,
        "width": 256,
        "height": 416,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThis code looks at the result of our search of all past snapshots and returns the number of snapshots and Yes or No, whether it is time to re-generate a summary of the workflow or not."
      },
      "typeVersion": 1
    },
    {
      "id": "4bcc671d-a4d9-4d4f-b616-d7eeed703110",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -7792,
        -224
      ],
      "parameters": {
        "color": 4,
        "width": 656,
        "height": 544,
        "content": "## Retrieving all workflows that have new snapshots\nBy comparing the list of the most recent version ID for each workflow and the list of snapshots we have stored in Airtable, we are able to detect the snapshots that need to be saved."
      },
      "typeVersion": 1
    },
    {
      "id": "f9d24d5b-e86e-423b-8d2c-8cb9b096f54f",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4992,
        624
      ],
      "parameters": {
        "color": 5,
        "width": 384,
        "height": 400,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Connect your favorite AI provider and model\nIf you tend to have big workflows, their JSON might be long which will consume many Input tokens. As the quality of these AI insights isn't critical, you might want to use a small and efficient model."
      },
      "typeVersion": 1
    },
    {
      "id": "58f05bec-ef7d-4e8b-a8bf-a267ff842cd8",
      "name": "The backup is done!",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -6736,
        -272
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "0de48f62-8638-418d-b7ba-f86746fba33b",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8160,
        -224
      ],
      "parameters": {
        "width": 320,
        "height": 544,
        "content": "## Define your backup frequency\nDaily, weekly, or hourly backup, you decide! Configure this node and activate the workflow to push it live."
      },
      "typeVersion": 1
    },
    {
      "id": "c9fd49c3-5976-419c-aa04-42ee0cff5840",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2528,
        256
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 288,
        "content": "## Let's give some time to Airtable's API to rest!\nYes, REST APIs need to rest... ;)\n... to not reach rate limits."
      },
      "typeVersion": 1
    },
    {
      "id": "7a3ea014-330c-47f5-a547-4c5b18b6f1be",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8720,
        -336
      ],
      "parameters": {
        "color": 2,
        "width": 512,
        "height": 656,
        "content": "# Automated Workflow Backup & AI Documenter\n\nThis workflow runs on a schedule to find new versions of your workflows. It uses AI to generate a summary and a \"what's new\" changelog, then saves the backup `.json` file and all documentation to a central Airtable base.\n\n## How to use\n\n1.  **Duplicate the Airtable Base:** First, use this link ( https://airtable.com/appPFFj6CUUhZyDPT/shrorM8k6HsUqBACB ) to duplicate the Airtable base into your account.\n2.  **Connect your accounts:**\n    * Add your **n8n**, **Airtable**, and **AI provider** credentials to the relevant nodes in this workflow.\n    * Map the Airtable nodes to the base you just created.\n3.  **Update the Airtable Uploader (Critical):**\n    * In the **Store workflow file into Airtable** (HTTP Request) node, replace `<AIRTABLE-BASE-ID>` in the URL with your own base ID.\n4.  **Set your schedule & activate!** Your workflows are now protected.\n\n\n*This template has been built by Guillaume Duvernay*"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "The backup is done!",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create or update workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Move Binary Data": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get all n8n workflows",
            "type": "main",
            "index": 0
          },
          {
            "node": "Search all existing snapshots",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Store workflow file into Airtable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Existing workflow?": {
      "main": [
        [
          {
            "node": "Download previous snapshot",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "State that this is the first version",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File1": {
      "main": [
        [
          {
            "node": "Document workflow differences",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Match snapshot IDs": {
      "main": [
        [
          {
            "node": "Only keep new snapshots",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Document workflow differences",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Re-summarise workflow",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Store new snapshot": {
      "main": [
        [
          {
            "node": "Get full workflow JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search all snapshots": {
      "main": [
        [
          {
            "node": "Check workflow status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check workflow status": {
      "main": [
        [
          {
            "node": "Existing workflow?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get all n8n workflows": {
      "main": [
        [
          {
            "node": "Match snapshot IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Re-summarise workflow": {
      "main": [
        [
          {
            "node": "Store new workflow summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get full workflow JSON": {
      "main": [
        [
          {
            "node": "Move Binary Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only keep new snapshots": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create or update workflow": {
      "main": [
        [
          {
            "node": "Search all snapshots",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download previous snapshot": {
      "main": [
        [
          {
            "node": "Extract from File1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store new workflow summary": {
      "main": [
        [
          {
            "node": "Store new snapshot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Needs new workflow summary?": {
      "main": [
        [
          {
            "node": "Re-summarise workflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Store new snapshot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Document workflow differences": {
      "main": [
        [
          {
            "node": "Prepare edits since last snapshot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search all existing snapshots": {
      "main": [
        [
          {
            "node": "Match snapshot IDs",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Prepare edits since last snapshot": {
      "main": [
        [
          {
            "node": "Consolidate edits since last snapshot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store workflow file into Airtable": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "State that this is the first version": {
      "main": [
        [
          {
            "node": "Consolidate edits since last snapshot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Consolidate edits since last snapshot": {
      "main": [
        [
          {
            "node": "Needs new workflow summary?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

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

Never worry about losing your n8n workflows again. This template provides a powerful, automated backup system that gives you the peace of mind of version control without the complexity of Git.

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

More AI & RAG workflows → · Browse all categories →

Related workflows

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

AI & RAG

Automatically monitor LinkedIn posts from your community members and create AI-powered content digests for efficient social media curation.

HTTP Request, Airtable, OpenAI Chat +2
AI & RAG

This workflow is for community builders, marketers, consultants, coaches, and thought leaders who want to grow their presence in Skool communities through strategic, value-driven engagement. It's espe

OpenAI Chat, Output Parser Structured, Airtable +2
AI & RAG

Complete PostgreSQL-backed system: Keyword scoring → AI research → Multi-part content generation → fal.ai Nano Banana image generation → WordPress publishing

WordPress, OpenAI, Perplexity +8
AI & RAG

This n8n automation workflow automates the creation, scripting, production, and posting of YouTube videos. It leverages AI (OpenAI), image generation (PIAPI), video rendering (Shotstack), and platform

Agent, OpenAI Chat, Airtable Tool +7
AI & RAG

Typeform IA - YT. Uses typeformTrigger, agent, lmChatOpenAi, toolWorkflow. Event-driven trigger; 75 nodes.

Typeform Trigger, Agent, OpenAI Chat +7