{
  "name": "Thumnail_workflow",
  "nodes": [
    {
      "parameters": {
        "operation": "copy",
        "fileId": {
          "__rl": true,
          "value": "1KLWUbd9gai_srZdJRqoYuF1NA7Fc3y7TOlL-uXoIa8Y",
          "mode": "id"
        },
        "name": "={{ $('Google Sheets Trigger1').item.json.category }}_{{ $('Google Sheets Trigger1').item.json.title }}",
        "sameFolder": false,
        "driveId": {
          "__rl": true,
          "value": "=My Drive",
          "mode": "id"
        },
        "folderId": {
          "__rl": true,
          "value": "1EJ-2kNnwBoqEpw6JaDnYG6N76yiQoCSG",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        1000,
        -160
      ],
      "id": "7276c40f-9fab-45f3-9a28-fe8c8bb11ea5",
      "name": "Google Drive",
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $('Google Sheets Trigger1').item.json.category }}",
                    "rightValue": "\ud000\ud2b8",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "\ud000\ud2b8"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "778c8235-192f-4450-a251-8bde7c8773a8",
                    "leftValue": "={{ $('Google Sheets Trigger1').item.json.category }}",
                    "rightValue": "LLM",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "LLM"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "20a2902b-836c-48e9-8ad8-6088b55a3e99",
                    "leftValue": "={{ $('Google Sheets Trigger1').item.json.category }}",
                    "rightValue": "AIE",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "AIE"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "f95fec4f-027d-46f3-8857-7b007c3ea7e7",
                    "leftValue": "={{ $('Google Sheets Trigger1').item.json.category }}",
                    "rightValue": "\ubc11\ubc14\ub2e5",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "\ubc11\ubc14\ub2e5"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "45572466-161e-4587-91a6-559cd18e22b5",
                    "leftValue": "={{ $('Google Sheets Trigger1').item.json.category }}",
                    "rightValue": "=\uc790\uc720\uc8fc\uc81c",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "\uc790\uc720\uc8fc\uc81c"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        660,
        -200
      ],
      "id": "e231caa2-c190-4dba-a681-8004fce01b26",
      "name": "Switch"
    },
    {
      "parameters": {
        "operation": "replaceText",
        "presentationId": "={{ $json.id }}",
        "textUi": {
          "textValues": [
            {
              "matchCase": true,
              "pageObjectIds": "={{ $json.pageNumber }}",
              "replaceText": "={{ $json.title }}",
              "text": "{Title}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSlides",
      "typeVersion": 2,
      "position": [
        1380,
        -160
      ],
      "id": "07801b86-bcfa-4d99-9ecc-0f3438f77674",
      "name": "Google Slides",
      "credentials": {
        "googleSlidesOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "2a551748-926f-411d-9e5c-b948ca1733b3",
              "leftValue": "={{ $('Google Sheets Trigger1').item.json.category }}",
              "rightValue": "={{ $('Google Sheets Trigger1').item.json.category }}",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        840,
        -160
      ],
      "id": "7a2bc9a2-6484-461f-9436-1db473322561",
      "name": "Filter"
    },
    {
      "parameters": {
        "resource": "page",
        "operation": "getThumbnail",
        "presentationId": "={{ $json.presentationId }}",
        "pageObjectId": "={{ $('Code').item.json.pageNumber }}",
        "download": true
      },
      "type": "n8n-nodes-base.googleSlides",
      "typeVersion": 2,
      "position": [
        1540,
        -160
      ],
      "id": "cab2ada0-396b-4de2-aaff-73dcd73607cb",
      "name": "MakingThumnail",
      "credentials": {
        "googleSlidesOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "name": "={{ $('Google Drive').item.json.name}}.png",
        "driveId": {
          "__rl": true,
          "value": "My Drive",
          "mode": "list",
          "cachedResultName": "My Drive",
          "cachedResultUrl": "https://drive.google.com/drive/my-drive"
        },
        "folderId": {
          "__rl": true,
          "value": "1VDOtYsZTTpd3uIWs8Ou_bA7UutOD4sTR",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        1680,
        -160
      ],
      "id": "c7c8d28b-a2e3-4975-9214-acd02fd0b7ad",
      "name": "upload",
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "deleteFile",
        "fileId": {
          "__rl": true,
          "value": "={{ $('Google Drive').item.json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        1820,
        -160
      ],
      "id": "d87d33a7-3ff9-46b0-8c28-8d4cf5883717",
      "name": "Delete",
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all();\n\n// \uac01 \ud56d\ubaa9\uc5d0 \ub300\ud574 \ucc98\ub9ac\nconst result = items.map(item => {\n    // \uc870\uac74\uc5d0 \ub530\ub77c pageNumber \uc124\uc815\n    if (item.json.condition === \"\ud000\ud2b8\") {\n        item.json.pageNumber = \"p\";\n    } else if (item.json.condition === \"LLM\") {\n        item.json.pageNumber = \"g331d0aedabf_0_0\";\n    } else if (item.json.condition === \"AIE\") {\n        item.json.pageNumber = \"g331d0aedabf_0_5\";\n    } else if (item.json.condition === \"\ubc11\ubc14\ub2e5\") {\n        item.json.pageNumber = \"g331d0aedabf_0_22\";\n    } else if (item.json.condition === \"\uc790\uc720\uc8fc\uc81c\") {\n        item.json.pageNumber = \"g331d0aedabf_0_15\";\n    } else {\n        item.json.pageNumber = null; // \uae30\ubcf8\uac12 \uc124\uc815\n    }\n\n    // \ucc98\ub9ac\ub41c \ud56d\ubaa9 \ubc18\ud658\n    return item;\n});\n\n// \uacb0\uacfc \ubc18\ud658\nreturn result;\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1260,
        -160
      ],
      "id": "7c094600-879f-42ca-953a-bee666a96cd4",
      "name": "Code"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "b90e1e83-c447-4179-9ebd-4dc20aef0fe0",
              "name": "id",
              "value": "={{ $json.id }}",
              "type": "string"
            },
            {
              "id": "d6709796-a243-4cac-8a6b-24545ef72023",
              "name": "=condition",
              "value": "={{ $('Google Sheets Trigger1').item.json.category }}",
              "type": "string"
            },
            {
              "id": "917fbd46-a489-4341-9f94-f1984c4779c6",
              "name": "title",
              "value": "={{ $('Google Sheets Trigger1').item.json.title }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1140,
        -160
      ],
      "id": "74d3d5ec-055d-479a-aea9-09bab2c9051d",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyHour"
            }
          ]
        },
        "documentId": {
          "__rl": true,
          "value": "15GPXB6elr1Q5YcZ2c-rCqQMmtIkB5tlxuEnttPE17JI",
          "mode": "list",
          "cachedResultName": "contents",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/15GPXB6elr1Q5YcZ2c-rCqQMmtIkB5tlxuEnttPE17JI/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "schedule",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/15GPXB6elr1Q5YcZ2c-rCqQMmtIkB5tlxuEnttPE17JI/edit#gid=0"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "typeVersion": 1,
      "position": [
        40,
        -160
      ],
      "id": "59cfb75b-5a73-4c50-9d42-c1a6765d88b4",
      "name": "Google Sheets Trigger1",
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentURL": "1f5WTrxvGaCA3T3P_j50PdSXc3UfHeLFrxf5_tXf4TSE",
        "actionsUi": {
          "actionFields": [
            {
              "action": "insert",
              "text": "=\n\n---\n{{ $('Google Sheets Trigger1').item.json.textbook }}-{{ $('Google Sheets Trigger1').item.json.title }}\n\nAI\uc640 Data\ub97c \uc5f0\uad6c\ud558\ub294, Study Club \uc785\ub2c8\ub2e4.\n\n- \uad50\uc7ac: {{ $('Google Sheets Trigger1').item.json.textbook }}\n        {{ $('Google Sheets Trigger1').item.json.title }}\n- \uc77c\uc790 : {{ $('Google Sheets Trigger1').item.json.date }}\n- \ubc1c\ud45c\uc790 :{{ $('Google Sheets Trigger1').item.json.lecturer }}\n- \uc2a4\ud130\ub514 \ucc38\uac00 \ud76c\ub9dd \uc694\uccad : [\uc774\uba54\uc77c](restful3@gmail.com)\n- \uad00\ub828\ucf54\ub4dc : {{ $('Google Sheets Trigger1').item.json.code }}\n\n{{ $json.output.hashtags[0] }}{{ $json.output.hashtags[1] }}{{ $json.output.hashtags[2] }}{{ $json.output.hashtags[3] }}{{ $json.output.hashtags[4] }}\n\n---"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.googleDocs",
      "typeVersion": 2,
      "position": [
        500,
        -160
      ],
      "id": "51707bff-ad0a-4a82-8fb9-f517885f21ed",
      "name": "Google Docs",
      "credentials": {
        "googleDocsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "## \uc720\ud29c\ube0c \ubcf8\ubb38 \ubc0f \uc378\ub124\uc77c \uc5c5\ub370\uc774\ud2b8\n- \uc2a4\ud130\ub514\ub97c \uc9c4\ud589\ud558\uba70, \uc378\ub124\uc77c \ubc0f \ubcf8\ubb38\uc744 \uc790\ub3d9\ud654\ud558\uae30 \uc704\ud55c \ud50c\ub85c\uc6b0 \uc785\ub2c8\ub2e4.\n- \uad6c\uae00\uc2dc\ud2b8\uac00 \uc5c5\ub370\uc774\ud2b8 \ub418\uba74 \n- \uad6c\uae00\ub2e4\ud050\uba3c\ud2b8\uc5d0\ub294 \ubcf8\ubb38\uc774 \uc2dc\ud2b8\ub97c \ucc38\uace0\ud558\uc5ec \uc5c5\ub370\uc774\ud2b8 \ub429\ub2c8\ub2e4.\n- \uc2dc\ud2b8\uc758 \ub0b4\uc6a9\uc5d0 \ub9de\ucdb0\uc11c \ubbf8\ub9ac \uc900\ube44\ub41c \uad6c\uae00\uc2ac\ub77c\uc774\ub4dc\uc5d0\uc11c \uc378\ub124\uc77c\uc744 \uc5c5\ub370\uc774\ud2b8\ud558\uc5ec \uc0dd\uc131\ud569\ub2c8\ub2e4.",
        "height": 540,
        "width": 1980
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        -460
      ],
      "typeVersion": 1,
      "id": "0b1fab00-63a5-443e-80d1-d8b9985ab2a9",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## \ubcf8\ubb38\uc5c5\ub370\uc774\ud2b8\n- GPT\ub85c \ud574\uc2dc\ud14c\uadf8\ub97c \ubd99\uc5ec\uc90d\ub2c8\ub2e4.",
        "height": 340,
        "width": 460,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -280
      ],
      "typeVersion": 1,
      "id": "08e4b5df-8050-45dd-a470-d240fd471d07",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## \uc8fc\uc81c\uc5d0 \ub530\ub77c \uc378\ub124\uc77c\uc744 \ub77c\uc6b0\ud305\n- \ub77c\uc6b0\ud305 \ud6c4 \ud544\ud130\ub9c1\ud558\uc5ec \uac01 \uc8fc\uc81c\ubcc4\ub85c \uc791\uc5c5\uc744 \ub3c4\uc640\uc90d\ub2c8\ub2e4.",
        "height": 340,
        "width": 480,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -280
      ],
      "typeVersion": 1,
      "id": "dc737ebf-cc06-4a6e-b2bd-e425df3cd8c7",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "## \uac01 \ud398\uc774\uc9c0\ub97c \ucc3e\uc544\uc11c \ub0b4\uc6a9\uc744 \uc5c5\ub370\uc774\ud2b8",
        "height": 340,
        "width": 520,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        980,
        -280
      ],
      "typeVersion": 1,
      "id": "a9f2dc5e-f898-4a2f-a3ae-9c6e0700e9dc",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "## \uc378\ub124\uc77c \uc800\uc7a5 \ub9c8\ubb34\ub9ac \ud6c4 \uc2ac\ub77c\uc774\ub4dc \uc0ad\uc81c",
        "height": 340,
        "width": 420,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        -280
      ],
      "typeVersion": 1,
      "id": "9dcf4b97-44d5-4071-bc86-13b4c26a9584",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "text": "=You are a professional YouTube creator and a competent marketer. Please create 5 hashtags that can increase SEO with the corresponding {{ $json.category }}, {{ $json.textbook }} and {{ $json.title }}. make hashtag in korean",
        "schemaType": "fromJson",
        "jsonSchemaExample": "{\n\t\"category\": \"California\",\n\t\"hashtags\": [\"Los Angeles\", \"San Francisco\", \"San Diego\"]\n}",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "typeVersion": 1,
      "position": [
        180,
        -160
      ],
      "id": "5d38e6c6-5db4-43fe-a44c-ec6f691938cf",
      "name": "Information Extractor"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        160,
        -20
      ],
      "id": "40520b40-4ec7-481b-afc1-cbf490efd1aa",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Google Drive": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Slides": {
      "main": [
        [
          {
            "node": "MakingThumnail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MakingThumnail": {
      "main": [
        [
          {
            "node": "upload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "upload": {
      "main": [
        [
          {
            "node": "Delete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete": {
      "main": [
        []
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Google Slides",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger1": {
      "main": [
        [
          {
            "node": "Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Docs": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Information Extractor": {
      "main": [
        [
          {
            "node": "Google Docs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "d0227432-472f-43fe-9b54-06f7544bffd1",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "zEzvgDpT3F0cIo72",
  "tags": []
}