AI驱动的员工数据库管理系统,通过Telegram使用OpenAI和Airtable
这是一个HR, AI领域的自动化工作流,包含 25 个节点。主要使用 Airtable, Telegram, AirtableTool, Agent, TelegramTrigger 等节点,结合人工智能技术实现智能自动化。 AI驱动的员工数据库管理系统,通过Telegram使用OpenAI和Airtable
- •Airtable API Key
- •Telegram Bot Token
- •OpenAI API Key
使用的节点 (25)
{
"meta": {
"instanceId": "d1786ab0d745a7498abf13a9c2cdabb1374c006e889b79eef64ce0386b8f8a41"
},
"nodes": [
{
"id": "610755a7-53d6-4e98-9e66-06bf751bb1d8",
"name": "Telegram触发器",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-260,
-40
],
"webhookId": "5971294c-ab28-481a-83b5-efa64d93554f",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "HtvibSVWl4VexYu9",
"name": "Employee Database Management"
}
},
"typeVersion": 1.2
},
{
"id": "cb89c97f-cce1-4cc6-b836-9c4e38d5e09a",
"name": "创建员工 AI 代理工具",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
-600,
560
],
"parameters": {
"workflowId": {
"__rl": true,
"mode": "list",
"value": "uOrbNX2DcYJ0iAyv",
"cachedResultName": "employee database management"
},
"description": "创建员工 AI 代理工具",
"workflowInputs": {
"value": {
"query": "={{ $json.message.text }}",
"action": "=create"
},
"schema": [
{
"id": "query",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "query",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "action",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "action",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"query"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"typeVersion": 2.2
},
{
"id": "25109ff2-216a-4ac8-a92a-1f6c55a0ee4b",
"name": "从 Airtable 工具获取部门数据",
"type": "n8n-nodes-base.airtableTool",
"position": [
-120,
560
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appgVjZcaRP8BsKf0",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0",
"cachedResultName": "HR Database"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblB0xec7TL36pDgC",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0/tblB0xec7TL36pDgC",
"cachedResultName": "Departments"
},
"options": {
"fields": [
"Department Name",
"Department Description"
]
},
"operation": "search",
"descriptionType": "manual",
"filterByFormula": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Filter_By_Formula', ``, 'string') }}",
"toolDescription": "Get departments data from airtable tool"
},
"credentials": {
"airtableTokenApi": {
"id": "r2IibdsQurA56LDa",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "d4ab33a8-f6a4-41b3-b824-cc741f4ea73e",
"name": "从 Airtable 工具获取职位数据",
"type": "n8n-nodes-base.airtableTool",
"position": [
40,
560
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appgVjZcaRP8BsKf0",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0",
"cachedResultName": "HR Database"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblnyWkG6BTpxjMzo",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0/tblnyWkG6BTpxjMzo",
"cachedResultName": "Job Titles"
},
"options": {
"fields": [
"Job Title",
"Job Description"
]
},
"operation": "search",
"descriptionType": "manual",
"filterByFormula": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Filter_By_Formula', ``, 'string') }}",
"toolDescription": "Get job titles data from airtable tool"
},
"credentials": {
"airtableTokenApi": {
"id": "r2IibdsQurA56LDa",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "f747f3e3-8daf-4bc9-88c3-fc86e05b810b",
"name": "从 Airtable 工具获取员工数据",
"type": "n8n-nodes-base.airtableTool",
"position": [
200,
560
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appgVjZcaRP8BsKf0",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0",
"cachedResultName": "HR Database"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblGIVbpACRwWzzlp",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0/tblGIVbpACRwWzzlp",
"cachedResultName": "Employees"
},
"options": {
"fields": [
"Full Name",
"Email",
"Phone Number",
"Job Title (from Job Titles)",
"Reports To (from Employees)",
"Department Name (from Department)",
"Employee Status"
]
},
"operation": "search",
"descriptionType": "manual",
"filterByFormula": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Filter_By_Formula', ``, 'string') }}",
"toolDescription": "Get employees data from airtable tool"
},
"credentials": {
"airtableTokenApi": {
"id": "r2IibdsQurA56LDa",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "970a4e1d-1bd9-48e0-bfae-e4367407bfb2",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-620,
200
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "MGwGMKEkdcjzlYCw",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "ffbf46c6-1c93-4728-bb7a-64c4b8460c99",
"name": "简单记忆",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-580,
340
],
"parameters": {
"sessionKey": "={{ $json.message.chat.id }}",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "218f11e0-2382-4ac3-9217-6cdf9163a857",
"name": "向用户发送消息",
"type": "n8n-nodes-base.telegram",
"position": [
40,
220
],
"webhookId": "507c9446-fd78-4695-8dd2-7c348390a4db",
"parameters": {
"text": "={{ $json.output }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "HtvibSVWl4VexYu9",
"name": "Employee Database Management"
}
},
"typeVersion": 1.2
},
{
"id": "3e3645f2-33d6-4da2-b6a8-6d9c1c35285f",
"name": "创建部门工具",
"type": "n8n-nodes-base.airtableTool",
"position": [
-440,
560
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appgVjZcaRP8BsKf0",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0",
"cachedResultName": "HR Database"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblB0xec7TL36pDgC",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0/tblB0xec7TL36pDgC",
"cachedResultName": "Departments"
},
"columns": {
"value": {
"Department Name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Department_Name', ``, 'string') }}",
"Department Description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Department_Description', ``, 'string') }}"
},
"schema": [
{
"id": "Department Name",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Department Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Department Description",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Department Description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Department Head",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Department Head",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Job Titles",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Job Titles",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Employees",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Employees",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Department Name"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"typecast": true
},
"operation": "create",
"descriptionType": "manual",
"toolDescription": "Create department tool"
},
"credentials": {
"airtableTokenApi": {
"id": "r2IibdsQurA56LDa",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "eee21e79-e3e7-4c42-93ea-d5255e6adfe0",
"name": "创建职位工具",
"type": "n8n-nodes-base.airtableTool",
"position": [
-280,
560
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appgVjZcaRP8BsKf0",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0",
"cachedResultName": "HR Database"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblnyWkG6BTpxjMzo",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0/tblnyWkG6BTpxjMzo",
"cachedResultName": "Job Titles"
},
"columns": {
"value": {
"Job Title": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Job_Title', ``, 'string') }}",
"Job Description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Job_Description', ``, 'string') }}"
},
"schema": [
{
"id": "Job Title",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Job Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Job Description",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Job Description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Department associated with the job title",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Department associated with the job title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Employees",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Employees",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Job Title"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"typecast": true
},
"operation": "create",
"descriptionType": "manual",
"toolDescription": "Create job title tool"
},
"credentials": {
"airtableTokenApi": {
"id": "r2IibdsQurA56LDa",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "2fa37bd2-658f-4da4-bd4f-ccc9c69e681f",
"name": "删除员工工具",
"type": "n8n-nodes-base.airtableTool",
"position": [
380,
560
],
"parameters": {
"id": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Record_ID', ``, 'string') }}",
"base": {
"__rl": true,
"mode": "list",
"value": "appgVjZcaRP8BsKf0",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0",
"cachedResultName": "HR Database"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblGIVbpACRwWzzlp",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0/tblGIVbpACRwWzzlp",
"cachedResultName": "Employees"
},
"operation": "deleteRecord",
"descriptionType": "manual",
"toolDescription": "Delete employee tool"
},
"credentials": {
"airtableTokenApi": {
"id": "r2IibdsQurA56LDa",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "a22e7543-65b6-4112-b303-b3395d74ea73",
"name": "员工管理 AI 代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-360,
220
],
"parameters": {
"text": "=User Request:\n{{ $json.message.text }}",
"options": {
"systemMessage": "=You are employee database management specialist\n\nCall the right tools based on the request:\n\n//\nUser wants to create new employee:\ncall Create Employee AI Agent tool\n//\n\n//\nUser wants to delete:\nPass the employee id to Delete employee tool\nrun Delete employee tool\n//\n\n//\nUser wants to create department data:\ncall \"Create department tool\"\n//\n\n//\nUser wants to create job title data:\ncall \"Create Job Title tool\"\n//\n\n//\nUser wants get department data:\ncall Get departments data from airtable tool\n//\n\n//\nUser wants get employee data:\ncall Get employees data from airtable tool\n//\n\nImportant notes:\nOnly call 1 tool max, choose the most suitable tool\nFor getting data, no need to output the airtable id, example for getting department data => show only name and description (without id)"
},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "96f559f9-630c-4c67-b833-6de797d5a65e",
"name": "从 Airtable 获取部门数据",
"type": "n8n-nodes-base.airtableTool",
"position": [
-340,
1120
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appgVjZcaRP8BsKf0",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0",
"cachedResultName": "HR Database"
},
"limit": 1,
"table": {
"__rl": true,
"mode": "list",
"value": "tblB0xec7TL36pDgC",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0/tblB0xec7TL36pDgC",
"cachedResultName": "Departments"
},
"options": {},
"operation": "search",
"returnAll": false,
"descriptionType": "manual",
"filterByFormula": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Filter_By_Formula', ``, 'string') }}",
"toolDescription": "Get departments data from airtable"
},
"credentials": {
"airtableTokenApi": {
"id": "r2IibdsQurA56LDa",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "f94ae85a-f15c-4e93-857a-ba03efd858f5",
"name": "从 Airtable 获取职位数据",
"type": "n8n-nodes-base.airtableTool",
"position": [
-180,
1120
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appgVjZcaRP8BsKf0",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0",
"cachedResultName": "HR Database"
},
"limit": 1,
"table": {
"__rl": true,
"mode": "list",
"value": "tblnyWkG6BTpxjMzo",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0/tblnyWkG6BTpxjMzo",
"cachedResultName": "Job Titles"
},
"options": {},
"operation": "search",
"returnAll": false,
"descriptionType": "manual",
"filterByFormula": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Filter_By_Formula', ``, 'string') }}",
"toolDescription": "Get job titles data from airtable"
},
"credentials": {
"airtableTokenApi": {
"id": "r2IibdsQurA56LDa",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "f7ea09f6-beca-47c4-9b49-91b14ba29dc1",
"name": "创建员工 AI 代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-280,
760
],
"parameters": {
"text": "=User message:\n{{ $json.query }}",
"options": {
"systemMessage": "=```\nYou are an airtable database management agent\n\nthe exact column name on airtable is:\nDepartment name\nJob title\n\ndont use any other name combination like underscore\n\nfirst check if {Department name} and {job title} exist\n\nif department name and job title doesnt exist:\ncreate new department and job title then output the airtable id\nif end\n\nif department name and job title exist:\noutput the department and job title existing airtable id\nif end\n\nCall the create employee tools and pass the job_title_id and department_id\n\nOutput in json format:\n{\n \"department_id\":\"recxxxxxxx\",\n \"job_title_id\":\"recxxxxxxx\",\n \"new_employee_id\": \"recxxxxxxx\"\n}\n\n\n```\n"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.9
},
{
"id": "418e5d02-5dea-43a8-be1b-bf145a499dd0",
"name": "当由其他工作流执行时",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
-520,
760
],
"parameters": {
"inputSource": "jsonExample",
"jsonExample": "{\n \"query\":\"test\",\n \"action\":\"create\"\n}"
},
"typeVersion": 1.1
},
{
"id": "d5370dbe-c157-48bc-ae9a-4e1b1ce4ade4",
"name": "编辑字段",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
460,
1120
],
"parameters": {
"jsonSchemaExample": "{\n \"department_id\":\"recxxxxxxx\",\n \"job_title_id\":\"recxxxxxxx\",\n \"new_employee_id\": \"recxxxxxxx\"\n}"
},
"typeVersion": 1.2
},
{
"id": "fcbab5ed-6c32-4ced-8ff4-d8ed35aa393a",
"name": "创建部门",
"type": "n8n-nodes-base.airtableTool",
"position": [
-20,
1120
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appgVjZcaRP8BsKf0",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0",
"cachedResultName": "HR Database"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblB0xec7TL36pDgC",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0/tblB0xec7TL36pDgC",
"cachedResultName": "Departments"
},
"columns": {
"value": {
"Department Name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Department_Name', ``, 'string') }}",
"Department Description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Department_Description', ``, 'string') }}"
},
"schema": [
{
"id": "Department Name",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Department Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Department Description",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Department Description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Department Head",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Department Head",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Job Titles",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Job Titles",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Employees",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Employees",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"typecast": true
},
"operation": "create",
"descriptionType": "manual",
"toolDescription": "Create department"
},
"credentials": {
"airtableTokenApi": {
"id": "r2IibdsQurA56LDa",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "c33a70a6-c3af-46a2-8100-d007a56e14e9",
"name": "创建职位",
"type": "n8n-nodes-base.airtableTool",
"position": [
140,
1120
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appgVjZcaRP8BsKf0",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0",
"cachedResultName": "HR Database"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblnyWkG6BTpxjMzo",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0/tblnyWkG6BTpxjMzo",
"cachedResultName": "Job Titles"
},
"columns": {
"value": {
"Job Title": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Job_Title', ``, 'string') }}",
"Job Description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Job_Description', ``, 'string') }}"
},
"schema": [
{
"id": "Job Title",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Job Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Job Description",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Job Description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Department associated with the job title",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Department associated with the job title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Employees",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Employees",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"typecast": true
},
"operation": "create",
"descriptionType": "manual",
"toolDescription": "Create job title"
},
"credentials": {
"airtableTokenApi": {
"id": "r2IibdsQurA56LDa",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "73680e43-507f-4617-ae32-6fbf15fde13f",
"name": "创建员工",
"type": "n8n-nodes-base.airtableTool",
"position": [
300,
1120
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appgVjZcaRP8BsKf0",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0",
"cachedResultName": "HR Database"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblGIVbpACRwWzzlp",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0/tblGIVbpACRwWzzlp",
"cachedResultName": "Employees"
},
"columns": {
"value": {
"Email": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Email', ``, 'string') }}",
"Full Name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Full_Name', ``, 'string') }}",
"Phone Number": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Phone_Number', ``, 'string') }}",
"job_title_id": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('job_title_id', ``, 'string') }}",
"department_id": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('department_id', ``, 'string') }}",
"Employee Status": "Active"
},
"schema": [
{
"id": "Full Name",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Full Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "id",
"type": "string",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Phone Number",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Phone Number",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Job Title",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Job Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Employee Type",
"type": "options",
"display": true,
"options": [
{
"name": "Employee",
"value": "Employee"
},
{
"name": "Manager",
"value": "Manager"
}
],
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Employee Type",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Reports To",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Reports To",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Job Title (from Job Titles)",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Job Title (from Job Titles)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Reports To (from Employees)",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Reports To (from Employees)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Department",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Department",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Department Name (from Department)",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Department Name (from Department)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Employee Type Text",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Employee Type Text",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Employee Status",
"type": "options",
"display": true,
"options": [
{
"name": "Active",
"value": "Active"
},
{
"name": "On Leave",
"value": "On Leave"
},
{
"name": "Inactive",
"value": "Inactive"
}
],
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Employee Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "job_title_id",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "job_title_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "department_id",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "department_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Head of Department",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Head of Department",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"typecast": true
},
"operation": "create",
"descriptionType": "manual",
"toolDescription": "Create employee"
},
"credentials": {
"airtableTokenApi": {
"id": "r2IibdsQurA56LDa",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "a1d903e0-d46c-4060-92be-8f494bd56559",
"name": "更新员工数据",
"type": "n8n-nodes-base.airtable",
"position": [
100,
760
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appgVjZcaRP8BsKf0",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0",
"cachedResultName": "HR Database"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblGIVbpACRwWzzlp",
"cachedResultUrl": "https://airtable.com/appgVjZcaRP8BsKf0/tblGIVbpACRwWzzlp",
"cachedResultName": "Employees"
},
"columns": {
"value": {
"id": "={{ $json.output.new_employee_id }}",
"Job Title": "=[\"{{ $json.output.job_title_id }}\"]",
"Department": "=[\"{{ $json.output.department_id }}\"]"
},
"schema": [
{
"id": "id",
"type": "string",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "id",
"defaultMatch": true
},
{
"id": "Full Name",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Full Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "id",
"type": "string",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Phone Number",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Phone Number",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Job Title",
"type": "array",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Job Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Employee Type",
"type": "options",
"display": true,
"options": [
{
"name": "Employee",
"value": "Employee"
},
{
"name": "Manager",
"value": "Manager"
}
],
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Employee Type",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Reports To",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Reports To",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Job Title (from Job Titles)",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Job Title (from Job Titles)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Reports To (from Employees)",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Reports To (from Employees)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Department",
"type": "array",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Department",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Department Name (from Department)",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Department Name (from Department)",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Employee Type Text",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Employee Type Text",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Employee Status",
"type": "options",
"display": true,
"options": [
{
"name": "Active",
"value": "Active"
},
{
"name": "On Leave",
"value": "On Leave"
},
{
"name": "Inactive",
"value": "Inactive"
}
],
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Employee Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "job_title_id",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "job_title_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "department_id",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "department_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Head of Department",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Head of Department",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update"
},
"credentials": {
"airtableTokenApi": {
"id": "r2IibdsQurA56LDa",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "0a8fca1f-83f1-4f5a-a52e-e2e8f9a2cf2f",
"name": "OpenAI 聊天模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-500,
1120
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "MGwGMKEkdcjzlYCw",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "934564ca-b0e1-4f28-8322-2f771397d847",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-860,
-400
],
"parameters": {
"color": 5,
"width": 460,
"height": 460,
"content": "## 🤖 通过 Telegram 使用 OpenAI 和 Airtable 进行 AI 驱动的员工数据库管理"
},
"typeVersion": 1
},
{
"id": "2e0c1bdb-e284-4797-bcf2-5eb0dc598727",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-20,
-400
],
"parameters": {
"color": 5,
"width": 500,
"height": 460,
"content": "## 📋 工作流程概述"
},
"typeVersion": 1
},
{
"id": "29d4c15d-29f3-4ff0-b2fc-cb9501afebe2",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-340,
-400
],
"parameters": {
"color": 4,
"width": 280,
"height": 320,
"content": "## 所需设置"
},
"typeVersion": 1
}
],
"pinData": {
"When Executed by Another Workflow": [
{
"query": "Create employee records using this data:\n- Full name: Jack123 new 123\n- Email: jackbower@gmail.com\n- Phone: +12125551212\n- Department: Engineering\n- Job Title: AI Automation Developer",
"action": "create"
}
]
},
"connections": {
"Simple Memory": {
"ai_memory": [
[
{
"node": "Employee Management AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Create employee": {
"ai_tool": [
[
{
"node": "Create Employee AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Create Job Title": {
"ai_tool": [
[
{
"node": "Create Employee AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Employee Management AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Create Department": {
"ai_tool": [
[
{
"node": "Create Employee AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Employee Management AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "Create Employee AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Delete employee tool": {
"ai_tool": [
[
{
"node": "Employee Management AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Create Job Title Tool": {
"ai_tool": [
[
{
"node": "Employee Management AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Create Department Tool": {
"ai_tool": [
[
{
"node": "Employee Management AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Create Employee AI Agent": {
"main": [
[
{
"node": "Update Employee Data",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Create Employee AI Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Employee Management AI Agent": {
"main": [
[
{
"node": "Send Message to User",
"type": "main",
"index": 0
}
]
]
},
"Create Employee AI Agent tool": {
"ai_tool": [
[
{
"node": "Employee Management AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Get job titles data from airtable": {
"ai_tool": [
[
{
"node": "Create Employee AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Create Employee AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Get departments data from airtable": {
"ai_tool": [
[
{
"node": "Create Employee AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Get employees data from airtable tool": {
"ai_tool": [
[
{
"node": "Employee Management AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Get job titles data from airtable tool": {
"ai_tool": [
[
{
"node": "Employee Management AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Get departments data from airtable tool": {
"ai_tool": [
[
{
"node": "Employee Management AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 人力资源, 人工智能
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
Billy Christi
@billyI'm a professional software engineer and n8n expert with a passion for building scalable, no-code and low-code automation workflows. I specialize in creating seamless integrations between APIs, CRMs, and everyday tools to help businesses save time, reduce manual work, and operate smarter. Whether it's automating marketing pipelines, backend systems, or approval processes, I turn complex logic into simple, powerful workflows with n8n.
分享此工作流