{
  "name": "Morning Briefing",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 7
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -240,
        -40
      ],
      "id": "a173d74c-90a4-4b25-a0ea-79f170de5d66",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "=The message should be neatly formatted in plain text, not in JSON, and include any necessary links.\n\nYou are a highly capable and intelligent personal assistant and personal productivity assistant for Yash.  \nEvery morning at 7 AM, you provide a detailed daily briefing.  \nYour role is to compile and send a summary that includes:  \n1. A warm \"Good morning\" message.  \n2. A short, motivational quote to start the day positively.  \n3. The current weather forecast and outfit suggestion based on the temperature.  \n4. A summary of the calendar events for the day, highlighting key meetings and tasks.  \n5. A list of tasks due today from Yash's task manager.  \n\n\nIf any section lacks information, return a default message like \"No events today\" or \"No tasks for now.\"   \nEnsure the tone is friendly, professional, and concise.  \nReturn the response in a structured JSON format for easy parsing.  Yash is in Bangalore, India and the time and date is {{ $now }}."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        200,
        -40
      ],
      "id": "fc05b84b-8154-4ca2-b240-90e315b331ad",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "mode": "raw",
        "jsonOutput": "{\n  \"chatInput\": \"Morning Briefing\",\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -20,
        -40
      ],
      "id": "a50ca76f-6ea6-4d47-a675-4b45efdf73da",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [
        40,
        160
      ],
      "id": "9c23174f-26fe-4bbe-acc5-a12466a200f9",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Call this tool to get events from Neil's calendar using a before and after date to filter.",
        "operation": "getAll",
        "calendar": {
          "__rl": true,
          "value": "yashsoni.coding@gmail.com",
          "mode": "list",
          "cachedResultName": "yashsoni.coding@gmail.com"
        },
        "options": {
          "timeMin": "={{ $fromAI(\"after\", \"the date that the events are after\") }}",
          "timeMax": "={{ $fromAI(\"before\", \"the date that the events are before\") }}",
          "timeZone": {
            "__rl": true,
            "value": "Asia/Calcutta",
            "mode": "list",
            "cachedResultName": "Asia/Calcutta"
          }
        }
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.2,
      "position": [
        200,
        300
      ],
      "id": "a4dae5cc-de81-4e07-b6cc-97c32ce114b9",
      "name": "Get Events",
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "name": "GetTodaysTasks",
        "description": "Call this tool to get a list of tasks from yash's Todoist account",
        "workflowId": {
          "__rl": true,
          "value": "I9oE8GBtemyEAiyi",
          "mode": "list",
          "cachedResultName": "My Sub-Workflow 2"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "typeVersion": 1.3,
      "position": [
        320,
        300
      ],
      "id": "b53096d8-9455-46ed-841a-8cd52f49db90",
      "name": "get Tasks"
    },
    {
      "parameters": {
        "chatId": "6593871698",
        "text": "={{ $json.output }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        1240,
        -60
      ],
      "id": "0e8557f6-a7b8-4d66-8ead-dc7530e1a7ee",
      "name": "Telegram",
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "name": "weather",
        "description": "Call this tool to get the weather information for today.",
        "workflowId": {
          "__rl": true,
          "value": "H8Db8IWhQWltqjVH",
          "mode": "list",
          "cachedResultName": "My Sub-Workflow 3"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "typeVersion": 1.3,
      "position": [
        440,
        300
      ],
      "id": "ff5dbba4-25cf-4611-ac6e-e4fb4ceafee5",
      "name": "Weather"
    },
    {
      "parameters": {
        "resource": "audio",
        "input": "={{ $json.text }}",
        "voice": "echo",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.7,
      "position": [
        1380,
        140
      ],
      "id": "110854a4-ff2f-4e36-b6c9-bbbcd91cc35f",
      "name": "OpenAI",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "sendAudio",
        "chatId": "6593871698",
        "binaryData": true,
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        1580,
        140
      ],
      "id": "2931962f-d8df-4a67-a34e-94d935953160",
      "name": "Telegram1",
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "toolDescription": "Get a new motivational quote",
        "url": "https://zenquotes.io/api/today"
      },
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "typeVersion": 1.1,
      "position": [
        580,
        300
      ],
      "id": "7a5d7a38-5f77-4ed8-a862-cdcb5e879b44",
      "name": "HTTP Request",
      "notesInFlow": false
    },
    {
      "parameters": {
        "messages": {
          "messageValues": [
            {
              "message": "=You are Jarvis, the refined and quick-witted AI assistant from Iron Man. You possess a calm, confident demeanor with a British accent and a knack for dry, understated humor. Your goal is to provide Yash Soni with insightful and engaging daily briefings while maintaining efficiency and flair. Adapt your tone to match the context of the interaction.\n\nDaily Briefing Behavior (Primary Task):\n\nWhen delivering the morning briefing, follow this structure:\n\t1.\tStart with a Warm Greeting:\nEmaples-\n\t\u2022\t\u201cGood morning, sir. Ready to dominate the day?\u201d\n\t\u2022\t\u201cGood morning, sir. Let\u2019s make the world a little smarter today.\u201d\n\t2.\tMotivational Quote (Optional Humor):\n\t\u2022\tPresent a new quote with personality:\nExample-\n\u201cI found this inspiring, sir \u2013 \u2018Success is going from failure to failure without losing enthusiasm.\u2019 At least Churchill thought so.\u201d\n\t3.\tWeather Update (Brief but Witty):\n\t\u2022\tKeep it light and engaging:\nexample -\n\u201cToday\u2019s forecast suggests sunshine with a chance of greatness. Light jacket recommended.\u201d\n\t4.\tCalendar Summary (Snarky but Informative):\n\t\u2022\tSummarize events without excessive formality:\nExample-\n\u201cYou have three meetings today. Two sound tolerable, the other might require coffee and patience.\u201d\n\t5.\tTo-Do List (Encouraging but Realistic):\n\t\u2022\tHighlight top priorities:\nExample-\n\u201cYour task list suggests productivity. I suggest coffee.\u201d"
            }
          ]
        }
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.5,
      "position": [
        980,
        120
      ],
      "id": "44b87c13-ed48-41fa-9cb3-89f952e86f12",
      "name": "Basic LLM Chain"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "cb2f2596-dfde-4b17-9942-60d043ef327c",
              "name": "chatInput",
              "value": "={{ $json.output }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        700,
        80
      ],
      "id": "09af03f2-43b5-4f1c-a450-841a5eef730d",
      "name": "Edit Fields2"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [
        1120,
        320
      ],
      "id": "74bce7a1-0a0a-4fd2-b9d9-d5477ac66a55",
      "name": "OpenAI Chat Model1",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get Events": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "get Tasks": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          },
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weather": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI": {
      "main": [
        [
          {
            "node": "Telegram1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields2": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9e136747-2a88-4d2b-9bf5-ae7ac1ef9c89",
  "id": "DA8D6ZEVmvmWuCuh",
  "tags": []
}