Files
n8n_workflow/imap2line/n8n_imap_to_line_workflow.json

96 lines
2.9 KiB
JSON

{
"name": "IMAP to LINE Notification (Messaging API) Enhanced",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "minutes",
"minutes": 3
}
]
}
},
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1,
"position": [
0,
0
]
},
{
"parameters": {
"resource": "message",
"operation": "getAll",
"mailbox": "INBOX",
"format": "resolved",
"downloadAttachments": false,
"options": {
"limit": 10,
"search": "UNSEEN SINCE 10-Feb-2026"
}
},
"name": "IMAP Enhanced",
"type": "n8n-nodes-imap-enhanced.imapEnhanced",
"typeVersion": 1,
"position": [
200,
0
]
},
{
"parameters": {
"method": "POST",
"url": "https://api.line.me/v2/bot/message/push",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={{ {\n \"to\": \"YOUR_USER_ID_HERE\",\n \"messages\": [\n {\n \"type\": \"text\",\n \"text\": \"📩 新着メール\\n\\nFrom: \" + ($json.from?.text || \"Unknown\") + \"\\nSubject: \" + ($json.subject || \"No Subject\")\n }\n ]\n} }}",
"options": {}
},
"name": "LINE Messaging API",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 3,
"position": [
400,
0
]
}
],
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "IMAP Enhanced",
"type": "main",
"index": 0
}
]
]
},
"IMAP Enhanced": {
"main": [
[
{
"node": "LINE Messaging API",
"type": "main",
"index": 0
}
]
]
}
}
}