{
 "name": "[노드 한 장] Gmail Trigger · 내 테스트 메일 한 건만",
 "nodes": [
  {
   "id": "trigger",
   "name": "Gmail Trigger",
   "type": "n8n-nodes-base.gmailTrigger",
   "typeVersion": 1.3,
   "position": [
    0,
    0
   ],
   "parameters": {
    "authentication": "oAuth2",
    "pollTimes": {
     "item": [
      {
       "mode": "everyMinute"
      }
     ]
    },
    "event": "messageReceived",
    "simple": false,
    "filters": {
     "q": "from:me to:me subject:YOUR_TEST_SUBJECT",
     "readStatus": "both"
    },
    "options": {}
   }
  },
  {
   "id": "verify",
   "name": "Verify own sample only",
   "type": "n8n-nodes-base.code",
   "typeVersion": 2,
   "position": [
    300,
    0
   ],
   "parameters": {
    "jsCode": "const j=$input.first().json;const text=String(j.text||'').trim();if(j.subject!==\"YOUR_TEST_SUBJECT\"||text!==\"Gmail Trigger 실습용으로 직접 작성한 본인 테스트 메일입니다. 샘플 한 통만 보내고 검색 필터로 이 메일만 확인합니다.\")throw Error('Sample mismatch');return [{json:{sample:true,matched_items:$input.all().length,subject_matches:true,body_matches:true,subject:j.subject,body:text,message_id:j.id,thread_id:j.threadId}}];"
   }
  }
 ],
 "connections": {
  "Gmail Trigger": {
   "main": [
    [
     {
      "node": "Verify own sample only",
      "type": "main",
      "index": 0
     }
    ]
   ]
  }
 },
 "settings": {
  "executionOrder": "v1"
 },
 "meta": {
  "templateCredsSetupCompleted": false,
  "source": "datapopcorn.ai/workflow/nodes"
 }
}