WORKFLOW · N8N
[n8n Template] AI Morning Brief
Prompts👁 0
WORKFLOW JSON
{
"meta": {
"instanceId": "template",
"templateCredsSetupCompleted": false
},
"name": "[n8n Template] AI Morning Brief",
"nodes": [
{
"id": "b2c3d4e5-0001-0001-0001-b2c3d4e50001",
"name": "Every Day 8am",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
200,
300
],
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 8 * * *"
}
]
}
},
"typeVersion": 1
},
{
"id": "b2c3d4e5-0002-0002-0002-b2c3d4e50002",
"name": "Build Context",
"type": "n8n-nodes-base.code",
"position": [
420,
300
],
"parameters": {
"jsCode": "// Build today's context for Claude\nconst now = new Date();\nconst dateStr = now.toLocaleDateString('en-US', {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric'\n});\n\n// Customize: add your tasks/calendar data here\nconst todaysTasks = [\n 'Check emails',\n 'Team standup at 10am',\n 'Review pull requests'\n];\n\nreturn [{\n json: {\n date: dateStr,\n tasks: todaysTasks.join('\\n- '),\n prompt: `Today is ${dateStr}.\\n\\nMy tasks for today:\\n- ${todaysTasks.join('\\n- ')}\\n\\nPlease give me a motivating, concise morning brief (3-5 sentences) that:\\n1. Acknowledges today's date/day\\n2. Highlights the key priorities\\n3. Ends with one actionable focus tip`\n }\n}];"
},
"typeVersion": 2
},
{
"id": "b2c3d4e5-0003-0003-0003-b2c3d4e50003",
"name": "Generate Brief",
"type": "n8n-nodes-base.httpRequest",
"position": [
640,
300
],
"parameters": {
"url": "https://api.anthropic.com/v1/messages",
"method": "POST",
"options": {},
"jsonBody": "={\n \"model\": \"claude-haiku-4-5\",\n \"max_tokens\": 300,\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"{{ $json.prompt }}\"\n }\n ]\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.ANTHROPIC_API_KEY }}"
},
{
"name": "anthropic-version",
"value": "2023-06-01"
},
{
"name": "content-type",
"value": "application/json"
}
]
}
},
"typeVersion": 4
},
{
"id": "b2c3d4e5-0004-0004-0004-b2c3d4e50004",
"name": "Send via LINE",
"type": "n8n-nodes-base.httpRequest",
"position": [
860,
300
],
"parameters": {
"url": "https://api.line.me/v2/bot/message/push",
"method": "POST",
"options": {},
"jsonBody": "={\n \"to\": \"{{ $env.LINE_USER_ID }}\",\n \"messages\": [\n {\n \"type\": \"text\",\n \"text\": \"🌅 Morning Brief\\n\\n{{ $json.content[0].text }}\"\n }\n ]\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $env.LINE_CHANNEL_ACCESS_TOKEN }}"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "n8n-claude-template-02",
"staticData": null,
"connections": {
"Build Context": {
"main": [
[
{
"node": "Generate Brief",
"type": "main",
"index": 0
}
]
]
},
"Every Day 8am": {
"main": [
[
{
"node": "Build Context",
"type": "main",
"index": 0
}
]
]
},
"Generate Brief": {
"main": [
[
{
"node": "Send via LINE",
"type": "main",
"index": 0
}
]
]
}
}
}RELATED WORKFLOWS
COMMENTS
No comments yet — be the first.
