Skip to content

Instantly share code, notes, and snippets.

@Mineru98
Created June 12, 2025 17:52
Show Gist options
  • Save Mineru98/dc91b0c917a2f6f37fe3369bf683ea99 to your computer and use it in GitHub Desktop.
Save Mineru98/dc91b0c917a2f6f37fe3369bf683ea99 to your computer and use it in GitHub Desktop.
{
"nodes": [
{
"parameters": {
"url": "https://api.elevenlabs.io/v2/voices",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "voice_type",
"value": "personal"
},
{
"name": "search",
"value": "검색할 키워드로 교체하세요"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
420,
160
],
"id": "9e5269a0-fe07-446b-8fad-30513c222cbd",
"name": "Find Voice",
"credentials": {
"httpHeaderAuth": {
"id": "y15zffFFTPvRfS2J",
"name": "ElevenLabs API"
}
}
},
{
"parameters": {
"url": "http://api.openweathermap.org/data/2.5/weather",
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "q",
"value": "원하는 도시를 영어로 입력하세요."
},
{
"name": "units",
"value": "metric"
},
{
"name": "lang",
"value": "kr"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
640,
-120
],
"id": "f40a6d37-fd07-4a0f-95d4-d035a1fb3f00",
"name": "OpenWeatherMap API",
"credentials": {
"httpQueryAuth": {
"id": "KtXyyos8qPoauSyG",
"name": "OpenWeatherMap Account"
}
}
},
{
"parameters": {
"method": "POST",
"url": "=https://api.elevenlabs.io/v1/text-to-speech/{{ $json.voices[0].voice_id }}",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "output_format",
"value": "mp3_44100_128"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={{(() => {\n const text = $('Markdown To Plain Text').item.json.extracted[0];\n return {\n model_id: \"eleven_multilingual_v2\",\n voice_settings: {\n speed: 1.2,\n stability: 1.0,\n similarity_boost: 0.7,\n style: 0.35\n },\n text\n };\n})()}}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
640,
160
],
"id": "314e5a14-0f84-4eec-af30-4bc93392cb5d",
"name": "Generate Voice",
"credentials": {
"httpHeaderAuth": {
"id": "y15zffFFTPvRfS2J",
"name": "ElevenLabs API"
}
},
"onError": "continueErrorOutput"
},
{
"parameters": {
"jsCode": "// 마크다운에서 코드블럭 (```)만 추출\nreturn [\n {\n json: {\n extracted: (() => {\n const md = $input.first().json.message.content;\n const matches = [...md.matchAll(/```(?:\\w+)?\\n([\\s\\S]*?)```/g)];\n return matches.map(m => m[1].trim());\n })()\n }\n }\n];\n"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1480,
-120
],
"id": "f8aaa465-4ad8-4248-95ce-9e85475f747b",
"name": "Markdown To Plain Text"
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 30 5 * * *"
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
400,
-120
],
"id": "8e3c14d6-c74a-46e3-99a8-e4fd5aac93fb",
"name": "Schedule Trigger"
},
{
"parameters": {
"name": "=오늘의_날씨_{{(new Date()).toISOString().split('T')[0] + '.mp3'}}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"folderId": {
"__rl": true,
"value": "1oXMkBoWj4SvVpWd9CMaL6JpUe3cRNo47",
"mode": "list",
"cachedResultName": "여러분의_폴더로_지정_하세요.",
"cachedResultUrl": "https://drive.google.com/drive/folders/1oXMkBoWj4SvVpWd9CMaL6JpUe3cRNo47"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
880,
160
],
"id": "fa0994b8-e241-4976-9910-b049ec6bf7c0",
"name": "Voice File Upload",
"credentials": {
"googleDriveOAuth2Api": {
"id": "wsnecETV6K89Tr76",
"name": "Google Drive account"
}
},
"onError": "continueErrorOutput"
},
{
"parameters": {
"modelId": {
"__rl": true,
"value": "gpt-4o-2024-11-20",
"mode": "list",
"cachedResultName": "GPT-4O-2024-11-20"
},
"messages": {
"values": [
{
"content": "=### Wearther Infomation\n\n{{(() => {\n const date = new Date();\n const yyyy = date.getFullYear();\n const mm = String(date.getMonth() + 1).padStart(2, '0');\n const dd = String(date.getDate()).padStart(2, '0');\n const hh = String(date.getHours()).padStart(2, '0');\n const min = String(date.getMinutes()).padStart(2, '0');\n return `${yyyy}년 ${mm}월 ${dd}일 ${hh}시 ${min}분`;\n})()}} 부산의 날씨입니다.\n\n날씨는 {{ $('OpenWeatherMap API').item.json.weather[0].description }} 입니다.\n현재 온도는 {{ $('OpenWeatherMap API').item.json.main.temp }} 입니다.\n체감 온도는 {{ $('OpenWeatherMap API').item.json.main.feels_like }} 입니다.\n습도는 {{ $('OpenWeatherMap API').item.json.main.humidity }} 입니다.\n기압은 {{ $('OpenWeatherMap API').item.json.main.pressure }} 입니다.\n풍향은 {{ $('OpenWeatherMap API').item.json.wind.deg }} 입니다.\n풍속은 {{ $('OpenWeatherMap API').item.json.wind.speed }} 입니다.\n\n### Personal Infomation\n\n- 이름 : 근석\n- 성별 : 남성\n\n### Instruction\n\n- 기상 캐스터 이름은 `다현`입니다.\n- `다현`은 말투가 밝은 편이에요.\n- 기상 정보는 모두 다 말하지 않아도 됩니다.\n- 나만을 위한 기상 캐스터에게 오늘의 날씨를 전하는 [Wearther Infomation]의 내용을 기반으로 아침 기상 대본을 만들어 주세요.\n- 내 이름을 부를 때는 반존댓말을 사용하면서 편안하게 불러주세요.\n- 나긋나긋하고 밝은 느낌으로 작성해주세요.\n- 쉬어가는 타이밍에는 다음과 같이 넣어주세요.(필요한 경우에만 넣어주세요.)\n - 0.1 ~ 0.3초 사이를 대본에 따라 적절하게 쉬어주세요.\n - 예시 : 0.3초 쉴때 : `<break time=\"0.3s\" />`\n - 쉬어가는 타이밍 멘트 앞 뒤로는 모두 큰따옴표로 대사가 그룹으로 묶여야 합니다.\n- 가능하면 markdown 형식으로 대본 내용만 작성해주세요.\n\n### Output"
}
]
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
1100,
-120
],
"id": "ebf6d4cf-6881-4f26-a877-03f1f80b3c11",
"name": "Make Script",
"credentials": {
"openAiApi": {
"id": "TGJH5P7SbVh9aG3p",
"name": "OpenAi account"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1320,
400
],
"id": "d6f9d8d2-b2a8-4480-889e-57a94bf33690",
"name": "No Operation, do nothing"
},
{
"parameters": {
"resource": "fileFolder",
"queryString": "오늘의_날씨",
"filter": {},
"options": {
"fields": [
"webViewLink",
"id",
"name"
]
}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
420,
400
],
"id": "c830602a-b508-4be5-841a-d8c46e7fb62b",
"name": "Google Drive Search",
"credentials": {
"googleDriveOAuth2Api": {
"id": "wsnecETV6K89Tr76",
"name": "Google Drive account"
}
}
},
{
"parameters": {
"jsCode": "const files = $input.all();\n\nconst latestFile = files.reduce((latest, current) => {\n const getDate = name => {\n const match = name.match(/\\d{4}-\\d{2}-\\d{2}/);\n return match ? new Date(match[0]) : new Date(0);\n };\n\n const latestName = latest.json.name;\n const currentName = current.json.name;\n\n return getDate(currentName) > getDate(latestName) ? current : latest;\n});\n\nreturn [{ json: { id: latestFile.json.id, name: latestFile.json.name, webViewLink: latestFile.json.webViewLink } }];\n"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
640,
400
],
"id": "35d61162-646a-4832-9c35-b48b09511257",
"name": "File Search"
},
{
"parameters": {
"operation": "download",
"fileId": {
"__rl": true,
"value": "={{ $json.id }}",
"mode": "id"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
900,
400
],
"id": "5eb91f8f-a4f9-44b7-9ef8-5e2b77ce4d1a",
"name": "Get Audio File",
"alwaysOutputData": false,
"credentials": {
"googleDriveOAuth2Api": {
"id": "wsnecETV6K89Tr76",
"name": "Google Drive account"
}
}
},
{
"parameters": {
"sendTo": "[email protected]",
"subject": "오늘의 날씨입니다.",
"message": "=<!DOCTYPE html>\n<html lang=\"ko\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>오늘의 날씨</title>\n</head>\n<body style=\"font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; padding: 0; background-color: #f9f9f9; color: #333;\">\n <div style=\"max-width: 600px; margin: 0 auto; background-color: #ffffff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);\">\n <div style=\"background: linear-gradient(135deg, #64b5f6 0%, #2196f3 100%); color: white; padding: 25px; text-align: center;\">\n <h1 style=\"margin: 0; font-size: 28px; font-weight: 500;\">오늘의 날씨 정보</h1>\n <div style=\"font-size: 16px; opacity: 0.9; margin-top: 5px;\"></div>\n </div>\n \n <div style=\"padding: 40px 30px; text-align: center;\">\n <div style=\"font-size: 72px; margin-bottom: 20px;\">🌤️</div>\n <p style=\"font-size: 18px; line-height: 1.6; margin-bottom: 30px; color: #555;\">\n 오늘의 날씨 정보가 준비되었습니다.<br>\n 아래 버튼을 클릭하여 자세한 날씨 정보를 확인하세요.\n </p>\n \n <a href=\"{{ $('File Search').item.json.webViewLink }}\" style=\"display: inline-block; padding: 14px 30px; background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%); color: white; text-decoration: none; border-radius: 50px; font-size: 16px; font-weight: 500; text-align: center; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);\">\n 날씨 정보 확인하기\n </a>\n </div>\n \n <div style=\"background-color: #f5f5f5; padding: 15px; text-align: center; font-size: 13px; color: #777;\">\n <p style=\"margin: 5px 0;\">© 날씨 정보 서비스. 모든 권리 보유.</p>\n <p style=\"margin: 5px 0;\">이 이메일은 회원님의 구독에 따라 발송되었습니다. <a href=\"#\" style=\"color: #2196f3;\">구독 취소</a></p>\n </div>\n </div>\n</body>\n</html>",
"options": {}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.1,
"position": [
1100,
400
],
"id": "c428055c-e14c-408e-b613-553982668833",
"name": "Send Gmail",
"webhookId": "798c1e87-93cf-4b40-a4c6-74418f4f9934",
"credentials": {
"gmailOAuth2": {
"id": "fGSWNeuzLmb4yUkO",
"name": "Gmail account"
}
}
},
{
"parameters": {
"resource": "databasePage",
"databaseId": {
"__rl": true,
"value": "your-notion-db-node-id",
"mode": "list",
"cachedResultName": "your-notion-db-node-id",
"cachedResultUrl": "https://www.notion.so/your-notion-db-node-id"
},
"title": "={{(() => {\n const date = new Date();\n const yyyy = date.getFullYear();\n const mm = String(date.getMonth() + 1).padStart(2, '0');\n const dd = String(date.getDate()).padStart(2, '0');\n const hh = String(date.getHours()).padStart(2, '0');\n const min = String(date.getMinutes()).padStart(2, '0');\n return `${yyyy}년 ${mm}월 ${dd}일 ${hh}시 ${min}분`;\n})()}}",
"propertiesUi": {
"propertyValues": [
{
"key": "날씨|rich_text",
"textContent": "={{ $json.weather[0].description }}"
},
{
"key": "온도|number",
"numberValue": "={{ $json.main.temp }}"
},
{
"key": "체감 온도|number",
"numberValue": "={{ $json.main.feels_like }}"
},
{
"key": "최저 기온|number",
"numberValue": "={{ $json.main.temp_min }}"
},
{
"key": "최고 기온|number",
"numberValue": "={{ $json.main.temp_max }}"
},
{
"key": "습도|number",
"numberValue": "={{ $json.main.humidity }}"
},
{
"key": "기압|number",
"numberValue": "={{ $json.main.pressure }}"
},
{
"key": "풍속|number",
"numberValue": "={{ $json.wind.speed }}"
},
{
"key": "풍향|number",
"numberValue": "={{ $json.wind.deg }}"
},
{
"key": "지역|rich_text",
"textContent": "부산"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.notion",
"typeVersion": 2.2,
"position": [
880,
-120
],
"id": "0da236a2-ebf6-4f80-9c30-46d161e898d5",
"name": "Notion",
"credentials": {
"notionApi": {
"id": "DiassQEtYbZb1YoM",
"name": "Notion account"
}
}
},
{
"parameters": {
"authentication": "oAuth2",
"select": "channel",
"channelId": {
"__rl": true,
"value": "C08623KATRV",
"mode": "list",
"cachedResultName": "n8n"
},
"text": "=[Make Weather Cast] 구글 드라이브 업로드 과정에서 에러가 발생했습니다. 구글 Oauth 인증을 다시 확인해보세요.",
"otherOptions": {}
},
"type": "n8n-nodes-base.slack",
"typeVersion": 2.3,
"position": [
1100,
180
],
"id": "99d873d7-23f2-45e7-ae27-16235b64663c",
"name": "Slack",
"webhookId": "0976d355-3da8-4867-b5c4-8062828d99c7",
"credentials": {
"slackOAuth2Api": {
"id": "EfX0VDgyaDcfZ6Rz",
"name": "Slack account"
}
}
},
{
"parameters": {
"content": "### 슬랙을 쓰기 싫다면 지우세요.",
"height": 200,
"color": 3
},
"type": "n8n-nodes-base.stickyNote",
"position": [
1060,
140
],
"typeVersion": 1,
"id": "bf2f4c4b-862c-490e-a9c6-5a71b7f59c12",
"name": "Sticky Note"
},
{
"parameters": {
"content": "### 내용을 수정해야 합니다.",
"height": 200,
"color": 4
},
"type": "n8n-nodes-base.stickyNote",
"position": [
340,
120
],
"typeVersion": 1,
"id": "c7b8f305-65fb-4501-ac23-dc736d25c10e",
"name": "Sticky Note1"
},
{
"parameters": {
"content": "### 내용을 수정해야 합니다.",
"height": 200,
"width": 440,
"color": 4
},
"type": "n8n-nodes-base.stickyNote",
"position": [
580,
-160
],
"typeVersion": 1,
"id": "52df127d-54d9-4909-a4f5-69edcc94d171",
"name": "Sticky Note2"
},
{
"parameters": {
"content": "### 내용을 수정해야 합니다.",
"height": 200,
"color": 4
},
"type": "n8n-nodes-base.stickyNote",
"position": [
800,
120
],
"typeVersion": 1,
"id": "e3b7de92-5cc8-4560-b9a0-cb47fcd99cc7",
"name": "Sticky Note3"
},
{
"parameters": {
"content": "### 내용을 수정해야 합니다.",
"height": 200,
"color": 4
},
"type": "n8n-nodes-base.stickyNote",
"position": [
340,
360
],
"typeVersion": 1,
"id": "6c14a0fd-05f1-4bbb-be32-007e76418822",
"name": "Sticky Note4"
},
{
"parameters": {
"content": "### 내용을 수정해야 합니다.",
"height": 200,
"color": 4
},
"type": "n8n-nodes-base.stickyNote",
"position": [
1040,
360
],
"typeVersion": 1,
"id": "a90013c9-c799-4e55-be5e-b2c89b0bd0cb",
"name": "Sticky Note5"
}
],
"connections": {
"Find Voice": {
"main": [
[
{
"node": "Generate Voice",
"type": "main",
"index": 0
}
]
]
},
"OpenWeatherMap API": {
"main": [
[
{
"node": "Notion",
"type": "main",
"index": 0
}
]
]
},
"Generate Voice": {
"main": [
[
{
"node": "Voice File Upload",
"type": "main",
"index": 0
}
],
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"Markdown To Plain Text": {
"main": [
[
{
"node": "Find Voice",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "OpenWeatherMap API",
"type": "main",
"index": 0
}
]
]
},
"Voice File Upload": {
"main": [
[
{
"node": "Google Drive Search",
"type": "main",
"index": 0
}
],
[
{
"node": "Slack",
"type": "main",
"index": 0
}
]
]
},
"Make Script": {
"main": [
[
{
"node": "Markdown To Plain Text",
"type": "main",
"index": 0
}
]
]
},
"Google Drive Search": {
"main": [
[
{
"node": "File Search",
"type": "main",
"index": 0
}
]
]
},
"File Search": {
"main": [
[
{
"node": "Get Audio File",
"type": "main",
"index": 0
}
]
]
},
"Get Audio File": {
"main": [
[
{
"node": "Send Gmail",
"type": "main",
"index": 0
}
]
]
},
"Send Gmail": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"Notion": {
"main": [
[
{
"node": "Make Script",
"type": "main",
"index": 0
}
]
]
},
"Slack": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "4bf18c844e20c0a559d4eb1659b1fc37fad6dfa4a5357f262b4860bcc490fecd"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment