{
  "name": "Automate purchase order form submissions from Outlook Excel attachments with AI",
  "nodes": [
    {
      "id": "b87cc222-82ec-4b46-9573-68f41d096969",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        620
      ],
      "parameters": {
        "width": 740,
        "height": 680,
        "content": "## 2. Manually Convert XLSX to Markdown\n[Learn more about the Extract From File node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.extractfromfile/)\n\nToday's LLMs cannot parse Ex"
      }
    },
    {
      "id": "c4c55042-02c8-4364-ae7e-d1ec5a75437a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1400,
        620
      ],
      "parameters": {
        "width": 640,
        "height": 680,
        "content": "## 3. Extract Purchase Order Details using AI\n[Learn more about the Information Extractor](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.information-extractor)\n"
      }
    },
    {
      "id": "b9530f93-464b-4116-add7-da218fe8eb12",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -700,
        -80
      ],
      "parameters": {
        "width": 460,
        "height": 1400,
        "content": "## Try it out!\n### This n8n template imports purchase order submissions from Outlook and converts attached purchase order form in XLSX format into structured output.\n\nData entry jobs with user-submitt"
      }
    },
    {
      "id": "f5a2d1e7-f73b-4bfa-8e02-f30db275bbcc",
      "name": "Extract Purchase Order Details",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        1500,
        920
      ]
    },
    {
      "id": "0ce545f0-8147-4ad2-bb9e-14ef0b0c26ef",
      "name": "Is Excel Document?",
      "type": "n8n-nodes-base.if",
      "position": [
        760,
        1020
      ]
    },
    {
      "id": "ccbd9531-66be-4e07-8b73-faf996622f9f",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        460
      ],
      "parameters": {
        "width": 340,
        "height": 140,
        "content": "### PURCHASE ORDER EXAMPLE\nThis is the purchase order XLSX which is used an example for this template.\nhttps://1drv.ms/x/c/8f1f7dda12b7a145/ETWH8dKwgZ1OiVz7ISUWYf8BwiyihBjXPXEbCYkVi8XDyw?e=WWU2eR"
      }
    },
    {
      "id": "ef8b00eb-dba6-47dd-a825-1aa5c85ee215",
      "name": "Run Checks",
      "type": "n8n-nodes-base.set",
      "position": [
        2160,
        940
      ]
    },
    {
      "id": "801848cc-558c-4a30-aab5-eb403564b68f",
      "name": "Is Valid Purchase Order?",
      "type": "n8n-nodes-base.if",
      "position": [
        2360,
        940
      ]
    },
    {
      "id": "7c7dd7a0-45fe-4549-8341-3b3fd18e1725",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        980,
        920
      ]
    },
    {
      "id": "dfb6b00f-fe50-42d6-8597-8fdcb562714b",
      "name": "XLSX to Markdown Table",
      "type": "n8n-nodes-base.code",
      "position": [
        1180,
        920
      ]
    },
    {
      "id": "1a3de516-1d21-4664-b2e3-8c8d6ec90ef2",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1600,
        1080
      ]
    },
    {
      "id": "1a29236f-5eaa-4a38-a0a1-6e19abd77d2c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2060,
        620
      ],
      "parameters": {
        "width": 940,
        "height": 680,
        "content": "## 4. Use Simple Validation to Save Time and Effort\n[Learn more about the Edit Fields node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.set)\n\nWith our extracted output, we can r"
      }
    },
    {
      "id": "79a39a03-5f71-4021-bcfd-06edbc285e8a",
      "name": "Reply Invalid Format",
      "type": "n8n-nodes-base.microsoftOutlook",
      "position": [
        980,
        1120
      ]
    },
    {
      "id": "ec973438-4d6c-4d2e-8702-1d195f514528",
      "name": "Outlook Trigger",
      "type": "n8n-nodes-base.microsoftOutlookTrigger",
      "position": [
        -120,
        920
      ]
    },
    {
      "id": "fcb173ce-7dad-497a-9376-9650c2a24a84",
      "name": "Reply Rejection",
      "type": "n8n-nodes-base.microsoftOutlook",
      "position": [
        2580,
        1040
      ]
    },
    {
      "id": "64ced193-6b12-4ee9-b1e2-735040648051",
      "name": "Reply Accepted",
      "type": "n8n-nodes-base.microsoftOutlook",
      "position": [
        2580,
        820
      ]
    },
    {
      "id": "7bfe0e44-cd5d-4290-ba2e-0064c95bc4e2",
      "name": "Do Something with Purchase Order",
      "type": "n8n-nodes-base.noOp",
      "position": [
        2800,
        940
      ]
    },
    {
      "id": "6f517f2f-6072-46a2-8a9d-cca4e958d601",
      "name": "Fix Excel Dates",
      "type": "n8n-nodes-base.set",
      "position": [
        1840,
        920
      ]
    },
    {
      "id": "f3a31b63-ebcb-4d93-8c5a-f626897b7d68",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        620
      ],
      "parameters": {
        "width": 840,
        "height": 680,
        "content": "## 1. Wait For Incoming Purchase Orders\n[Read more about the Outlook trigger](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.microsoftoutlooktrigger)\n\nOur template starts by wat"
      }
    },
    {
      "id": "bb395dfc-2831-4e57-90c9-62f13f84302e",
      "name": "Is Submitting a Purchase Order?",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        80,
        920
      ]
    },
    {
      "id": "e52ec2e2-8be5-40ab-b1f8-8d7c0b161e1a",
      "name": "Do Nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        420,
        1040
      ]
    },
    {
      "id": "5ca6be4e-bc33-42d7-91bc-d30f7ccfdd25",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        180,
        1080
      ]
    }
  ],
  "connections": {
    "Run Checks": {
      "main": [
        [
          {
            "node": "Is Valid Purchase Order?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reply Accepted": {
      "main": [
        [
          {
            "node": "Do Something with Purchase Order",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fix Excel Dates": {
      "main": [
        [
          {
            "node": "Run Checks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Outlook Trigger": {
      "main": [
        [
          {
            "node": "Is Submitting a Purchase Order?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "XLSX to Markdown Table",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Extract Purchase Order Details",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Is Excel Document?": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reply Invalid Format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Is Submitting a Purchase Order?",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "XLSX to Markdown Table": {
      "main": [
        [
          {
            "node": "Extract Purchase Order Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Valid Purchase Order?": {
      "main": [
        [
          {
            "node": "Reply Accepted",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reply Rejection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Purchase Order Details": {
      "main": [
        [
          {
            "node": "Fix Excel Dates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Submitting a Purchase Order?": {
      "main": [
        [
          {
            "node": "Is Excel Document?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Do Nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}