8
n8n 한국어amn8n.com

Jotform, Xero 및 Slack을 사용하여 고객용 인보이스 생성

고급

이것은자동화 워크플로우로, 20개의 노드를 포함합니다.주로 If, Code, Xero, Slack, Webhook 등의 노드를 사용하며. Jotform, Xero 및 GPT-4o-mini를 통한 인보이스 생성 및 이메일 발송 자동화

사전 요구사항
  • Slack Bot Token 또는 Webhook URL
  • HTTP Webhook 엔드포인트(n8n이 자동으로 생성)
  • OpenAI API Key

카테고리

-
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "id": "X2u0Wnuo2Yp8dSaq",
  "meta": {
    "instanceId": "3549451ca835035557d5dc1c3d9e6ba924e7314534a74c901f66b91f9ef6023e",
    "templateCredsSetupCompleted": true
  },
  "name": "Generate Invoices for Customers with Jotform, Xero and Slack",
  "tags": [],
  "nodes": [
    {
      "id": "5153a36b-decc-4145-bfb5-903123d3ed32",
      "name": "양식 제출 수신",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -464,
        0
      ],
      "webhookId": "dac28968-ec17-41da-b720-c579c1a7169b",
      "parameters": {
        "path": "dac28968-ec17-41da-b720-c579c1a7169b",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "a4e41795-f814-4f53-ae06-c004d9f2fe61",
      "name": "메모",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        -112
      ],
      "parameters": {
        "color": 7,
        "width": 256,
        "height": 320,
        "content": "## Receive Submission\nReceives the product/service form submission from Jotform"
      },
      "typeVersion": 1
    },
    {
      "id": "5d0f264c-57ab-4aa8-93a9-4a45a2ffe060",
      "name": "메모3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        80
      ],
      "parameters": {
        "color": 7,
        "width": 288,
        "height": 320,
        "content": "## Create Contact\nCreates a new contact"
      },
      "typeVersion": 1
    },
    {
      "id": "601c08b9-547d-4883-bdc0-c0e2725fb5c9",
      "name": "메모5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        -96
      ],
      "parameters": {
        "color": 7,
        "width": 256,
        "height": 320,
        "content": "## Create The Invoice\nCreates a new invoice for that contact"
      },
      "typeVersion": 1
    },
    {
      "id": "87296102-7ff7-4a22-a451-40749a219450",
      "name": "메모7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1328,
        -480
      ],
      "parameters": {
        "width": 736,
        "height": 992,
        "content": "## Generate Invoices for Customers with Jotform, Xero and Slack\nThis workflow automates the entire process of receiving a product/service order, checking or creating a customer in **Xero**, generating an invoice, emailing it, and notifying the sales team for example (via **Slack**)  — all triggered by a form submission (via **Jotform**).\n\n## How It Works\n### 1- Receive Submission\n* Triggered when a user submits a form.\n* Collects data like customer details, selected product/service, etc.\n\n### 2- Check If Customer Exists\n* Searches Xero to determine if the customer already exists.\n* ✅ **If Customer Exists:** **Update** customer details.\n* ❌ **If Customer Doesn’t Exist:** **Create** a new customer in Xero.\n\n### 3- Create The Invoice\n* Generates a new invoice for the customer using the item selected.\n\n### 4- Send The Invoice\n* Automatically sends the invoice via email to the customer.\n\n### 5- Notify The Team\n* Notifies the sales team for example via Slack about the new invoice.\n\n## Who Can Benefit from This Workflow?\n* **Freelancers**\n* **Service Providers**\n* **Consultants & Coaches**\n* **Small Businesses**\n* **E-commerce or Custom Product Sellers**\n\n## Requirements\n- Jotform webhook setup, more info [here](https://www.jotform.com/help/245-how-to-setup-a-webhook-with-jotform/)\n- Xero credentials, more info [here](https://docs.n8n.io/integrations/builtin/credentials/xero)\n- Make sure that products/services values in Jotform are exactly the same as your item `Code` in your Xero account\n- Email setup, update email node (`Send email`)\n- LLM model credentials\n- Slack credentials, more info [here](https://docs.n8n.io/integrations/builtin/credentials/slack)"
      },
      "typeVersion": 1
    },
    {
      "id": "bea06527-f4fb-4c06-acec-80e540753990",
      "name": "메모8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -112
      ],
      "parameters": {
        "color": 7,
        "width": 256,
        "height": 320,
        "content": "## Format Data\nFormats the data thus making it easier to be used in other nodes"
      },
      "typeVersion": 1
    },
    {
      "id": "6f8c1525-ee7e-4d10-a0c0-641abe512e47",
      "name": "데이터 형식 지정",
      "type": "n8n-nodes-base.code",
      "position": [
        -160,
        0
      ],
      "parameters": {
        "jsCode": "function extractAddressData(text) {\n  const regex = /Street Address:\\s*([^<]+)<br>Street Address Line 2:\\s*([^<]+)<br>City:\\s*([^<]+)<br>State \\/ Province:\\s*([^<]+)<br>Postal \\/ Zip Code:\\s*([^<]+)<br>Country:\\s*([^<]+)<br>/;\n  const matches = text.match(regex);\n  \n  if (matches) {\n    return {\n      line1: matches[1].trim(),\n      line2: matches[2].trim(),\n      city: matches[3].trim(),\n      stateProvince: matches[4].trim(),\n      postalZipCode: matches[5].trim(),\n      country: matches[6].trim()\n    };\n  }\n  \n  return {\n    line1: null,\n    line2: null,\n    city: null,\n    stateProvince: null,\n    postalZipCode: null,\n    country: null\n  }\n}\n\nreturn {\n  address: extractAddressData($input.first().json.body.billingAddress),\n  customer: {\n    name: $input.first().json.body.name,\n    email: $input.first().json.body.email,\n    phone: $input.first().json.body.phone\n  },\n  item: {\n    name: $input.first().json.body.itemName\n  }\n}"
      },
      "typeVersion": 2
    },
    {
      "id": "57002967-0cc2-416a-9b2d-5e0d7425e173",
      "name": "송장 생성",
      "type": "n8n-nodes-base.xero",
      "position": [
        928,
        16
      ],
      "parameters": {
        "type": "ACCREC",
        "contactId": "={{ $json.ContactID }}",
        "lineItemsUi": {
          "lineItemsValues": [
            {
              "taxType": "INPUT",
              "itemCode": "={{ $('Format data').item.json.item.name }}",
              "unitAmount": "10",
              "accountCode": "200"
            }
          ]
        },
        "organizationId": "bc9a44a6-eb14-4f81-b24c-ca676c506446",
        "additionalFields": {}
      },
      "credentials": {
        "xeroOAuth2Api": {
          "id": "HZnbTfrr5leqrLUQ",
          "name": "Xero account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "606e45ad-d5b6-4a96-ac41-d2fd73bad8d3",
      "name": "AI 에이전트",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1280,
        -352
      ],
      "parameters": {
        "text": "={{ $json }}",
        "options": {
          "systemMessage": "=You are an AI assistant that generates a professional invoice email that you get from an Xero response (newly created invoice), so you will recive an Xero invoice response and thus your job is to create a professional html email content because this html email content will be sent to the customer."
        },
        "promptType": "define"
      },
      "executeOnce": false,
      "typeVersion": 2.2
    },
    {
      "id": "486a7fee-acd9-46ad-bf2b-1bc815bfb2a4",
      "name": "OpenAI 채팅 모델",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1280,
        -144
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "ns8LVe1zpSS3Kw9p",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "da747ce1-ddcf-4c40-a78d-452d68cac37b",
      "name": "메모19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1168,
        -480
      ],
      "parameters": {
        "color": 7,
        "width": 592,
        "height": 480,
        "content": "## Send The Invoice\nSends the newly created invoice for that customer(via email)"
      },
      "typeVersion": 1
    },
    {
      "id": "0873e856-7c8a-46cf-b7d1-c7a75afb0c6a",
      "name": "이메일 발송",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1552,
        -352
      ],
      "webhookId": "8f9ba8d7-7a97-4926-b640-8dc93c30eed8",
      "parameters": {
        "html": "={{ $json.output }}",
        "options": {},
        "subject": "=New Invoice",
        "toEmail": "={{ $('Create the invoice').item.json.Contact.EmailAddress }}",
        "fromEmail": "system@example.com"
      },
      "credentials": {
        "smtp": {
          "id": "awV8UBK3MYzosMxe",
          "name": "Mailtrap SMTP account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "1af9a24d-7ac1-47b4-a17a-2774f01c860c",
      "name": "메모1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        -112
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 320,
        "content": "## Check If Contact exists \nChecks if the contact exists in Xero or not"
      },
      "typeVersion": 1
    },
    {
      "id": "994373c3-4f87-48cc-a30e-d34b0b345f12",
      "name": "고객 존재 여부 확인",
      "type": "n8n-nodes-base.xero",
      "position": [
        128,
        0
      ],
      "parameters": {
        "limit": 1,
        "options": {
          "where": "=EmailAddress=\"{{ $json.customer.email }}\""
        },
        "resource": "contact",
        "operation": "getAll",
        "organizationId": "bc9a44a6-eb14-4f81-b24c-ca676c506446"
      },
      "credentials": {
        "xeroOAuth2Api": {
          "id": "HZnbTfrr5leqrLUQ",
          "name": "Xero account"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "14c4b4df-ce15-4e52-a89e-5a92db87b86b",
      "name": "조건문",
      "type": "n8n-nodes-base.if",
      "position": [
        304,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "bfa24559-7702-4ebf-909d-c5c2a60ad817",
              "operator": {
                "type": "object",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json }}",
              "rightValue": 0
            },
            {
              "id": "b4301cfe-a22a-490f-a72b-50d266bc1c5e",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.ContactID }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "b6eb0744-cb7e-4676-91d5-6272ceb21924",
      "name": "새 연락처 생성",
      "type": "n8n-nodes-base.xero",
      "position": [
        608,
        192
      ],
      "parameters": {
        "name": "={{ $('Format data').item.json.customer.name }}",
        "resource": "contact",
        "organizationId": "bc9a44a6-eb14-4f81-b24c-ca676c506446",
        "additionalFields": {
          "phonesUi": {
            "phonesValues": [
              {
                "phoneType": "MOBILE",
                "phoneNumber": "={{ $('Format data').item.json.customer.phone }}"
              }
            ]
          },
          "addressesUi": {
            "addressesValues": [
              {
                "city": "={{ $('Format data').item.json.address.city }}",
                "type": "STREET",
                "line1": "={{ $('Format data').item.json.address.line1 }}",
                "line2": "={{ $('Format data').item.json.address.line2 }}",
                "region": "={{ $('Format data').item.json.address.stateProvince }}",
                "country": "={{ $('Format data').item.json.address.country }}",
                "postalCode": "={{ $('Format data').item.json.address.postalZipCode }}"
              }
            ]
          },
          "emailAddress": "={{ $('Format data').item.json.customer.email }}"
        }
      },
      "credentials": {
        "xeroOAuth2Api": {
          "id": "HZnbTfrr5leqrLUQ",
          "name": "Xero account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c035f5c2-0822-4b73-b553-4a06c39bc867",
      "name": "메모4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        -304
      ],
      "parameters": {
        "color": 7,
        "width": 288,
        "height": 320,
        "content": "## Update Contact\nUpdates the contact"
      },
      "typeVersion": 1
    },
    {
      "id": "bc245137-a2fa-4817-bf79-e6bd0bcd4688",
      "name": "연락처 업데이트",
      "type": "n8n-nodes-base.xero",
      "position": [
        608,
        -192
      ],
      "parameters": {
        "resource": "contact",
        "contactId": "={{ $json.ContactID }}",
        "operation": "update",
        "updateFields": {
          "name": "={{ $('Format data').item.json.customer.name }}",
          "phonesUi": {
            "phonesValues": [
              {
                "phoneType": "MOBILE",
                "phoneNumber": "={{ $('Format data').item.json.customer.phone }}"
              }
            ]
          }
        },
        "organizationId": "bc9a44a6-eb14-4f81-b24c-ca676c506446"
      },
      "credentials": {
        "xeroOAuth2Api": {
          "id": "HZnbTfrr5leqrLUQ",
          "name": "Xero account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ecf29c2f-7e91-41d1-a99b-8a2de86b7ce0",
      "name": "메모6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1168,
        112
      ],
      "parameters": {
        "color": 7,
        "width": 288,
        "height": 320,
        "content": "## Notify The Team\nNotifies the team (sales team for example) about the new invoice"
      },
      "typeVersion": 1
    },
    {
      "id": "09ccbef2-8aa7-4b19-8e8b-86d6aa647298",
      "name": "팀에 알림",
      "type": "n8n-nodes-base.slack",
      "position": [
        1264,
        240
      ],
      "webhookId": "e19cadcc-f539-4184-8451-9923be34b8ca",
      "parameters": {
        "text": "=<!channel> A new invoice with the below details have bene created:\n*Invoice Number:* {{ $json.InvoiceNumber }}\n*Amount Due:* {{ $json.AmountDue }} ({{ $json.CurrencyCode }})\n*Status:* {{ $json.Status }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "#test"
        },
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "id": "mRsbuKKHsrN3Qgaj",
          "name": "Slack account"
        }
      },
      "typeVersion": 2.3
    }
  ],
  "active": false,
  "pinData": {
    "Receive form submission": [
      {
        "json": {
          "body": {
            "name": "Adrian Mathews",
            "email": "yoled82772@elygifts.com",
            "phone": "(116) 777-9916",
            "itemName": "Design",
            "billingAddress": "Street Address: Nulla quia debitis est quam facilis amet enim cupidatat officia autem consequatur qui quis dolorem<br>Street Address Line 2: Possimus perferendis ad veritatis quia animi<br>City: Voluptatibus eveniet harum unde dolor doloremque cumque dol<br>State / Province: Reprehenderit rerum voluptas magni ut minim ad deleniti eni<br>Postal / Zip Code: 17167<br>Country: Seychelles<br>"
          }
        }
      }
    ]
  },
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "f403ca7a-cd06-4122-ab76-c7cbc0f93d93",
  "connections": {
    "14c4b4df-ce15-4e52-a89e-5a92db87b86b": {
      "main": [
        [
          {
            "node": "bc245137-a2fa-4817-bf79-e6bd0bcd4688",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "b6eb0744-cb7e-4676-91d5-6272ceb21924",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "606e45ad-d5b6-4a96-ac41-d2fd73bad8d3": {
      "main": [
        [
          {
            "node": "0873e856-7c8a-46cf-b7d1-c7a75afb0c6a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6f8c1525-ee7e-4d10-a0c0-641abe512e47": {
      "main": [
        [
          {
            "node": "994373c3-4f87-48cc-a30e-d34b0b345f12",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bc245137-a2fa-4817-bf79-e6bd0bcd4688": {
      "main": [
        [
          {
            "node": "57002967-0cc2-416a-9b2d-5e0d7425e173",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "486a7fee-acd9-46ad-bf2b-1bc815bfb2a4": {
      "ai_languageModel": [
        [
          {
            "node": "606e45ad-d5b6-4a96-ac41-d2fd73bad8d3",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "b6eb0744-cb7e-4676-91d5-6272ceb21924": {
      "main": [
        [
          {
            "node": "57002967-0cc2-416a-9b2d-5e0d7425e173",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "57002967-0cc2-416a-9b2d-5e0d7425e173": {
      "main": [
        [
          {
            "node": "606e45ad-d5b6-4a96-ac41-d2fd73bad8d3",
            "type": "main",
            "index": 0
          },
          {
            "node": "09ccbef2-8aa7-4b19-8e8b-86d6aa647298",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5153a36b-decc-4145-bfb5-903123d3ed32": {
      "main": [
        [
          {
            "node": "6f8c1525-ee7e-4d10-a0c0-641abe512e47",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "994373c3-4f87-48cc-a30e-d34b0b345f12": {
      "main": [
        [
          {
            "node": "14c4b4df-ce15-4e52-a89e-5a92db87b86b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

이 워크플로우를 어떻게 사용하나요?

위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.

이 워크플로우는 어떤 시나리오에 적합한가요?

고급

유료인가요?

이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.

워크플로우 정보
난이도
고급
노드 수20
카테고리-
노드 유형9
난이도 설명

고급 사용자를 위한 16+개 노드의 복잡한 워크플로우

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34