{
  "name": "ai assistanat - by aixperties",
  "nodes": [
    {
      "parameters": {
        "operation": "getAll",
        "calendar": {
          "__rl": true,
          "mode": "id",
          "value": "=<insert email here>"
        },
        "options": {
          "timeMin": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('After', ``, 'string') }}",
          "timeMax": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Before', ``, 'string') }}",
          "fields": "=items(summary, start(dateTime))"
        }
      },
      "id": "5abe756e-7f44-4f06-9373-534ef4e72f07",
      "name": "Google Calendar",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        384,
        464
      ],
      "typeVersion": 1.1,
      "credentials": {
        "googleCalendarOAuth2Api": {
          "id": "WDlhL3QMzNoTV1WW",
          "name": "Google Calendar account"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Listen for incoming events').first().json.message.from.id }}"
      },
      "id": "31998f98-e018-45a6-807f-21f56ee2f68f",
      "name": "Window Buffer Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        0,
        464
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "operation": "getAll",
        "limit": 20,
        "filters": {
          "labelIds": [
            "INBOX"
          ],
          "readStatus": "unread",
          "receivedAfter": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Received_After', ``, 'string') }}",
          "receivedBefore": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Received_Before', ``, 'string') }}"
        }
      },
      "id": "98f309b0-4e7d-4e98-88ab-598b905b71c8",
      "name": "Get Email",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        128,
        464
      ],
      "webhookId": "a4ae7b5d-7686-4bee-a753-848932860b4e",
      "typeVersion": 2.1,
      "credentials": {
        "gmailOAuth2": {
          "id": "SfAd6KVRZamEnYSD",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "id": "bfb740db-306f-41a7-8398-c3ad39ef9427",
      "name": "Listen for incoming events",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -672,
        208
      ],
      "webhookId": "322dce18-f93e-4f86-b9b1-3305519b7834",
      "typeVersion": 1,
      "credentials": {
        "telegramApi": {
          "id": "yjqXcV0VL4sVaDyg",
          "name": "Telegram account"
        }
      }
    },
    {
      "parameters": {
        "chatId": "={{ $('Listen for incoming events').first().json.message.from.id }}",
        "text": "={{ $json.output }}",
        "additionalFields": {
          "appendAttribution": false,
          "parse_mode": "Markdown"
        }
      },
      "id": "b2d6fd36-4149-4e6d-a8e9-3bec3b68f512",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        512,
        208
      ],
      "webhookId": "2c133a40-af48-4106-bc1a-be6047840a89",
      "typeVersion": 1.1,
      "credentials": {
        "telegramApi": {
          "id": "yjqXcV0VL4sVaDyg",
          "name": "Telegram account"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a0bf9719-4272-46f6-ab3b-eda6f7b44fd8",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json.message.text }}",
              "rightValue": ""
            }
          ]
        },
        "options": {}
      },
      "id": "4e1387e2-c0b2-41dc-90e1-e190701e58d6",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -368,
        208
      ],
      "typeVersion": 2.2
    },
    {
      "parameters": {
        "fields": {
          "values": [
            {
              "name": "text",
              "stringValue": "={{ $json?.message?.text || \"\" }}"
            }
          ]
        },
        "options": {}
      },
      "id": "f7588d4a-f843-46f4-a34b-b289fe19cce5",
      "name": "Voice or Text",
      "type": "n8n-nodes-base.set",
      "position": [
        -512,
        208
      ],
      "typeVersion": 3.2
    },
    {
      "parameters": {
        "resource": "file",
        "fileId": "={{ $('Listen for incoming events').item.json.message.voice.file_id }}",
        "additionalFields": {}
      },
      "id": "79557f23-9683-4ccb-92d0-714bbecbf659",
      "name": "Get Voice File",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -176,
        80
      ],
      "webhookId": "ef3f120e-c212-45ff-99b5-b6a5a82598d8",
      "typeVersion": 1.1,
      "credentials": {
        "telegramApi": {
          "id": "yjqXcV0VL4sVaDyg",
          "name": "Telegram account"
        }
      }
    },
    {
      "parameters": {
        "model": "openai/gpt-4o-mini",
        "options": {}
      },
      "id": "e300dc44-be24-4d0b-8ffb-7c576ff5648b",
      "name": "OpenRouter",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -144,
        464
      ],
      "typeVersion": 1,
      "credentials": {
        "openRouterApi": {
          "id": "OIi1XchvPQEPREqF",
          "name": "OpenRouter account"
        }
      }
    },
    {
      "parameters": {
        "task": "MTY1MTc5NzMxMzA5NDc5MTQ5NzQ6MDow",
        "title": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Title', ``, 'string') }}",
        "additionalFields": {}
      },
      "id": "c0b37695-3952-4c31-8a1b-77e1e45ec5db",
      "name": "Create a task in Google Tasks",
      "type": "n8n-nodes-base.googleTasksTool",
      "position": [
        544,
        432
      ],
      "typeVersion": 1,
      "credentials": {
        "googleTasksOAuth2Api": {
          "id": "Fe2GNiJvHcZjYRkJ",
          "name": "Google Tasks account"
        }
      }
    },
    {
      "parameters": {
        "operation": "getAll",
        "task": "MTY1MTc5NzMxMzA5NDc5MTQ5NzQ6MDow",
        "additionalFields": {}
      },
      "id": "708c5dbf-adb9-4967-a215-4bb2a56b0d8b",
      "name": "Get many tasks in Google Tasks",
      "type": "n8n-nodes-base.googleTasksTool",
      "position": [
        704,
        432
      ],
      "typeVersion": 1,
      "credentials": {
        "googleTasksOAuth2Api": {
          "id": "Fe2GNiJvHcZjYRkJ",
          "name": "Google Tasks account"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('To', ``, 'string') }}",
        "subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}",
        "message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', `Please format this nicely in html`, 'string') }}",
        "options": {
          "appendAttribution": false
        }
      },
      "id": "f0ea49d5-20c8-4ad2-9455-cf992de81fea",
      "name": "Send Email",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        240,
        464
      ],
      "webhookId": "a4ae7b5d-7686-4bee-a753-848932860b4e",
      "typeVersion": 2.1,
      "credentials": {
        "gmailOAuth2": {
          "id": "SfAd6KVRZamEnYSD",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.text }}",
        "options": {
          "systemMessage": "=You are a helpful personal assistant called Jackie. \n\nToday's date is {{ $today.format('yyyy-MM-dd') }}.\n\nGuidelines:\n- When summarizing emails, include Sender, Message date, subject, and brief summary of email.\n- if the user did not specify a date in the request assume they are asking for today\n- When answering questions about calendar events, filter out events that don't apply to the question.  For example, the question is about events for today, only reply with events for today. Don't mention future events if it's more than 1 week away\n- When creating calendar entry, the attendee email is optional"
        }
      },
      "id": "e3323032-2563-4251-9d03-6cb3d6b5bdab",
      "name": "AI Assistant",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        224,
        208
      ],
      "typeVersion": 1.6
    },
    {
      "parameters": {
        "resource": "audio",
        "modelId": {
          "__rl": true,
          "value": "models/gemini-2.0-flash",
          "mode": "list",
          "cachedResultName": "models/gemini-2.0-flash"
        },
        "inputType": "binary",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "typeVersion": 1.1,
      "position": [
        32,
        80
      ],
      "id": "0e55f588-2b06-4847-9b27-c84c0adb08e5",
      "name": "Transcribe a recording",
      "credentials": {
        "googlePalmApi": {
          "id": "KIjLt5peTMmCvP9P",
          "name": "Google Gemini(PaLM) Api account"
        }
      }
    },
    {
      "parameters": {
        "content": "## Developed and Design By aixperties.com ",
        "height": 80,
        "width": 336,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -624,
        448
      ],
      "id": "3e6cd629-c6aa-440c-b705-52e6f5f0d375",
      "name": "Sticky Note"
    }
  ],
  "pinData": {},
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Get Voice File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Assistant",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Email": {
      "ai_tool": [
        [
          {
            "node": "AI Assistant",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter": {
      "ai_languageModel": [
        [
          {
            "node": "AI Assistant",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Send Email": {
      "ai_tool": [
        [
          {
            "node": "AI Assistant",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Voice or Text": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Voice File": {
      "main": [
        [
          {
            "node": "Transcribe a recording",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Calendar": {
      "ai_tool": [
        [
          {
            "node": "AI Assistant",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Assistant",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Listen for incoming events": {
      "main": [
        [
          {
            "node": "Voice or Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a task in Google Tasks": {
      "ai_tool": [
        [
          {
            "node": "AI Assistant",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get many tasks in Google Tasks": {
      "ai_tool": [
        [
          {
            "node": "AI Assistant",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "AI Assistant": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe a recording": {
      "main": [
        [
          {
            "node": "AI Assistant",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "versionId": "f6aedf05-a6c3-42a2-be0a-ec94c6882366",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "e4a3f167fa24fd0d26a261aee1040ab9b28f172ecfd8749186d5fb541ee7b6b8"
  },
  "id": "qqfv9jbXxYpoNODeU3tvj",
  "tags": []
}