{
  "name": "연구 자동화 실습 · 문헌 읽기 목록",
  "active": false,
  "nodes": [
    {
      "id": "practice-instructions",
      "name": "Practice instructions",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        -400
      ],
      "parameters": {
        "content": "## 연구 자동화 실습\n수동 실행: RSS Read의 고정된 예제 6건 → 문헌 5행. 다시 실행해도 5행.\n자동 발행·메일·AI 호출은 없습니다.\n실제 사용 전: RSS의 Pin data 해제 → 내 RSS 주소로 변경 → Create reading queue의 표 이름 변경 → 수동 검증 → 주간 트리거 활성화와 Publish.\n자세한 안내: https://airesearch.studio/modules/08-automation/monitoring-workflows\n검증 대상: n8n 2.35.7. 표는 현재 프로젝트 안에 저장됩니다.",
        "width": 560,
        "height": 265
      }
    },
    {
      "id": "manual-run",
      "name": "Manual run",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "parameters": {}
    },
    {
      "id": "weekly-schedule",
      "name": "Weekly schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        0,
        220
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "weeksInterval": 1,
              "triggerAtDay": [
                1
              ],
              "triggerAtHour": 9,
              "triggerAtMinute": 0
            }
          ]
        }
      },
      "disabled": true
    },
    {
      "id": "create-reading-queue",
      "name": "Create reading queue",
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1.1,
      "position": [
        250,
        0
      ],
      "parameters": {
        "resource": "table",
        "operation": "create",
        "tableName": "afr-literature-practice",
        "columns": {
          "column": [
            {
              "name": "title",
              "type": "string"
            },
            {
              "name": "url",
              "type": "string"
            }
          ]
        },
        "options": {
          "createIfNotExists": true
        }
      }
    },
    {
      "id": "rss-read",
      "name": "RSS Read",
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        500,
        0
      ],
      "parameters": {
        "url": "https://airesearch.studio/downloads/research-automation/literature-sample.xml",
        "options": {}
      },
      "retryOnFail": true,
      "maxTries": 2,
      "waitBetweenTries": 1000,
      "onError": "stopWorkflow"
    },
    {
      "id": "has-source-url",
      "name": "Has source URL",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        750,
        0
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "source-required",
              "leftValue": "={{ $json.link }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      }
    },
    {
      "id": "invalid-record",
      "name": "Invalid record",
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        1000,
        220
      ],
      "parameters": {
        "errorMessage": "RSS 항목에 출처 주소가 없습니다. 자료원을 확인하십시오."
      }
    },
    {
      "id": "reading-fields",
      "name": "Reading fields",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1000,
        0
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "title",
              "name": "title",
              "value": "={{ $json.title }}",
              "type": "string"
            },
            {
              "id": "url",
              "name": "url",
              "value": "={{ $json.link }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "remove-duplicate-input",
      "name": "Remove duplicate input",
      "type": "n8n-nodes-base.removeDuplicates",
      "typeVersion": 2,
      "position": [
        1250,
        0
      ],
      "parameters": {
        "operation": "removeDuplicateInputItems",
        "compare": "selectedFields",
        "fieldsToCompare": "url",
        "options": {}
      }
    },
    {
      "id": "save-reading-queue",
      "name": "Save reading queue",
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1.1,
      "position": [
        1500,
        0
      ],
      "parameters": {
        "resource": "row",
        "operation": "upsert",
        "dataTableId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Create reading queue').first().json.id }}"
        },
        "matchType": "allConditions",
        "filters": {
          "conditions": [
            {
              "keyName": "url",
              "condition": "eq",
              "keyValue": "={{ $json.url }}"
            }
          ]
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {},
          "matchingColumns": [],
          "schema": []
        },
        "options": {}
      }
    }
  ],
  "connections": {
    "Manual run": {
      "main": [
        [
          {
            "node": "Create reading queue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly schedule": {
      "main": [
        [
          {
            "node": "Create reading queue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create reading queue": {
      "main": [
        [
          {
            "node": "RSS Read",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Read": {
      "main": [
        [
          {
            "node": "Has source URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reading fields": {
      "main": [
        [
          {
            "node": "Remove duplicate input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove duplicate input": {
      "main": [
        [
          {
            "node": "Save reading queue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has source URL": {
      "main": [
        [
          {
            "node": "Reading fields",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Invalid record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "timezone": "Asia/Seoul",
    "saveDataSuccessExecution": "all",
    "saveDataErrorExecution": "all"
  },
  "pinData": {
    "RSS Read": [
      {
        "json": {
          "title": "Structure, function and diversity of the healthy human microbiome",
          "link": "https://pubmed.ncbi.nlm.nih.gov/22699609/"
        }
      },
      {
        "json": {
          "title": "A metagenome-wide association study of gut microbiota in type 2 diabetes",
          "link": "https://pubmed.ncbi.nlm.nih.gov/23023125/"
        }
      },
      {
        "json": {
          "title": "Gut metagenome in European women with normal, impaired and diabetic glucose control",
          "link": "https://pubmed.ncbi.nlm.nih.gov/23719380/"
        }
      },
      {
        "json": {
          "title": "Disentangling type 2 diabetes and metformin treatment signatures in the human gut microbiota",
          "link": "https://pubmed.ncbi.nlm.nih.gov/26633628/"
        }
      },
      {
        "json": {
          "title": "Multi-omics of the gut microbial ecosystem in inflammatory bowel diseases",
          "link": "https://pubmed.ncbi.nlm.nih.gov/31142855/"
        }
      },
      {
        "json": {
          "title": "A metagenome-wide association study of gut microbiota in type 2 diabetes",
          "link": "https://pubmed.ncbi.nlm.nih.gov/23023125/"
        }
      }
    ]
  },
  "tags": []
}
