{
  "id": "hdrKycSXs7Guck3f",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "My workflow 2",
  "tags": [],
  "nodes": [
    {
      "id": "8a8aa106-bc0f-4bc6-b98e-8b0261c7289e",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        80,
        -64
      ],
      "parameters": {
        "url": "https://variyadhaval2018.atlassian.net/rest/api/3/search/jql",
        "options": {},
        "sendQuery": true,
        "authentication": "predefinedCredentialType",
        "queryParameters": {
          "parameters": [
            {
              "name": "jql",
              "value": "assignee = currentUser()"
            },
            {
              "name": "fields",
              "value": "*all"
            }
          ]
        },
        "nodeCredentialType": "jiraSoftwareCloudApi"
      },
      "credentials": {
        "jiraSoftwareCloudApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "4344670c-684a-4b38-9c5b-258e8a61701a",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        288,
        -64
      ],
      "parameters": {
        "text": "=Role: Act as a Senior Project Manager and Productivity Strategist.\n\nTask: Analyze the provided JSON array of Jira issues and extract a high-level summary of actionable items to help me organize my \"To-Do\" list for today.\n\nExtraction & Logic Rules:\n\nCore Details: For each issue, extract the Key (e.g., PROJ-123), Summary (Title), Status, and a condensed 1-sentence version of the Description.\n\nSub-Task Mapping: If an issue has sub-tasks, list their titles and statuses clearly. Identify if any sub-tasks are \"Blockers.\"\n\nPriority Inference: Based on the \"Priority\" field and \"Due Date\" (if present), categorize each task as \"High,\" \"Medium,\" or \"Low\" impact for today\u2019s schedule.\n\nImportant Extras: Extract any specific mentions of \"Assignee\" or \"Linked Issues\" that might affect my ability to finish the task today.\n\nConstraint: Ignore metadata like creator IDs, attachments, or transition history unless it directly affects the current status.\n\nInput Data:\n{{ JSON.stringify($json.issues) }}\n\nOutput Format (Strict JSON ONLY):\n\n{\n  \"key\": \"string\",\n  \"title\": \"string\",\n  \"status\": \"string\",\n  \"priority\": \"VeryHigh/High/Medium/Low\",\n  \"goal\": \"state the main goal of task\",\n  \"subtasks\": [\n    { \"title\": \"string\", \"status\": \"string\" }\n  ]\n}",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 3.1
    },
    {
      "id": "435828e0-6dbf-4ffc-9543-6f444bac773a",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        288,
        112
      ],
      "parameters": {
        "model": "openai/gpt-oss-120b:free",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2592e23f-096e-4f31-988b-6707da125e91",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        640,
        -64
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={\n  \"issues\": {{ $json.output }}\n}\n"
      },
      "typeVersion": 3.4
    },
    {
      "id": "32396462-4b58-4c9f-b1f9-0295579779e1",
      "name": "AI Agent1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        880,
        -64
      ],
      "parameters": {
        "text": "=Role: Act as a pragmatic Senior Engineering Manager who protects developers from burnout and unrealistic scheduling.\n\nTask: Create a highly realistic, stress-free daily timeline from 08:00 to 17:00 based on the provided Jira issues.\n\nStrict Scheduling Rules:\n\nThe \"Human Velocity\" Limit: DO NOT attempt to complete an entire Jira issue lifecycle (develop, test, review, document) in one day. Software development takes time. Assume that writing a single core feature or function will take 3 to 4 hours of uninterrupted focus.\n\nTask Cap: Select a maximum of 1 to 2 major sub-tasks to focus on for the entire day. Ignore the remaining issues in the backlog. It is completely acceptable and expected to leave issues untouched.\n\nHonest Pacing: Do not rapidly context-switch. If the morning is spent building a feature, the afternoon should be spent debugging it, testing it, or moving to just one other isolated task.\n\nFixed Timetable: The schedule must run strictly from 08:00 to 17:00. Include exactly one 1-hour lunch break from 12:00 - 13:00.\n\nBuffer Time: Include at least one 30-minute buffer for \"Code compilation, debugging, or unexpected roadblocks.\"\n\nInput Data:\n{{ JSON.stringify($json.issues) }}\n\nOutput Requirements:\n\nStrict Output: Output ONLY the timeline. Do not include introductory text, executive summaries, advice sections, or conversational filler.\n\nFormat: Use a simple, clean list format exactly like this:\n08:00 - 10:00: [Deep focus on specific sub-task]\n10:00 - 10:30: [Buffer / Debugging]",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 3.1
    },
    {
      "id": "812d76d3-fedc-4377-848c-059fea49b241",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        880,
        112
      ],
      "parameters": {
        "model": "openai/gpt-oss-120b:free",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2762d4a1-3ec8-4f9d-8dd3-6457e1ea12aa",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1232,
        -64
      ],
      "parameters": {
        "sendTo": "user@example.com",
        "message": "=Your plan of today follows as below:\n\n{{ $json.output }}\n\nBest of luck,\n\nYour AI Agent :)",
        "options": {
          "appendAttribution": false
        },
        "subject": "Your todays task",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "c5e4aff5-bf4f-4c90-8c81-376595b8e1cc",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -736,
        -160
      ],
      "parameters": {
        "color": "#9D5E15",
        "width": 496,
        "height": 544,
        "content": "## \u2699\ufe0f How it Works\nEvery morning at 8:00 AM (just before you start your day), this workflow automatically runs and sends you an email with your daily plan. It does this by extracting your assigned issues from Jira and organizing them into a clear, actionable To-Do list.\n\n## \ud83d\ude80 How to Set It Up\n**Prerequisites:** You will need API keys for the three services used in this workflow.\n1.  **Google Gmail:** [Create API Key](https://console.cloud.google.com/apis)\n2.  **Jira:** [Create API Token](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/#Create-an-API-token)\n3.  **OpenRouter:** [Create API Key](https://openrouter.ai/workspaces/default/keys/)\n\n*Need help creating or adding API keys? Watch my step-by-step YouTube tutorial! (Find the link in the sticky note on the far right).*\n\n## \ud83d\udee0\ufe0f Customization Options\nMake this workflow your own!\n*   **Swap the AI Model:** Easily replace the current AI model with any free or paid model you prefer within OpenRouter.\n*   **Refine the Prompt:** Edit the AI prompt in the agent node to get results perfectly tailored to how you like your To-Do list structured.\n*   **Expand the Workflow:** Feel free to add new nodes, connect other apps (like Slack or Notion), and tweak the workflow to get your desired output!"
      },
      "typeVersion": 1
    },
    {
      "id": "182bcfcb-c065-4ffa-920f-ccbfda4c7408",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -144,
        -64
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 7,
              "triggerAtMinute": 55
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "89cbeb91-5f1a-4f34-8d78-33cfcd7c9a1c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        -128
      ],
      "parameters": {
        "width": 448,
        "height": 304,
        "content": "## Trigger and extract your issues from Jira"
      },
      "typeVersion": 1
    },
    {
      "id": "cf1e831b-b67a-4c84-991f-86c41b54b642",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        -160
      ],
      "parameters": {
        "width": 576,
        "height": 416,
        "content": "## AI agent to extact only important information from issues which is needed to plan your day"
      },
      "typeVersion": 1
    },
    {
      "id": "06ee18ab-20cc-4c2c-88ba-1675ab54d8de",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        -160
      ],
      "parameters": {
        "width": 576,
        "height": 416,
        "content": "## Create plan and send it to your specified email id"
      },
      "typeVersion": 1
    },
    {
      "id": "ca299aef-fd38-46a7-a586-acc42cc1d4b2",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1456,
        -176
      ],
      "parameters": {
        "color": "#483FC6",
        "width": 384,
        "height": 416,
        "content": "## Video tutorial\n@[youtube](KoqQUl8DT1g)"
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "9bbe2f32-bbbb-42a5-af88-8b245fcd7730",
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent1": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message": {
      "main": [
        []
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}