Gmail에서 Drive와 Google 스프레드시트로 첨부
고급
이것은Finance, AI분야의자동화 워크플로우로, 18개의 노드를 포함합니다.주로 If, Set, Gmail, GoogleDrive, HttpRequest 등의 노드를 사용하며인공지능 기술을 결합하여 스마트 자동화를 구현합니다. Gmail에서 Drive와 Google 스프레드시트로의 인보이스 처리
사전 요구사항
- •Google 계정 및 Gmail API 인증 정보
- •Google Drive API 인증 정보
- •대상 API의 인증 정보가 필요할 수 있음
- •Google Sheets API 인증 정보
- •OpenAI API Key
사용된 노드 (18)
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
"id": "XnGZZfT5u0Cw1X3p",
"meta": {
"instanceId": "3378b0d68c3b7ebfc71b79896d94e1a044dec38e99a1160aed4e9c323910fbe2",
"templateCredsSetupCompleted": true
},
"name": "Attachments Gmail to drive and google sheets",
"tags": [],
"nodes": [
{
"id": "0404ef0a-9750-495a-8798-98d4b059a083",
"name": "스티커 노트",
"type": "n8n-nodes-base.stickyNote",
"position": [
-580,
-420
],
"parameters": {
"height": 440,
"content": "## Setup\n1. Setup your **Gmail** and **Google Drive** credentials\n2. Setup your **Google Sheets** credentials\n3. Setup your **Openai** api key"
},
"typeVersion": 1
},
{
"id": "8751a7f1-aae4-4746-aae7-3d8563845b8c",
"name": "Gmail Trigger1",
"type": "n8n-nodes-base.gmailTrigger",
"position": [
-640,
120
],
"parameters": {
"simple": false,
"filters": {
"readStatus": "unread"
},
"options": {
"downloadAttachments": true
},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
}
},
"credentials": {
"gmailOAuth2": {
"id": "v8YJP3VfeGtRk5la",
"name": "Gmail account"
}
},
"typeVersion": 1.1
},
{
"id": "40f62192-5acb-4915-aa07-e5a0dfeb7581",
"name": "Setup1",
"type": "n8n-nodes-base.set",
"position": [
-300,
120
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "4cca07a2-6a70-4011-a025-65246e652fb9",
"name": "url_to_drive_folder",
"type": "string",
"value": "1fCWCdqrFP3WrjjLc-gJtxMaiaF5lh8Ko"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "d928e797-8851-4ab4-9199-cd555a40eae9",
"name": "PDF를 Drive에 업로드1",
"type": "n8n-nodes-base.httpRequest",
"maxTries": 5,
"position": [
220,
0
],
"parameters": {
"url": "https://www.googleapis.com/upload/drive/v3/files",
"method": "POST",
"options": {},
"sendBody": true,
"sendQuery": true,
"contentType": "binaryData",
"authentication": "predefinedCredentialType",
"queryParameters": {
"parameters": [
{
"name": "uploadType",
"value": "media"
}
]
},
"inputDataFieldName": "={{ $binary.attachment_0.mimeType === \"application/pdf\"\n ? \"attachment_0\"\n : \"attachment_1\" }}",
"nodeCredentialType": "googleDriveOAuth2Api"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "p5I6S4YkJps1zvwz",
"name": "Google Drive account 2"
}
},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "22df6933-a0c7-4cce-8114-5332038a14c3",
"name": "파일 이름 변경1",
"type": "n8n-nodes-base.googleDrive",
"position": [
400,
0
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "update",
"newUpdatedFileName": "={{ $('Setup1').item.json.subject }}_invoice_{{ $now.format('yyyy-MM-dd') }}.pdf"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "p5I6S4YkJps1zvwz",
"name": "Google Drive account 2"
}
},
"typeVersion": 3
},
{
"id": "ce6a6a4c-17ba-4cf7-b07a-97b9d8d80844",
"name": "올바른 폴더로 이동1",
"type": "n8n-nodes-base.googleDrive",
"position": [
580,
0
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1fCWCdqrFP3WrjjLc-gJtxMaiaF5lh8Ko",
"cachedResultUrl": "",
"cachedResultName": "2025"
},
"operation": "move"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "p5I6S4YkJps1zvwz",
"name": "Google Drive account 2"
}
},
"typeVersion": 3
},
{
"id": "e64aac5c-a314-46b6-b7db-fc0d6f450e1f",
"name": "Gmail",
"type": "n8n-nodes-base.gmail",
"position": [
1240,
0
],
"webhookId": "556cbee3-8de0-4645-9e91-e7c0c252f2ab",
"parameters": {
"messageId": "={{ $('Gmail Trigger1').item.json.id }}",
"operation": "markAsRead"
},
"credentials": {
"gmailOAuth2": {
"id": "v8YJP3VfeGtRk5la",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "ea74cfc1-0305-418d-9f5f-bffcfb3bb2c7",
"name": "파일에서 추출2",
"type": "n8n-nodes-base.extractFromFile",
"position": [
1200,
-180
],
"parameters": {
"options": {},
"operation": "pdf"
},
"typeVersion": 1
},
{
"id": "0398d982-78fd-4830-b5cf-271195af80fd",
"name": "Google Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
800,
0
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "p5I6S4YkJps1zvwz",
"name": "Google Drive account 2"
}
},
"typeVersion": 3
},
{
"id": "3b4a96d4-a6ee-486a-a795-fe410ccc38b2",
"name": "OpenAI Model",
"type": "@n8n/n8n-nodes-langchain.lmOpenAi",
"position": [
1740,
20
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {
"temperature": 0
}
},
"credentials": {
"openAiApi": {
"id": "XJdxgMSXFgwReSsh",
"name": "n8n key"
}
},
"typeVersion": 1
},
{
"id": "a7dd0d95-5e79-4bd2-a8a6-2178264d19fc",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1940,
40
],
"parameters": {
"jsonSchema": "{\n \"Invoice date\": { \"type\": \"date\" },\n \"Invoice description\": { \"type\": \"string\" },\n \"Total price\": { \"type\": \"number\" },\n \"Fichero\": { \"type\": \"string\" }\n}"
},
"typeVersion": 1.1
},
{
"id": "68d98f4c-e679-48e3-a1a1-529cda4e31a4",
"name": "조정 시트에 추가",
"type": "n8n-nodes-base.googleSheets",
"position": [
2280,
-140
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "Invoice date",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Invoice date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Invoice Description",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Invoice Description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Total price",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Total price",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Fichero",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Fichero",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "id",
"value": "gid=0"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1gIUnjSWUhsoTOVVd4ZoVjARCGQfGE8s7FWcju3lNajM",
"cachedResultUrl": "",
"cachedResultName": "facturas"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "3IOU2VjBnR4hGohx",
"name": "Google Sheets account"
}
},
"typeVersion": 4.3
},
{
"id": "80e1c8f4-b593-4c5f-b9e2-f3b7996ee6d4",
"name": "스티커 노트2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1680,
-400
],
"parameters": {
"color": 7,
"width": 805.0578351924228,
"height": 656.5014186128178,
"content": "## 3. Use LLMs to Extract Values from Data\n[Read more about Basic LLM Chain](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm/)\n\nLarge language models are perfect for data extraction tasks as they can work across a range of document layouts without human intervention. The extracted data can then be sent to a variety of datastores such as spreadsheets, accounting systems and/or CRMs.\n\n**Tip:** The \"Structured Output Parser\" ensures the AI output can be\ninserted to our spreadsheet without additional clean up and/or formatting. "
},
"typeVersion": 1
},
{
"id": "3754e10e-a233-4ce0-bc79-bb5c01db9695",
"name": "출력 매핑",
"type": "n8n-nodes-base.set",
"position": [
2080,
-140
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={{ $json.output }}"
},
"typeVersion": 3.3
},
{
"id": "a42ff16f-d0df-4b6d-9a36-849f85d1facc",
"name": "데이터 추출 규칙 적용",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
1740,
-140
],
"parameters": {
"text": "=Given the following invoice in the <invoice> xml tags, extract the following information as listed below.\nIf you cannot the information for a specific item, then leave blank and skip to the next. \n\n* Invoice date\n* Invoice Description: {{ $('Rename file1').item.json.name }}\n* Total price\n* Fichero: =HYPERLINK(\"https://drive.google.com/file/d/{{ $('Move to the correct folder1').item.json.id }}/view\", \"Ver Documento\")\n\n\n<invoice>{{ $json.text }}</invoice>",
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.4
},
{
"id": "f6de5d5a-d2dc-4590-8f46-3f250b8fca9f",
"name": "스티커 노트6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1860,
0
],
"parameters": {
"width": 192.26896179623753,
"height": 213.73043662572252,
"content": "\n\n\n\n\n\n\n\n\n\n\n\n**Need more attributes?**\nChange it here!"
},
"typeVersion": 1
},
{
"id": "255fe8c1-5bd7-41cc-b1f9-c8956b5ad101",
"name": "첨부 파일이 있는 송장 메일만",
"type": "n8n-nodes-base.if",
"position": [
0,
120
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "229200d1-ec13-4970-ae0e-2c8e17da0bdf",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $('Gmail Trigger1').item.json.headers['content-type'] }}",
"rightValue": "multipart/mixed"
},
{
"id": "new-condition",
"operator": {
"type": "boolean",
"operation": "isNotEmpty"
},
"leftValue": "={{ $json.attachments }}"
}
]
}
},
"typeVersion": 2.1
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "eb152808-e993-4e18-9dd8-10f21df57bf1",
"connections": {
"e64aac5c-a314-46b6-b7db-fc0d6f450e1f": {
"main": [
[]
]
},
"40f62192-5acb-4915-aa07-e5a0dfeb7581": {
"main": [
[
{
"node": "255fe8c1-5bd7-41cc-b1f9-c8956b5ad101",
"type": "main",
"index": 0
}
]
]
},
"3754e10e-a233-4ce0-bc79-bb5c01db9695": {
"main": [
[
{
"node": "68d98f4c-e679-48e3-a1a1-529cda4e31a4",
"type": "main",
"index": 0
}
]
]
},
"0398d982-78fd-4830-b5cf-271195af80fd": {
"main": [
[
{
"node": "ea74cfc1-0305-418d-9f5f-bffcfb3bb2c7",
"type": "main",
"index": 0
}
]
]
},
"3b4a96d4-a6ee-486a-a795-fe410ccc38b2": {
"ai_languageModel": [
[
{
"node": "a42ff16f-d0df-4b6d-9a36-849f85d1facc",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"22df6933-a0c7-4cce-8114-5332038a14c3": {
"main": [
[
{
"node": "ce6a6a4c-17ba-4cf7-b07a-97b9d8d80844",
"type": "main",
"index": 0
}
]
]
},
"8751a7f1-aae4-4746-aae7-3d8563845b8c": {
"main": [
[
{
"node": "40f62192-5acb-4915-aa07-e5a0dfeb7581",
"type": "main",
"index": 0
}
]
]
},
"ea74cfc1-0305-418d-9f5f-bffcfb3bb2c7": {
"main": [
[
{
"node": "a42ff16f-d0df-4b6d-9a36-849f85d1facc",
"type": "main",
"index": 0
}
]
]
},
"d928e797-8851-4ab4-9199-cd555a40eae9": {
"main": [
[
{
"node": "22df6933-a0c7-4cce-8114-5332038a14c3",
"type": "main",
"index": 0
}
]
]
},
"a7dd0d95-5e79-4bd2-a8a6-2178264d19fc": {
"ai_outputParser": [
[
{
"node": "a42ff16f-d0df-4b6d-9a36-849f85d1facc",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"a42ff16f-d0df-4b6d-9a36-849f85d1facc": {
"main": [
[
{
"node": "3754e10e-a233-4ce0-bc79-bb5c01db9695",
"type": "main",
"index": 0
}
]
]
},
"ce6a6a4c-17ba-4cf7-b07a-97b9d8d80844": {
"main": [
[
{
"node": "e64aac5c-a314-46b6-b7db-fc0d6f450e1f",
"type": "main",
"index": 0
},
{
"node": "0398d982-78fd-4830-b5cf-271195af80fd",
"type": "main",
"index": 0
}
]
]
},
"255fe8c1-5bd7-41cc-b1f9-c8956b5ad101": {
"main": [
[
{
"node": "d928e797-8851-4ab4-9199-cd555a40eae9",
"type": "main",
"index": 0
}
],
[
{
"node": "e64aac5c-a314-46b6-b7db-fc0d6f450e1f",
"type": "main",
"index": 0
}
]
]
}
}
}자주 묻는 질문
이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
고급 - 금융, 인공지능
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
[MW] AI 고객 지원 어시스턴트 - 클라우드 버전
Gmail, Google 스프레드시트, ERP 데이터 및 GPT-4o AI를 사용한 고객 지원 자동 처리
If
Set
Gmail
+
If
Set
Gmail
25 노드AOE Agent Lab
인공지능
✨🔪 Llama Parse 기반 고급 AI 문서 분석 및 텍스트 추출
✨🔪 Llama Parse 기반 고급 AI 문서 분석 및 텍스트 추출
If
Set
Gmail
+
If
Set
Gmail
54 노드Joseph LePage
빌딩 블록
반려동물 가게 4
🐶 펫 샵 예약 AI 대리자
If
Set
Code
+
If
Set
Code
187 노드Bruno Dias
인공지능
AI 기반 이메일 PDF 청구서 데이터 추출
AI를 활용하여 이메일의 PDF 청구서 데이터를 Airtable로 추출하며, GPT-4o를 통합합니다.
Set
Gmail
Merge
+
Set
Gmail
Merge
27 노드Milan Vasarhelyi
금융
(Tung) OCR 송장 추출로 스프레드시트 사본
자동 인보이스 및 영수증 OCR to Google 시트 - Drive, Gmail 및 Telegram 트리거 지원
If
Set
Code
+
If
Set
Code
25 노드Daniel Ng
금융
OpenAI 및 Google Sheets를 사용한 자동화된 PDF 인voi처리 및 승인 프로세스
OpenAI 및 Google Sheets를 사용한 자동화된 PDF 인voice 처리 및 승인 워크플로
If
Gmail
Form Trigger
+
If
Gmail
Form Trigger
17 노드Billy Christi
금융