{
  "name": "Automate invoice creation & smart reminders with Jotform, QuickBooks & Outlook AI",
  "nodes": [
    {
      "id": "dfd3e6f4-25fd-4ae7-af50-6fe33f22792a",
      "name": "Receive form submission",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -464,
        0
      ]
    },
    {
      "id": "4e11a957-5017-4e9a-84b8-11807bfb93e5",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        320,
        0
      ]
    },
    {
      "id": "109ce30c-9aed-47db-b07d-6268ae7b06be",
      "name": "Get the product",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        1248,
        0
      ]
    },
    {
      "id": "4e94366d-4ad2-4fdf-9167-f06773b446dc",
      "name": "Create the invoice",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        1856,
        0
      ]
    },
    {
      "id": "ada8e07e-7416-409b-b576-71a598af44b6",
      "name": "Send the invoice",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        2160,
        0
      ]
    },
    {
      "id": "5861c8ac-5d8a-4fa4-8406-6f8f26d07a68",
      "name": "Check if the customer exists",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        112,
        0
      ]
    },
    {
      "id": "4bc24612-97d4-405a-96ca-d39659929e83",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        -112
      ],
      "parameters": {
        "width": 256,
        "height": 320,
        "content": "## Receive Submission\nReceives the product/service form submission from Jotform"
      }
    },
    {
      "id": "6afb6f6c-d768-4e07-abef-7a60d8e2f6e8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        -112
      ],
      "parameters": {
        "width": 400,
        "height": 320,
        "content": "## Check If Customer exists \nChecks if the customer exists in QBO or not"
      }
    },
    {
      "id": "80b25818-7cd7-4a9a-bd14-1bb8430a2621",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        -336
      ],
      "parameters": {
        "width": 304,
        "height": 336,
        "content": "## Customer Exists\nNow since the customer exists we will update the customer details like updating the billing details with the new one"
      }
    },
    {
      "id": "0d3f189d-c6a1-46b2-bad6-1b4ad6bd97dd",
      "name": "Create the customer",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        608,
        176
      ]
    },
    {
      "id": "29e5128b-ba7f-40f8-9989-6484a6bdc765",
      "name": "Update the customer",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        608,
        -192
      ]
    },
    {
      "id": "5dceabf1-2723-44bc-aa11-b5d594402827",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        48
      ],
      "parameters": {
        "width": 304,
        "height": 320,
        "content": "## Customer Doesn't Exist\nNow since the customer doesn't exist we will create new customer"
      }
    },
    {
      "id": "713ab8c2-74ce-4d08-8304-a66e33255c27",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1168,
        -112
      ],
      "parameters": {
        "width": 256,
        "height": 320,
        "content": "## Get The Item\nGets the selected product/service from QBO"
      }
    },
    {
      "id": "f869fc37-46e9-4789-a9d9-aaaeb1bd9369",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1776,
        -112
      ],
      "parameters": {
        "width": 256,
        "height": 320,
        "content": "## Create The Invoice\nCreates a new invoice for that customer"
      }
    },
    {
      "id": "8122f6e9-788c-44c8-8c22-fe064574bc6d",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2080,
        -112
      ],
      "parameters": {
        "width": 256,
        "height": 320,
        "content": "## Send The Invoice\nSends the newly created invoice for that customer(via email)"
      }
    },
    {
      "id": "218806fb-96e1-4ee9-97f5-069204d374d0",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1664,
        -416
      ],
      "parameters": {
        "width": 1072,
        "height": 1280,
        "content": "## Generate Invoices and Send Reminders for Customers with Jotform, QuickBooks and Outlook\nThis workflow automates the entire process of receiving a product/service order, checking or creating a custo"
      }
    },
    {
      "id": "1e20f507-a921-421a-8779-d6a917bb24c0",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -112
      ],
      "parameters": {
        "width": 256,
        "height": 320,
        "content": "## Format Data\nFormats the data thus making it easier to be used in other nodes"
      }
    },
    {
      "id": "5a98fa14-9c80-4f8b-a85f-da9a1cd7e199",
      "name": "Format data",
      "type": "n8n-nodes-base.code",
      "position": [
        -160,
        0
      ]
    },
    {
      "id": "8f5cc73b-bc63-467c-84aa-d2e4f28a2174",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        864,
        -112
      ],
      "parameters": {
        "width": 256,
        "height": 320,
        "content": "## Add Customer Id\nAdds customer id to the data"
      }
    },
    {
      "id": "0d92ccac-d3e6-4b8a-acf6-11b4cb9e6a9d",
      "name": "Add customer id",
      "type": "n8n-nodes-base.code",
      "position": [
        944,
        0
      ]
    },
    {
      "id": "2c1951b2-350b-43c7-8851-07d85790c641",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1472,
        -112
      ],
      "parameters": {
        "width": 256,
        "height": 320,
        "content": "## Add Item Id\nAdds item (service/product) id to the data"
      }
    },
    {
      "id": "cedfacf7-2213-484b-8174-6dd73ce93949",
      "name": "Add item id",
      "type": "n8n-nodes-base.code",
      "position": [
        1552,
        0
      ]
    },
    {
      "id": "953beffa-e3b2-44f0-aaa2-5dc8c88245b1",
      "name": "Add reminders config",
      "type": "n8n-nodes-base.set",
      "position": [
        960,
        704
      ]
    },
    {
      "id": "e87fdf1d-716b-48a7-ab53-0c55f51c4039",
      "name": "Insert invoice id to DB",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1664,
        512
      ]
    },
    {
      "id": "d403d5f1-09b4-47c0-97e6-c8a0f81d0445",
      "name": "Get Invoices",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1664,
        880
      ]
    },
    {
      "id": "33323ad8-be85-4fb5-921f-e36841fdcadc",
      "name": "Get the invoice",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        2368,
        1104
      ]
    },
    {
      "id": "6221744a-f461-47c0-bec0-506a454fc239",
      "name": "If2",
      "type": "n8n-nodes-base.if",
      "position": [
        1312,
        704
      ]
    },
    {
      "id": "6edd150f-3e91-4ca9-833d-d34ab1153859",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2736,
        544
      ]
    },
    {
      "id": "60bf7601-9f99-492c-a097-48149628a7ed",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2736,
        752
      ]
    },
    {
      "id": "293786e1-99ec-4e92-9717-3a899b04a590",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        2672,
        1120
      ]
    },
    {
      "id": "9bbf8609-567a-4984-ae2d-024fc8539141",
      "name": "Schedule reminders trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        608,
        704
      ]
    },
    {
      "id": "e4fe254f-5cbe-4d92-9b90-b0cf9349324c",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        576
      ],
      "parameters": {
        "width": 304,
        "height": 320,
        "content": "## Schedule Trigger\nSchedules reminders trigger daily at 8 AM"
      }
    },
    {
      "id": "86b73b0c-74d8-4dd3-a10d-e15908c2ba0c",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        864,
        528
      ],
      "parameters": {
        "width": 304,
        "height": 368,
        "content": "## Add Reminders Config\nAdds reminders config details like `intervals in days` so first reminder will be sent after 2 days, second one after 3 days and final one after 5 days"
      }
    },
    {
      "id": "583bc83c-547c-4547-b4e5-675ea065cb5c",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1216,
        528
      ],
      "parameters": {
        "width": 304,
        "height": 368,
        "content": "## Check Trigger\nChecks if the previous node has been executed by the above workflow or by the schedule trigger"
      }
    },
    {
      "id": "93d6d0b5-e865-429c-b88e-7864ee4ab317",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1568,
        352
      ],
      "parameters": {
        "width": 304,
        "height": 336,
        "content": "## Insert Invoice To DB\nInserts newly created invoice needed details to DB so customer will be notified later on about the invoice"
      }
    },
    {
      "id": "a5978022-c0af-4351-b8c2-5cdcddd3b498",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1568,
        736
      ],
      "parameters": {
        "width": 304,
        "height": 336,
        "content": "## Get All Invoices\nGets all the invoices from DB"
      }
    },
    {
      "id": "573bfa8e-b956-4e25-afdd-a945c5ad076a",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1920,
        752
      ],
      "parameters": {
        "width": 304,
        "height": 320,
        "content": "## Loop Over Invoices\nLoops over invoices one by one"
      }
    },
    {
      "id": "5b2e5842-65e9-4c17-bcff-c516f5de0d26",
      "name": "Loop over invoices",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2016,
        880
      ]
    },
    {
      "id": "15b5404b-10e7-4123-bdcb-ceb89a368bd7",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2272,
        544
      ],
      "parameters": {
        "width": 304,
        "height": 352,
        "content": "## Get Sent Reminders\nGets today's sent reminders from DB"
      }
    },
    {
      "id": "c21c43a0-bd16-43e7-8b90-aef52d06017d",
      "name": "Sticky Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2272,
        944
      ],
      "parameters": {
        "width": 304,
        "height": 368,
        "content": "## Get Invoice Details\nGets the invoice details from QBO so we know whether or not any changes have been made or not"
      }
    },
    {
      "id": "b5e9319e-fcf5-4102-a0ea-9486fcf3d69f",
      "name": "Get today's sent reminders",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        2368,
        688
      ]
    },
    {
      "id": "99145c7b-e9ea-4e3f-af00-f6ecae22f2a1",
      "name": "Sticky Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2624,
        416
      ],
      "parameters": {
        "width": 592,
        "height": 480,
        "content": "## Summarize Sent Reminders & Send An Email\nSummarizes today's sent reminders using AI and send a summery email to the team like sales team or finance team"
      }
    },
    {
      "id": "210ad0cd-887c-4233-a3fe-03f852506712",
      "name": "Increase sent reminders",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        3136,
        1072
      ]
    },
    {
      "id": "897493e1-e523-4432-bd88-4f35ee0e042f",
      "name": "Delete invoice",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        3616,
        1232
      ]
    },
    {
      "id": "0d86331a-93e1-4128-b97e-bc200940ea5a",
      "name": "If3",
      "type": "n8n-nodes-base.if",
      "position": [
        3344,
        1072
      ]
    },
    {
      "id": "7933de48-c237-48c5-9a5e-0a8b7e34fe3b",
      "name": "Sticky Note20",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2624,
        944
      ],
      "parameters": {
        "width": 1184,
        "height": 480,
        "content": "## Send Reminders Logic\nThe logic that decides whether or not to send a reminder email now, skip it and send it later or delete the invoice/s from DB (because all the reminders have been sent or the i"
      }
    },
    {
      "id": "7240f3aa-3a81-46d5-abc5-4baf299921a0",
      "name": "Send reminder email",
      "type": "n8n-nodes-base.microsoftOutlook",
      "position": [
        2912,
        1072
      ]
    },
    {
      "id": "4c282175-e488-4663-9503-0c98bac9714a",
      "name": "Send reminders sent summary",
      "type": "n8n-nodes-base.microsoftOutlook",
      "position": [
        3008,
        544
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Update the customer",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create the customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "Insert invoice id to DB",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Invoices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If3": {
      "main": [
        [
          {
            "node": "Delete invoice",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop over invoices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Send reminder email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Delete invoice",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop over invoices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send reminders sent summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add item id": {
      "main": [
        [
          {
            "node": "Create the invoice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format data": {
      "main": [
        [
          {
            "node": "Check if the customer exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Invoices": {
      "main": [
        [
          {
            "node": "Loop over invoices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete invoice": {
      "main": [
        [
          {
            "node": "Loop over invoices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add customer id": {
      "main": [
        [
          {
            "node": "Get the product",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get the invoice": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get the product": {
      "main": [
        [
          {
            "node": "Add item id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send the invoice": {
      "main": [
        [
          {
            "node": "Add reminders config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Create the invoice": {
      "main": [
        [
          {
            "node": "Send the invoice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop over invoices": {
      "main": [
        [
          {
            "node": "Get today's sent reminders",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get the invoice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create the customer": {
      "main": [
        [
          {
            "node": "Add customer id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send reminder email": {
      "main": [
        [
          {
            "node": "Increase sent reminders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update the customer": {
      "main": [
        [
          {
            "node": "Add customer id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add reminders config": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Increase sent reminders": {
      "main": [
        [
          {
            "node": "If3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert invoice id to DB": {
      "main": [
        []
      ]
    },
    "Receive form submission": {
      "main": [
        [
          {
            "node": "Format data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get today's sent reminders": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule reminders trigger": {
      "main": [
        [
          {
            "node": "Add reminders config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if the customer exists": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}