Gmail 발신자 연락처 자동 추가至MySQL 데이터베이스
중급
이것은Lead Generation분야의자동화 워크플로우로, 7개의 노드를 포함합니다.주로 Code, MySql, GmailTrigger 등의 노드를 사용하며. Gmail 발신자 연락처 MySQL 데이터베이스 자동 추가
사전 요구사항
- •MySQL 데이터베이스 연결 정보
- •Google 계정 및 Gmail API 인증 정보
사용된 노드 (7)
카테고리
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
"meta": {
"instanceId": "d6e2f2f655b1125bbcac14a4cac6d2e46c7a150e927f85fc96fdca1a6dc39e0e",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "c6250c78-41e1-4977-8f3b-d34a76a24f82",
"name": "메모",
"type": "n8n-nodes-base.stickyNote",
"position": [
140,
-340
],
"parameters": {
"height": 1480,
"content": "## This workflow processes emails received in Gmail and adds the sender's **name** and **email address** to a MySQL database.\n\n## Use Cases:\n- A sales or marketing agency can use this to automatically save client contact info to a database to build a list of leads\n- Companies can use this to automatically save contacts to a database in case of Gmail data loss / losing access to their Gmail account\n- Companies can build mailing lists to automatically send promotions to all of the clients who have contacted them in a given time period\n\n## Before using, you need to have:\n- Gmail credential\n- MySQL database credential\n- A Table in the MySQL database to store your contacts\n- The table should have a \"name\" column, which allows NULL values\n- The table should have an \"email\" column, which should be UNIQUE\n\n## How it works:\n- The Gmail Trigger will listen for a new email every minute\n- For each email, the code node will extract the name and email address of the sender. If there is no name, it will return null\n- The MySQL node will insert the new contact into a table in your database\n- If the contact email already exists in your database, the MySQL node will update the contact name\n\n\n## How to use:\n- Please set up the MySQL node by selecting the correct table to store contacts in\n- Please choose your \"email\" column to match on\n- Please choose your \"name\" column to store names\n"
},
"typeVersion": 1
},
{
"id": "3688fcda-44ad-47c1-bc76-3f3fa04ca436",
"name": "메모1",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
-80
],
"parameters": {
"width": 300,
"height": 680,
"content": "## Please setup this node first\n- Create a table in your MySQL database to store your contacts.\n- The table should include the following fields\n - Name column (should allow null values)\n - Email column (should be set to unique)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## How to use:\n- Please set up the MySQL node by selecting the correct table to store contacts in\n- Please choose your \"email\" column to match on\n- Please choose your \"name\" column to store names"
},
"typeVersion": 1
},
{
"id": "1cbe3946-6b48-483e-9983-2f0c3f243c40",
"name": "Insert New Client in MySQL",
"type": "n8n-nodes-base.mySql",
"onError": "continueRegularOutput",
"position": [
1040,
200
],
"parameters": {
"table": {
"__rl": true,
"mode": "list",
"value": "contacts",
"cachedResultName": "contacts"
},
"options": {},
"dataMode": "defineBelow",
"operation": "upsert",
"valuesToSend": {
"values": [
{
"value": "={{ $json.name }}",
"column": "name"
}
]
},
"valueToMatchOn": "={{ $json.email }}",
"columnToMatchOn": "email"
},
"credentials": {
"mySql": {
"id": "MYdqb2i2fz5O21ui",
"name": "BT Operations Database"
}
},
"typeVersion": 2.4,
"alwaysOutputData": true
},
{
"id": "ff005111-3172-4022-92b1-9280458d6741",
"name": "이메일 수신",
"type": "n8n-nodes-base.gmailTrigger",
"position": [
500,
200
],
"parameters": {
"filters": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
}
},
"credentials": {
"gmailOAuth2": {
"id": "YVZiLPppXZw84rIU",
"name": "Gmail account"
}
},
"typeVersion": 1.2
},
{
"id": "5a266f76-1c4d-48ed-a50b-65998cfe135c",
"name": "고객명 및 이메일 추출",
"type": "n8n-nodes-base.code",
"position": [
760,
200
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "let email = $json.From.trim();\nlet name = null;\n\nif (email.includes('<')) {\n name = email.split('<')[0].trim();\n email = email.split('<')[1].replace('>', '').trim();\n}\n\nreturn {\n \"name\": name,\n \"email\": email\n}"
},
"typeVersion": 2
},
{
"id": "0b4cf2a9-e890-4561-a6c5-e0c85838a777",
"name": "메모2",
"type": "n8n-nodes-base.stickyNote",
"position": [
440,
-80
],
"parameters": {
"color": 5,
"height": 460,
"content": "## Customize this to your liking\n\nYou can add filters to this node to only save certain contact emails\n\n**Example:** You can add a \"Label\" filter to only add emails with a specific label"
},
"typeVersion": 1
},
{
"id": "58e5e9bd-3bf7-4c3a-80be-c4ac2ff0f370",
"name": "메모3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1280,
-20
],
"parameters": {
"color": 5,
"height": 420,
"content": "## Customizing this Workflow:\n- You can customize this workflow to save more data to MySQL. Here are some examples:\n- In the MySQL node, click \"Add Value\", and choose one of the fields from the Gmail node to save in your database column. You can try saving the following items:\n - Subject line\n - MessageID\n - ThreadID\n - Snippet\n - Recipient Info"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"ff005111-3172-4022-92b1-9280458d6741": {
"main": [
[
{
"node": "5a266f76-1c4d-48ed-a50b-65998cfe135c",
"type": "main",
"index": 0
}
]
]
},
"5a266f76-1c4d-48ed-a50b-65998cfe135c": {
"main": [
[
{
"node": "1cbe3946-6b48-483e-9983-2f0c3f243c40",
"type": "main",
"index": 0
}
]
]
}
}
}자주 묻는 질문
이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
중급 - 리드 생성
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
동적 외출/휴가 메시지 전송
Gmail과 Google Calendar를 통해 동적 출장/휴가 메시지 전송
If
Code
Gmail
+
If
Code
Gmail
14 노드Rosh Ragel
개인 생산성
Gmail 레이블에서 GPT-4O + QuickBooks를 사용하여 자동으로 청구서 생성
Gmail 레이블에서 GPT-4O + QuickBooks를 사용하여 자동으로 청구서 생성
Code
Gmail
Quickbooks
+
Code
Gmail
Quickbooks
23 노드Rosh Ragel
청구서 처리
Square 판매 요약 보고서를 Google 시트로 자동 가져오기
Square 판매 요약 보고서를 Google Sheets로 자동 가져오기
If
Code
Split Out
+
If
Code
Split Out
14 노드Rosh Ragel
고객관계관리
Gmail을 통해 Square 일일 판매 보고서 자동 발송
Gmail을 통해 Square 일일 판매 보고서 자동 발송
If
Code
Gmail
+
If
Code
Gmail
15 노드Rosh Ragel
고객관계관리
Microsoft Outlook을 통해 Square 일일 판매 요약 보고서 자동 발송
Microsoft Outlook을 통해 Square 일일 판매 요약 보고서 자동 발송
If
Code
Split Out
+
If
Code
Split Out
15 노드Rosh Ragel
고객관계관리
Gmail을 통해 Square 월간 판매 보고서 자동 발송
Gmail을 통해 Square 월간 판매 보고서 자동 발송
If
Code
Gmail
+
If
Code
Gmail
16 노드Rosh Ragel
콘텐츠 제작