8
n8n 한국어amn8n.com

JotForm, Xero 및 Gmail을 사용하여 고객에게 인보이스 생성

중급

이것은자동화 워크플로우로, 13개의 노드를 포함합니다.주로 Code, Xero, Gmail, Webhook, Agent 등의 노드를 사용하며. Jotform, Xero 및 GPT 드라이브로 전문 인보이스 생성

사전 요구사항
  • Google 계정 및 Gmail API 인증 정보
  • HTTP Webhook 엔드포인트(n8n이 자동으로 생성)
  • OpenAI API Key

카테고리

-
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "id": "UVDQqxGZJ1zaxyNj",
  "meta": {
    "instanceId": "3549451ca835035557d5dc1c3d9e6ba924e7314534a74c901f66b91f9ef6023e",
    "templateCredsSetupCompleted": true
  },
  "name": "Generate Invoices for Customers with Jotform, Xero and Gmail",
  "tags": [],
  "nodes": [
    {
      "id": "065aeee4-b7de-4e08-a95e-1c4846861411",
      "name": "양식 제출 수신",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -464,
        0
      ],
      "webhookId": "bf87ee72-aecf-44e5-a466-3d0144da2221",
      "parameters": {
        "path": "bf87ee72-aecf-44e5-a466-3d0144da2221",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "4b4284d5-10b9-439e-99f0-08f9c48fc683",
      "name": "Sticky Note",
      "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": "33e3c8d0-02d4-4887-973a-106988ebe9d4",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        -112
      ],
      "parameters": {
        "color": 7,
        "width": 288,
        "height": 320,
        "content": "## Create/Update Contact\nCreates or updates the contact"
      },
      "typeVersion": 1
    },
    {
      "id": "dc1c4f42-d6c8-455b-9c2b-4004a990eb21",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -112
      ],
      "parameters": {
        "color": 7,
        "width": 256,
        "height": 320,
        "content": "## Create The Invoice\nCreates a new invoice for that contact"
      },
      "typeVersion": 1
    },
    {
      "id": "aaf471ff-be4d-4bc7-9132-c45a01bdd5d1",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1328,
        -400
      ],
      "parameters": {
        "width": 736,
        "height": 832,
        "content": "## Generate Invoices for Customers with Jotform, Xero and Gmail\nThis workflow automates the entire process of receiving a product/service order, checking or creating a customer in **Xero**, generating an invoice, and emailing it — 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- Create/Update The Customer\n* Creates/Updates the customer.\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## 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`), more info about Gmail setup [here](https://docs.n8n.io/integrations/builtin/credentials/google)\n- LLM model credentials"
      },
      "typeVersion": 1
    },
    {
      "id": "c391a307-3bef-45c9-8310-8110e7058a37",
      "name": "Sticky Note8",
      "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": "7fac0a20-8cf3-4dfc-b65d-9b59444f1c61",
      "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": "28d16066-551a-4205-b24d-4759d02d881e",
      "name": "연락처 생성/업데이트",
      "type": "n8n-nodes-base.xero",
      "position": [
        160,
        0
      ],
      "parameters": {
        "name": "={{ $json.customer.name }}",
        "resource": "contact",
        "organizationId": "bc9a44a6-eb14-4f81-b24c-ca676c506446",
        "additionalFields": {
          "phonesUi": {
            "phonesValues": [
              {
                "phoneType": "MOBILE",
                "phoneNumber": "={{ $json.customer.phone }}"
              }
            ]
          },
          "addressesUi": {
            "addressesValues": [
              {
                "city": "={{ $json.address.city }}",
                "type": "STREET",
                "line1": "={{ $json.address.line1 }}",
                "line2": "={{ $json.address.line2 }}",
                "region": "={{ $json.address.stateProvince }}",
                "country": "={{ $json.address.country }}",
                "postalCode": "={{ $json.address.postalZipCode }}"
              }
            ]
          },
          "emailAddress": "={{ $json.customer.email }}"
        }
      },
      "credentials": {
        "xeroOAuth2Api": {
          "id": "HZnbTfrr5leqrLUQ",
          "name": "Xero account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "46594f4d-9682-4298-a366-40bcb54c9ccb",
      "name": "송장 생성",
      "type": "n8n-nodes-base.xero",
      "position": [
        480,
        0
      ],
      "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": "3b291d2e-a98a-474e-aaf2-8edd4bd734f1",
      "name": "AI 에이전트",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        816,
        -64
      ],
      "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": "d770459b-7a80-4abb-8609-aece00840acb",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        816,
        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": "ce21e6a5-1657-49ec-979e-d14c7f578364",
      "name": "Sticky Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        704,
        -192
      ],
      "parameters": {
        "color": 7,
        "width": 592,
        "height": 480,
        "content": "## Send The Invoice\nSends the newly created invoice for that customer(via email)"
      },
      "typeVersion": 1
    },
    {
      "id": "d661fc32-c68c-463d-b815-2f342a3ac011",
      "name": "이메일 전송",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1088,
        -64
      ],
      "webhookId": "34d9e2cd-ada9-43de-b476-36ae61b9ff32",
      "parameters": {
        "sendTo": "={{ $('Create the invoice').item.json.Contact.EmailAddress }}",
        "message": "={{ $json.output }}",
        "options": {},
        "subject": "New Invoice"
      },
      "typeVersion": 2.1
    }
  ],
  "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": "d514ba5d-30a5-4cfb-b09f-b1a611151c1f",
  "connections": {
    "3b291d2e-a98a-474e-aaf2-8edd4bd734f1": {
      "main": [
        [
          {
            "node": "d661fc32-c68c-463d-b815-2f342a3ac011",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7fac0a20-8cf3-4dfc-b65d-9b59444f1c61": {
      "main": [
        [
          {
            "node": "28d16066-551a-4205-b24d-4759d02d881e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d770459b-7a80-4abb-8609-aece00840acb": {
      "ai_languageModel": [
        [
          {
            "node": "3b291d2e-a98a-474e-aaf2-8edd4bd734f1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "46594f4d-9682-4298-a366-40bcb54c9ccb": {
      "main": [
        [
          {
            "node": "3b291d2e-a98a-474e-aaf2-8edd4bd734f1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "065aeee4-b7de-4e08-a95e-1c4846861411": {
      "main": [
        [
          {
            "node": "7fac0a20-8cf3-4dfc-b65d-9b59444f1c61",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "28d16066-551a-4205-b24d-4759d02d881e": {
      "main": [
        [
          {
            "node": "46594f4d-9682-4298-a366-40bcb54c9ccb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

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

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

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

중급

유료인가요?

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

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

일정 경험을 가진 사용자를 위한 6-15개 노드의 중간 복잡도 워크플로우

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34