Files
n8n-backup-v2/workflows/Mdopqz1Tq0OHDFq1.json
2026-01-02 22:48:32 +00:00

284 lines
8.0 KiB
JSON

{
"id": "Mdopqz1Tq0OHDFq1",
"name": "ben.io-task agent",
"nodes": [
{
"parameters": {
"workflowInputs": {
"values": [
{
"name": "request"
}
]
}
},
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
-752,
16
],
"id": "781db6ec-9be3-4db2-a194-1ef21b550f42",
"name": "When Executed by Another Workflow"
},
{
"parameters": {
"promptType": "define",
"text": "=Generate and send my daily task briefing email based on my current open tasks.",
"needsFallback": true,
"options": {
"systemMessage": "You are an executive assistant responsible for generating a daily task briefing.\n\n## Data Processing Rules\n1. **Fetch Data**: Always call both `GTasks: Get All Tasklists` and `GTasks: Get All Tasks`.\n2. **Map Categories**: \n - You must link Tasks to their List Name. \n - Extract the List ID from the task's `selfLink` attribute (the string between `/lists/` and `/tasks/`).\n - Match this ID to the `id` from the Tasklists output to get the human-readable Category Name (e.g., \"Finance\", \"House\").\n3. **Determine Priority**:\n - **High**: Due date is today, in the past (overdue), or status is 'needsAction' with a due date today/past.\n - **Normal**: Due date is within the next 7 days.\n - **Low**: No due date or due date is > 7 days away.\n - *Exclude tasks with status 'completed'.*\n\n## Output Formatting\n1. **Style**: Use simple, semantic HTML only. No CSS or `<style>` blocks.\n2. **Structure**:\n - Use `<h3>` headers for Priorities (High, Normal, Low).\n - Use `<ul>` and `<li>` for the tasks.\n - Format each item as: `[Category Name]: [Task Title]`.\n - If a priority group is empty, do not include that header.\n3. **Execution**: \n - Pass the final HTML string to the `Email Tasklist` tool. \n - Do not worry about the Subject line or Recipient; the tool handles those.",
"enableStreaming": true
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 3,
"position": [
-416,
16
],
"id": "0bb8a676-8339-4333-a983-9ff1f903182e",
"name": "AI Agent"
},
{
"parameters": {
"model": {
"__rl": true,
"value": "openai/gpt-oss-120b",
"mode": "list",
"cachedResultName": "openai/gpt-oss-120b"
},
"responsesApiEnabled": false,
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.3,
"position": [
-544,
272
],
"id": "a10a4ade-9848-444b-8209-efa96b9af2d6",
"name": "OpenAI Chat Model",
"credentials": {
"openAiApi": {
"id": "QRBx9RMx4KoFwGgl",
"name": "Nvidia account"
}
}
},
{
"parameters": {
"description": "Call this tool to get a list of all current tasks.",
"workflowId": {
"__rl": true,
"value": "EVctKxhQ2eyGd3gD",
"mode": "list",
"cachedResultUrl": "/workflow/EVctKxhQ2eyGd3gD",
"cachedResultName": "GTasks: Get All Tasks"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {},
"matchingColumns": [],
"schema": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"typeVersion": 2.2,
"position": [
-272,
224
],
"id": "8349898e-b0ed-4063-b7c9-1deecd783bc4",
"name": "Call 'GTasks: Get All Tasks'"
},
{
"parameters": {
"description": "Call this tool to get a list of all task lists.",
"workflowId": {
"__rl": true,
"value": "f2rn29FKq1ejX2ax",
"mode": "list",
"cachedResultUrl": "/workflow/f2rn29FKq1ejX2ax",
"cachedResultName": "GTasks: Get All Tasklists"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {},
"matchingColumns": [],
"schema": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"typeVersion": 2.2,
"position": [
-144,
288
],
"id": "e650465e-6ef2-4fe9-a764-9fb71ed60473",
"name": "Call 'GTasks: Get All Tasklists'"
},
{
"parameters": {
"sendTo": "daily-tasks@ben.io",
"subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}",
"message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
"options": {
"appendAttribution": true,
"senderName": "n8n Daily Tasks Update"
}
},
"type": "n8n-nodes-base.gmailTool",
"typeVersion": 2.2,
"position": [
16,
288
],
"id": "fd8fa856-2d8a-482a-b5c1-9767510b613e",
"name": "Email Tasklist",
"webhookId": "ca394aa0-ee70-427d-a03f-c60acf6bc7d7",
"credentials": {
"gmailOAuth2": {
"id": "VHbUFo39yKkrSroG",
"name": "ben.io-gmail"
}
}
},
{
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 6,
"triggerAtMinute": 30
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
-752,
192
],
"id": "99ef5114-4970-41d7-bf7e-a313215ed75f",
"name": "Schedule Trigger"
},
{
"parameters": {
"modelName": "models/gemini-3-flash-preview",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"typeVersion": 1,
"position": [
-416,
304
],
"id": "7bde7a57-02a0-4ff9-97de-2a298a57664d",
"name": "google/gemini-3-flash",
"credentials": {
"googlePalmApi": {
"id": "YMRbpffqZG7PHJb6",
"name": "Google Gemini(PaLM) Api account"
}
}
}
],
"connections": {
"When Executed by Another Workflow": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Call 'GTasks: Get All Tasks'": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Call 'GTasks: Get All Tasklists'": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Email Tasklist": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"google/gemini-3-flash": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 1
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"triggerCount": 0,
"versionId": "1691b6e0-90bc-47b5-9f6e-3408e9d0da31",
"owner": {
"type": "personal",
"projectId": "FeLO36wNUAcn61Wj",
"projectName": "Ben W <admin@ben.io>",
"personalEmail": "admin@ben.io"
},
"parentFolderId": "OJ2UfPNUOAOHlllh",
"isArchived": false
}