{
  "name": "simpel email",
  "nodes": [
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "simple": false,
        "filters": {
          "q": "<__PLACEHOLDER_VALUE__Gmail search query (e.g., from:example@gmail.com, subject:support, label:important)__>",
          "readStatus": "unread"
        },
        "options": {}
      },
      "id": "07f3f4aa-5c80-4710-811f-58dc0c135fde",
      "name": "When Email Received",
      "type": "n8n-nodes-base.gmailTrigger",
      "typeVersion": 1.3,
      "position": [
        224,
        192
      ],
      "credentials": {
        "gmailOAuth2": {
          "id": "O37qryqTXNriVuUl",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Generate a professional and helpful email reply to the following email:\n\nFrom: {{ $json.from }}\nSubject: {{ $json.subject }}\nMessage: {{ $json.text }}\n\nWrite a clear, concise, and friendly response that addresses their concerns.",
        "options": {
          "systemMessage": "You are a helpful customer service assistant. Generate professional email replies that are friendly, clear, and address the customer's needs. Keep responses concise but thorough."
        }
      },
      "id": "8a119e71-ef8e-410e-b48c-4c76bbfaf25d",
      "name": "Generate AI Reply",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        464,
        192
      ]
    },
    {
      "parameters": {
        "operation": "reply",
        "messageId": "={{ $(\"When Email Received\").item.json.id }}",
        "emailType": "text",
        "message": "={{ $json.output }}",
        "options": {
          "appendAttribution": true
        }
      },
      "id": "c3bdc5da-5866-4d1c-8b04-b7651b652ea2",
      "name": "Send Reply",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        816,
        192
      ],
      "webhookId": "107696b3-c48b-4b2a-a4f9-5f92488ef5ed",
      "credentials": {
        "gmailOAuth2": {
          "id": "O37qryqTXNriVuUl",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "rules": {
          "rule": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "a68c7fed-1f41-409e-94dd-27f695c859a6",
                    "leftValue": "",
                    "rightValue": "",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            }
          ]
        }
      },
      "type": "@n8n/n8n-nodes-langchain.modelSelector",
      "typeVersion": 1,
      "position": [
        448,
        416
      ],
      "id": "d728d3a0-0bb6-4886-9b64-5c93c1b686e3",
      "name": "Model Selector"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        464,
        624
      ],
      "id": "7a2b8674-01b8-45fd-89df-67014da20610",
      "name": "OpenRouter Chat Model"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "typeVersion": 1,
      "position": [
        592,
        624
      ],
      "id": "0e204ae0-93fe-4cec-bed6-dd8679c47368",
      "name": "Ollama Chat Model",
      "credentials": {
        "ollamaApi": {
          "id": "UUppzooVUMKzHZHp",
          "name": "Ollama account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "When Email Received": {
      "main": [
        [
          {
            "node": "Generate AI Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate AI Reply": {
      "main": [
        [
          {
            "node": "Send Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Model Selector": {
      "ai_languageModel": [
        [
          {
            "node": "Generate AI Reply",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Model Selector",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Model Selector",
            "type": "ai_languageModel",
            "index": 1
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "ad87587a-fec3-43b1-800b-30e855625620",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "d546804c2bb0008df2c6a240a5f585b7ef30c6f8790315810adb5597e2fc3ab0"
  },
  "id": "hpS4xO3pzfCW62Th",
  "tags": []
}