使用Jotform、Xero、Outlook和Telegram自动创建发票和团队通知
高级
这是一个自动化工作流,包含 27 个节点。主要使用 If, Code, Wait, Xero, Switch 等节点。 使用Jotform、Xero、Outlook和Telegram自动创建发票并进行客户沟通
前置要求
- •HTTP Webhook 端点(n8n 会自动生成)
- •Telegram Bot Token
- •OpenAI API Key
分类
-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "ODMETlbW2svWuXdX",
"meta": {
"instanceId": "3549451ca835035557d5dc1c3d9e6ba924e7314534a74c901f66b91f9ef6023e",
"templateCredsSetupCompleted": true
},
"name": "使用 Jotform、Xero、Outlook 和 Telegram 自动创建发票和团队通知",
"tags": [],
"nodes": [
{
"id": "61d97eb7-9e7a-4ec4-a567-c03180ccdd0f",
"name": "接收表单提交",
"type": "n8n-nodes-base.webhook",
"position": [
-464,
0
],
"webhookId": "1d06aca8-7d95-4394-8630-87450e7a2fbe",
"parameters": {
"path": "1d06aca8-7d95-4394-8630-87450e7a2fbe",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 2.1
},
{
"id": "5ec3d9b8-46c4-41bc-98d6-bfb5bdfaf7a8",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-544,
-112
],
"parameters": {
"color": 7,
"width": 256,
"height": 320,
"content": "## 接收提交"
},
"typeVersion": 1
},
{
"id": "afa3abe6-529e-4a78-8272-0fdaa32bbfc4",
"name": "便签 7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1664,
-400
],
"parameters": {
"width": 1072,
"height": 1024,
"content": "## 使用 Jotform、Xero、Outlook 和 Telegram 自动创建发票和团队通知"
},
"typeVersion": 1
},
{
"id": "6bcd36c0-d53f-4316-97e4-b39ec65f0f7b",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-240,
-112
],
"parameters": {
"color": 7,
"width": 256,
"height": 320,
"content": "## 格式化数据"
},
"typeVersion": 1
},
{
"id": "e5a8345a-0044-443d-86bc-f7053bb8d9a0",
"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": "4c1db4b6-d961-4f5d-a691-4ac079848e20",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
512,
80
],
"parameters": {
"color": 7,
"width": 288,
"height": 320,
"content": "## 创建联系人"
},
"typeVersion": 1
},
{
"id": "02a78f6d-6ca5-43a9-b281-81e5192e0902",
"name": "便利贴5",
"type": "n8n-nodes-base.stickyNote",
"position": [
848,
-96
],
"parameters": {
"color": 7,
"width": 256,
"height": 320,
"content": "## 创建发票"
},
"typeVersion": 1
},
{
"id": "c9b24758-5f94-49ee-9947-fc4e2b5ef674",
"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": "0dc36d70-24f7-4131-bf75-11227c591466",
"name": "AI Agent",
"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": "31b485fd-94fa-489f-bb75-041686861752",
"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": "de5dee60-bf2b-4ec5-aad4-663da044dbef",
"name": "便签19",
"type": "n8n-nodes-base.stickyNote",
"position": [
1168,
-480
],
"parameters": {
"color": 7,
"width": 592,
"height": 480,
"content": "## 发送发票"
},
"typeVersion": 1
},
{
"id": "b4abfdca-dd13-4236-ae82-6ad9b9f54cba",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
64,
-112
],
"parameters": {
"color": 7,
"width": 400,
"height": 320,
"content": "## 检查联系人是否存在"
},
"typeVersion": 1
},
{
"id": "121a9b5c-577b-464d-a79a-9635d2431a29",
"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": "5687d623-08ed-48a1-a63a-12fe1d55cccf",
"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": "7048310b-d795-4d73-ae02-ba9532774c82",
"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": "25318bf6-5212-4700-bb88-8f59e3fb685f",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
512,
-304
],
"parameters": {
"color": 7,
"width": 288,
"height": 320,
"content": "## 更新联系人"
},
"typeVersion": 1
},
{
"id": "021f77f0-f990-4fc9-8bfd-82a2a0fc6fb2",
"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": "f0631c6e-26fe-40c2-af37-1521f763fd7d",
"name": "等待",
"type": "n8n-nodes-base.wait",
"position": [
1264,
240
],
"webhookId": "671e2bb8-e74d-4e29-abf0-c81e7ee68646",
"parameters": {
"amount": 30
},
"typeVersion": 1.1
},
{
"id": "4b7e6aa3-fbf5-410f-951e-6c8ed9d95b19",
"name": "AI Agent1",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1376,
672
],
"parameters": {
"text": "={{ $json }}",
"options": {
"systemMessage": "=You are an AI assistant that generates a telegram notification message for an invoice that has been created recently and no action/change has been done on it yet, the input that you will receive is an Xero invoice details response, so you will recive an Xero invoice response and thus your job is to create a telegram message that will notify the team about the invoice that has no actions on it yet so the team can act fast and accordingly."
},
"promptType": "define"
},
"executeOnce": false,
"typeVersion": 2.2
},
{
"id": "59f827be-d826-403c-8713-69bfbe4349e8",
"name": "OpenAI 聊天模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1376,
864
],
"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": "4664b6f4-d9a4-4056-ae80-bebff70c14c5",
"name": "便签20",
"type": "n8n-nodes-base.stickyNote",
"position": [
1168,
544
],
"parameters": {
"color": 7,
"width": 688,
"height": 480,
"content": "## 通知团队快速行动"
},
"typeVersion": 1
},
{
"id": "59351848-8223-47a3-9dfc-27aeedfa8cda",
"name": "便签 9",
"type": "n8n-nodes-base.stickyNote",
"position": [
1168,
112
],
"parameters": {
"color": 7,
"width": 288,
"height": 320,
"content": "## 等待一段时间"
},
"typeVersion": 1
},
{
"id": "2c7f5651-eb52-441b-9475-927ef22c4763",
"name": "便签10",
"type": "n8n-nodes-base.stickyNote",
"position": [
1504,
112
],
"parameters": {
"color": 7,
"width": 288,
"height": 320,
"content": "## 获取发票"
},
"typeVersion": 1
},
{
"id": "9ba91ea8-ab1c-4927-b638-d8cbafaf534b",
"name": "获取发票",
"type": "n8n-nodes-base.xero",
"position": [
1600,
240
],
"parameters": {
"invoiceId": "={{ $json.InvoiceID }}",
"operation": "get",
"organizationId": "bc9a44a6-eb14-4f81-b24c-ca676c506446"
},
"credentials": {
"xeroOAuth2Api": {
"id": "HZnbTfrr5leqrLUQ",
"name": "Xero account"
}
},
"typeVersion": 1
},
{
"id": "531f53e7-ebec-417b-9e46-cc5e5894af53",
"name": "分支",
"type": "n8n-nodes-base.switch",
"position": [
1216,
672
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "no change",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c8ceadc4-e291-4cf2-8577-20263a8014ed",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Create the invoice').item.json.Status }}",
"rightValue": "={{ $json.Status }}"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.3
},
{
"id": "78a0a705-1fc4-463f-b889-882b039fa6c8",
"name": "通知团队",
"type": "n8n-nodes-base.telegram",
"position": [
1680,
672
],
"webhookId": "7c470313-c47a-4a20-a65a-7ca05e65143a",
"parameters": {
"text": "={{ $json.output }}",
"chatId": "=",
"additionalFields": {}
},
"typeVersion": 1.2
},
{
"id": "83413816-6a78-475c-8b51-15e2153475bd",
"name": "发送电子邮件",
"type": "n8n-nodes-base.microsoftOutlook",
"position": [
1568,
-352
],
"webhookId": "b5b8c88e-fe37-4654-851e-c8e46a2d460d",
"parameters": {
"subject": "New Invoice",
"bodyContent": "={{ $json.output }}",
"toRecipients": "={{ $('Create the invoice').item.json.Contact.EmailAddress }}",
"additionalFields": {}
},
"typeVersion": 2
}
],
"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": "22162ab7-5bd4-47e2-ae4e-f12d91a01d11",
"connections": {
"5687d623-08ed-48a1-a63a-12fe1d55cccf": {
"main": [
[
{
"node": "021f77f0-f990-4fc9-8bfd-82a2a0fc6fb2",
"type": "main",
"index": 0
}
],
[
{
"node": "7048310b-d795-4d73-ae02-ba9532774c82",
"type": "main",
"index": 0
}
]
]
},
"f0631c6e-26fe-40c2-af37-1521f763fd7d": {
"main": [
[
{
"node": "9ba91ea8-ab1c-4927-b638-d8cbafaf534b",
"type": "main",
"index": 0
}
]
]
},
"531f53e7-ebec-417b-9e46-cc5e5894af53": {
"main": [
[
{
"node": "4b7e6aa3-fbf5-410f-951e-6c8ed9d95b19",
"type": "main",
"index": 0
}
]
]
},
"0dc36d70-24f7-4131-bf75-11227c591466": {
"main": [
[
{
"node": "83413816-6a78-475c-8b51-15e2153475bd",
"type": "main",
"index": 0
}
]
]
},
"4b7e6aa3-fbf5-410f-951e-6c8ed9d95b19": {
"main": [
[
{
"node": "78a0a705-1fc4-463f-b889-882b039fa6c8",
"type": "main",
"index": 0
}
]
]
},
"e5a8345a-0044-443d-86bc-f7053bb8d9a0": {
"main": [
[
{
"node": "121a9b5c-577b-464d-a79a-9635d2431a29",
"type": "main",
"index": 0
}
]
]
},
"021f77f0-f990-4fc9-8bfd-82a2a0fc6fb2": {
"main": [
[
{
"node": "c9b24758-5f94-49ee-9947-fc4e2b5ef674",
"type": "main",
"index": 0
}
]
]
},
"9ba91ea8-ab1c-4927-b638-d8cbafaf534b": {
"main": [
[
{
"node": "531f53e7-ebec-417b-9e46-cc5e5894af53",
"type": "main",
"index": 0
}
]
]
},
"31b485fd-94fa-489f-bb75-041686861752": {
"ai_languageModel": [
[
{
"node": "0dc36d70-24f7-4131-bf75-11227c591466",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"7048310b-d795-4d73-ae02-ba9532774c82": {
"main": [
[
{
"node": "c9b24758-5f94-49ee-9947-fc4e2b5ef674",
"type": "main",
"index": 0
}
]
]
},
"c9b24758-5f94-49ee-9947-fc4e2b5ef674": {
"main": [
[
{
"node": "f0631c6e-26fe-40c2-af37-1521f763fd7d",
"type": "main",
"index": 0
},
{
"node": "0dc36d70-24f7-4131-bf75-11227c591466",
"type": "main",
"index": 0
}
]
]
},
"59f827be-d826-403c-8713-69bfbe4349e8": {
"ai_languageModel": [
[
{
"node": "4b7e6aa3-fbf5-410f-951e-6c8ed9d95b19",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"61d97eb7-9e7a-4ec4-a567-c03180ccdd0f": {
"main": [
[
{
"node": "e5a8345a-0044-443d-86bc-f7053bb8d9a0",
"type": "main",
"index": 0
}
]
]
},
"121a9b5c-577b-464d-a79a-9635d2431a29": {
"main": [
[
{
"node": "5687d623-08ed-48a1-a63a-12fe1d55cccf",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用 Jotform、QuickBooks 和 Outlook 生成发票并发送提醒给客户
通过 Jotform、QuickBooks 和 Outlook AI 实现发票创建与智能提醒的自动化
If
Set
Code
+
If
Set
Code
48 节点AppUnits AI
使用 Jotform 和 Xero 为客户生成发票并发送提醒
使用Jotform和Xero生成发票并发送AI驱动的提醒
If
Set
Code
+
If
Set
Code
39 节点AppUnits AI
使用 Jotform、Xero 和 Slack 为客户生成发票
通过 Jotform、Xero 和 GPT-4o-mini 实现发票生成与邮件发送的自动化
If
Code
Xero
+
If
Code
Xero
20 节点AppUnits AI
为客户生成发票并发送提醒
使用QuickBooks、Jotform和GPT-4o自动生成发票和付款提醒
If
Set
Code
+
If
Set
Code
48 节点AppUnits AI
使用 Jotform 和 QuickBooks 为客户生成发票并发送提醒
使用Jotform和QuickBooks生成发票并发送AI摘要提醒
If
Set
Code
+
If
Set
Code
48 节点AppUnits AI
使用GPT-4o、WordPress和LinkedIn发布自动化RSS内容到博客
使用GPT-4o、WordPress和LinkedIn发布自动化RSS内容到博客文章
If
Set
Code
+
If
Set
Code
40 节点Immanuel
人工智能