Google 스프레드시트에서 Gmail 배달 오류 정보를 포함한 반환 이메일을 표시
고급
이것은Social Media, Multimodal AI분야의자동화 워크플로우로, 18개의 노드를 포함합니다.주로 If, Set, Code, Gmail, GoogleSheets 등의 노드를 사용하며. Gmail에서 전달된 오류 정보를 기반으로 Google 스프레드시트에 반송 이메일을 표시
사전 요구사항
- •Google 계정 및 Gmail API 인증 정보
- •Google Sheets API 인증 정보
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
"meta": {
"instanceId": "e2b72466a589dd1250fc94a8e861457e040bf25b07f6b069958c036d3f2bfe77"
},
"nodes": [
{
"id": "9963c9a2-ace8-4de9-b9ba-45f82713bf4a",
"name": "'워크플로 테스트' 클릭 시",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-944,
-48
],
"parameters": {},
"typeVersion": 1
},
{
"id": "54d5fbd7-5932-4994-ab52-bbffddbf3de8",
"name": "geterremail",
"type": "n8n-nodes-base.code",
"position": [
-928,
208
],
"parameters": {
"jsCode": "const emailRegex = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}/g; // Regex to match email addresses\n\n// Helper function to remove duplicates from an array\nconst removeDuplicates = (array) => [...new Set(array)];\n\n// Loop through all input items\nreturn $input.all().map(item => {\n const text = item.json.text || \"\"; // Replace 'body' with the actual field containing the text\n const emails = text.match(emailRegex) || []; // Extract email addresses or return an empty array\n const uniqueEmails = removeDuplicates(emails); // Remove duplicates\n \n return {\n json: {\n ...item.json,\n extractedEmails: uniqueEmails[0] // Add the unique emails to the output\n }\n };\n});\n"
},
"executeOnce": true,
"typeVersion": 2
},
{
"id": "3c6df588-89dd-4e85-9ee9-cc2793bd4cf3",
"name": "listerremail",
"type": "n8n-nodes-base.set",
"position": [
-704,
208
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "93a314f1-b42c-45a9-bbdc-fda0ffec13cb",
"name": "extractedEmails",
"type": "string",
"value": "={{ $json.extractedEmails }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "d700ab34-e7da-4336-b6c7-4e4c303ad5ec",
"name": "readspamfolder",
"type": "n8n-nodes-base.gmail",
"position": [
-496,
-48
],
"webhookId": "c9790d08-c845-4965-a6ce-6e538aa74279",
"parameters": {
"simple": false,
"filters": {
"labelIds": [
"SPAM"
]
},
"options": {},
"operation": "getAll",
"returnAll": true
},
"credentials": {
"gmailOAuth2": {
"id": "3DsIsALVl78cvnHm",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "fd3634df-d31a-450c-ac7a-4db633f569d4",
"name": "undelivered_failure",
"type": "n8n-nodes-base.if",
"position": [
-272,
-48
],
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"subject\"]}}",
"value2": "Undelivered",
"operation": "contains"
},
{
"value1": "={{$json[\"subject\"]}}",
"value2": "Failure",
"operation": "contains"
}
]
},
"combineOperation": "any"
},
"typeVersion": 1
},
{
"id": "34c8eeb3-760a-43cc-8d7d-ccea4689af63",
"name": "lookupemail",
"type": "n8n-nodes-base.googleSheets",
"position": [
-480,
208
],
"parameters": {
"options": {},
"filtersUI": {
"values": [
{
"lookupValue": "={{ $('geterremail').item.json.extractedEmails }}",
"lookupColumn": "email"
}
]
},
"sheetName": {
"__rl": true,
"mode": "name",
"value": "contacts"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{ $('settings').item.json.googlesheetid }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "0xG6VARJ6hnHx2T1",
"name": "Google Sheets account"
}
},
"executeOnce": false,
"typeVersion": 4.5
},
{
"id": "17af022f-0c5f-47f6-b5ef-bd6df05d7952",
"name": "update_err",
"type": "n8n-nodes-base.googleSheets",
"position": [
-32,
208
],
"parameters": {
"columns": {
"value": {
"err": "Y",
"row_number": "={{ $('lookupemail').item.json.row_number }}"
},
"schema": [
{
"id": "email",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "firstname",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "firstname",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "lastname",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "lastname",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "company",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "process",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "process",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "err",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "err",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"row_number"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "contacts"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "={{ $('settings').item.json.googlesheetid }}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "0xG6VARJ6hnHx2T1",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "565a47a3-80cc-418f-8862-7ed07c58fdd0",
"name": "keep_row",
"type": "n8n-nodes-base.set",
"position": [
-256,
208
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "c3ab2e7e-dec9-4c4e-a5a1-7be42975a4ea",
"name": "row_number",
"type": "number",
"value": "={{ $json.row_number }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "ef72cddc-e32f-4e46-bf41-c57b1a0c98a8",
"name": "스티커 메모7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1712,
-176
],
"parameters": {
"color": 7,
"width": 656,
"height": 1024,
"content": "# Scanning Email Inbox for Delivery Errors\n\n**Prerequisite:** [Automate Personalized Email Campaigns with Google Docs, Sheets, and SMTP](https://n8n.io/workflows/7065-automate-personalized-email-campaigns-with-google-docs-sheets-and-smtp/).\n\n## How It Works\n\nAfter running your email campaign, some messages may fail to deliver. This workflow scans your email inbox for delivery errors (e.g., bounced messages), flags problematic email addresses in the Google Sheet and ensures future campaigns skip them.\n\n## How to Use\n\n1. **Ensure Prerequisite Workflow:** \n - You should have the [Email Campaign Workflow](https://n8n.io/workflows/7065-automate-personalized-email-campaigns-with-google-docs-sheets-and-smtp/) configured and running.\n\n2. **Google Sheet Setup:** \n - Use the [Google Sheet Template](https://docs.google.com/spreadsheets/d/1mFKp3wmbV9qp2tpGGsN72zdiC32y8H1nhjdgP885y-U/edit?usp=sharing). \n - Identify your document’s ID (the string after `/d/` and before `/edit` in the URL).\n\n3. **Configure Workflow:** \n - Enter your Google Sheet ID in the `settings` node. \n - Connect your Google credentials to n8n.\n\n4. **Email Inbox:** \n - Set up the `readspamfolder` node to search for bounce/error messages in your mail (e.g., in the Spam or Inbox folders—adjust label/folder if emails land elsewhere). \n\n5. **Google Sheet Update:** \n - Configure the `lookupemail` and `update_err` nodes\n\n\n## Requirements\n\n- **Google Credentials** to access Gmail and sheets.\n- **Gmail Account** (bounce/error messages must be accessible here).\n- **n8n Version:** Tested with 1.105.2 (Ubuntu).\n\n## Need Help?\n\nContact me on [LinkedIn](https://www.linkedin.com/in/stephaneheckel/) or ask in the [Forum](https://community.n8n.io/)!\n\n\n"
},
"typeVersion": 1
},
{
"id": "8c0840f2-3731-4b02-a92d-e80fe6cf99d3",
"name": "settings",
"type": "n8n-nodes-base.set",
"position": [
-720,
-48
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "4b74909d-6a40-422f-9d5a-1d72f5577f3f",
"name": "googlesheetid",
"type": "string",
"value": "1mFKp3wmbV9qp2tpGGsN72zdiC32y8H1nhjdgP885y-U"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "62510cba-702f-4e0e-9462-64cd2d22338c",
"name": "스티커 메모6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-768,
-160
],
"parameters": {
"color": 7,
"width": 192,
"height": 96,
"content": "Define the Google Sheet ID used in this [Workflow](https://n8n.io/workflows/7065-automate-personalized-email-campaigns-with-google-docs-sheets-and-smtp/)"
},
"typeVersion": 1
},
{
"id": "9ce3155f-1cf5-4457-83a4-e9bab7315aba",
"name": "스티커 메모",
"type": "n8n-nodes-base.stickyNote",
"position": [
-544,
-160
],
"parameters": {
"color": 7,
"width": 192,
"height": 96,
"content": "Read the folder (Gmail SPAM here), with Mail Delivery issues"
},
"typeVersion": 1
},
{
"id": "3fe9243f-5a5e-484b-8a13-8bdb658282d8",
"name": "스티커 메모1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-320,
-160
],
"parameters": {
"color": 7,
"width": 192,
"height": 96,
"content": "Identify Subject containing \"Undelivered\" or \"Failure\""
},
"typeVersion": 1
},
{
"id": "1fb775c5-aa90-45d0-9826-a24ba430268f",
"name": "스티커 메모2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-976,
368
],
"parameters": {
"color": 7,
"width": 192,
"height": 112,
"content": "Extract the \"email\" from the body message. Unduplication to be sure you get one unique email"
},
"typeVersion": 1
},
{
"id": "1f1bec65-c428-4c72-a141-d748a6b11498",
"name": "스티커 메모3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-528,
368
],
"parameters": {
"color": 7,
"width": 192,
"height": 288,
"content": "Find the Row Number in the Google Sheet ID used by this previous [Workflow](https://n8n.io/workflows/7065-automate-personalized-email-campaigns-with-google-docs-sheets-and-smtp/)\n\nThe `email` column need to match `{{ $('geterremail').item.json.extractedEmails }}`\n\n\nDownload the [Google Sheet Template](https://docs.google.com/spreadsheets/d/1mFKp3wmbV9qp2tpGGsN72zdiC32y8H1nhjdgP885y-U/edit?usp=sharing)"
},
"typeVersion": 1
},
{
"id": "2e050778-b76f-4497-b42f-dee1d9a55e13",
"name": "스티커 메모4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-752,
368
],
"parameters": {
"color": 7,
"width": 192,
"height": 112,
"content": "For debugging. To show the emails in error"
},
"typeVersion": 1
},
{
"id": "8d635eba-7666-4c70-96d4-1acf02a42728",
"name": "스티커 메모5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-304,
368
],
"parameters": {
"color": 7,
"width": 192,
"height": 112,
"content": "For debugging. To show the \"Row Number\" we are going to update in the Google Sheet\n"
},
"typeVersion": 1
},
{
"id": "ecd8fd66-a6b2-4a25-b070-218af8bd0df0",
"name": "스티커 메모8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-64,
368
],
"parameters": {
"color": 7,
"width": 192,
"height": 224,
"content": "Update the Google Sheet and set err = \"Y\"\n\n`row_number` (using to match)\n\n`{{ $('lookupemail').item.json.row_number }}`"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"565a47a3-80cc-418f-8862-7ed07c58fdd0": {
"main": [
[
{
"node": "17af022f-0c5f-47f6-b5ef-bd6df05d7952",
"type": "main",
"index": 0
}
]
]
},
"8c0840f2-3731-4b02-a92d-e80fe6cf99d3": {
"main": [
[
{
"node": "d700ab34-e7da-4336-b6c7-4e4c303ad5ec",
"type": "main",
"index": 0
}
]
]
},
"54d5fbd7-5932-4994-ab52-bbffddbf3de8": {
"main": [
[
{
"node": "3c6df588-89dd-4e85-9ee9-cc2793bd4cf3",
"type": "main",
"index": 0
}
]
]
},
"34c8eeb3-760a-43cc-8d7d-ccea4689af63": {
"main": [
[
{
"node": "565a47a3-80cc-418f-8862-7ed07c58fdd0",
"type": "main",
"index": 0
}
]
]
},
"3c6df588-89dd-4e85-9ee9-cc2793bd4cf3": {
"main": [
[
{
"node": "34c8eeb3-760a-43cc-8d7d-ccea4689af63",
"type": "main",
"index": 0
}
]
]
},
"d700ab34-e7da-4336-b6c7-4e4c303ad5ec": {
"main": [
[
{
"node": "fd3634df-d31a-450c-ac7a-4db633f569d4",
"type": "main",
"index": 0
}
]
]
},
"fd3634df-d31a-450c-ac7a-4db633f569d4": {
"main": [
[
{
"node": "54d5fbd7-5932-4994-ab52-bbffddbf3de8",
"type": "main",
"index": 0
}
]
]
},
"9963c9a2-ace8-4de9-b9ba-45f82713bf4a": {
"main": [
[
{
"node": "8c0840f2-3731-4b02-a92d-e80fe6cf99d3",
"type": "main",
"index": 0
}
]
]
}
}
}자주 묻는 질문
이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
고급 - 소셜 미디어, 멀티모달 AI
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
Browserflow와 Google Sheets를 사용한 자동화된 LinkedIn 초대장 추적
Browserflow 및 Google Sheets를 사용한 자동화된 LinkedIn 초대 추적
If
Set
Wait
+
If
Set
Wait
23 노드Stéphane Heckel
리드 육성
LinkedIn 콘텐츠 공장(含 OpenAI 연구 및 브랜드 이미지 생성)
LinkedIn 콘텐츠 공장, OpenAI 연구 및 Replicate 브랜드 이미지 생성 통합
If
Set
Code
+
If
Set
Code
23 노드Onur
소셜 미디어
AI-Deepseek-R1t 회사 출장 승인 및 경비 승인 요청
Deepseek AI, Gmail, Google Sheets를 통한 회의 출장 승인 자동화
If
Set
Code
+
If
Set
Code
24 노드Cheng Siong Chin
문서 추출
Google Sheets, Forms 및 Gmail 알림을 사용한 다단계 온보딩 프로세스 자동화
Google Sheets, Forms 및 Gmail 알림을 사용한 자동화된 다단계 온보딩 프로세스
If
Set
Code
+
If
Set
Code
31 노드PollupAI
인사
YouTube 비디오 기반 자율 블로그 게시
ChatGPT, Sheets, Apify, Pexels, WordPress를 사용하여 YouTube 비디오를 자동으로 블로그에 게시합니다.
If
Set
Code
+
If
Set
Code
80 노드Oriol Seguí
콘텐츠 제작
저의 콜드 이메일 생성기
Anthropic, GPT-4, 구글 스프레드시트를 사용하여 개인화된 콜드 이메일을 생성
If
Set
Code
+
If
Set
Code
24 노드Bhuvanesh R
리드 육성