{
  "name": "Notify on new emails with invoices in Slack",
  "nodes": [
    {
      "id": null,
      "name": "Check for new emails",
      "type": "n8n-nodes-base.emailReadImap",
      "position": [
        500,
        300
      ]
    },
    {
      "id": null,
      "name": "If email body contains invoice",
      "type": "n8n-nodes-base.if",
      "position": [
        700,
        300
      ]
    },
    {
      "id": null,
      "name": "Extract the total amount",
      "type": "n8n-nodes-base.mindee",
      "position": [
        900,
        280
      ]
    },
    {
      "id": null,
      "name": "Send new invoice notification",
      "type": "n8n-nodes-base.slack",
      "position": [
        1580,
        300
      ]
    },
    {
      "id": null,
      "name": "Send email to finance manager",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1340,
        120
      ]
    },
    {
      "id": null,
      "name": "If Amount > 1000",
      "type": "n8n-nodes-base.if",
      "position": [
        1080,
        280
      ]
    }
  ],
  "connections": {
    "If Amount > 1000": {
      "main": [
        [
          {
            "node": "Send email to finance manager",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send new invoice notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for new emails": {
      "main": [
        [
          {
            "node": "If email body contains invoice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract the total amount": {
      "main": [
        [
          {
            "node": "If Amount > 1000",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send email to finance manager": {
      "main": [
        [
          {
            "node": "Send new invoice notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If email body contains invoice": {
      "main": [
        [
          {
            "node": "Extract the total amount",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}