{
  "name": "Extract data from email attachments to Airtable with DocuPipe AI",
  "nodes": [
    {
      "id": "5035c41c-a247-4078-95d6-f828595fca9a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -700,
        -260
      ],
      "parameters": {
        "width": 520,
        "height": 1020,
        "content": "## Email to DocuPipe to Airtable\n\nAutomatically extract structured data from email attachments using [DocuPipe](https://docupipe.ai) AI and save results to Airtable. Works with any IMAP email provider"
      }
    },
    {
      "id": "43a28b75-3b08-44dd-a904-a190680d7a57",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        -120
      ],
      "parameters": {
        "width": 1200,
        "height": 380,
        "content": "## Scenario 1 - Upload Email Attachments to DocuPipe\nNew emails with attachments are detected via IMAP, filtered by subject keywords (invoice, receipt, etc.), and email metadata is extracted before up"
      }
    },
    {
      "id": "f6629173-293f-4e5c-92ff-20af3c14308e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        300
      ],
      "parameters": {
        "width": 1420,
        "height": 440,
        "content": "## Scenario 2 - Process Extraction Results & Save to Airtable\nWhen DocuPipe completes extraction, the webhook triggers this flow. The extracted data is fetched, processed into Airtable-compatible form"
      }
    },
    {
      "id": "82a7fd41-f989-4625-9697-d784201f709c",
      "name": "New Email with Attachment",
      "type": "n8n-nodes-base.emailReadImap",
      "position": [
        0,
        60
      ]
    },
    {
      "id": "ceeb2df9-e9f3-4add-b162-38ec058356ee",
      "name": "Filter by Subject",
      "type": "n8n-nodes-base.if",
      "position": [
        240,
        60
      ]
    },
    {
      "id": "6fff0198-019c-46c0-a543-99f5cf61dbe2",
      "name": "Extract Email Info",
      "type": "n8n-nodes-base.set",
      "position": [
        480,
        60
      ]
    },
    {
      "id": "e7bc5d8f-1d7a-4473-a007-54e0f7ee6604",
      "name": "Upload Attachment & Extract Data",
      "type": "n8n-nodes-docupipe.docuPipe",
      "position": [
        720,
        60
      ]
    },
    {
      "id": "e68250be-109d-488c-b212-d714a236afd7",
      "name": "Extraction Complete",
      "type": "n8n-nodes-docupipe.docuPipeTrigger",
      "position": [
        0,
        480
      ]
    },
    {
      "id": "f3772d55-4d37-4b7a-8515-20425cf67fea",
      "name": "Get Extracted Data",
      "type": "n8n-nodes-docupipe.docuPipe",
      "position": [
        260,
        480
      ]
    },
    {
      "id": "18ee72c5-b5e4-4f33-ad5a-a688b02dffb1",
      "name": "Process for Airtable",
      "type": "n8n-nodes-base.code",
      "position": [
        520,
        480
      ]
    },
    {
      "id": "6dc7f0e0-3287-4124-bc0d-33c6975275c2",
      "name": "Add Metadata",
      "type": "n8n-nodes-base.set",
      "position": [
        780,
        480
      ]
    },
    {
      "id": "c5bb0ea1-39ac-40f6-8c1e-0a3630b0d0df",
      "name": "Create Record in Airtable",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1040,
        480
      ]
    }
  ],
  "connections": {
    "Add Metadata": {
      "main": [
        [
          {
            "node": "Create Record in Airtable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter by Subject": {
      "main": [
        [
          {
            "node": "Extract Email Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Email Info": {
      "main": [
        [
          {
            "node": "Upload Attachment & Extract Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Extracted Data": {
      "main": [
        [
          {
            "node": "Process for Airtable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extraction Complete": {
      "main": [
        [
          {
            "node": "Get Extracted Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process for Airtable": {
      "main": [
        [
          {
            "node": "Add Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New Email with Attachment": {
      "main": [
        [
          {
            "node": "Filter by Subject",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}