8
n8n 한국어amn8n.com

페이스북 댓글 검토기

고급

이것은AI Chatbot, Multimodal AI분야의자동화 워크플로우로, 23개의 노드를 포함합니다.주로 If, Code, Merge, Notion, HttpRequest 등의 노드를 사용하며. Notion과 Gemini의 Facebook 댓글 AI 검토기를 사용합니다.

사전 요구사항
  • Notion API Key
  • 대상 API의 인증 정보가 필요할 수 있음
  • Facebook Graph API 인증 정보
  • Google Gemini API Key
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "id": "oWTmtu5Euv0y5n13",
  "meta": {
    "instanceId": "7f1a0694161455be3a7e71f1e0dea04908b0376a1a81e3a0c1e5ac879d48f83a"
  },
  "name": "Facebook Comments Moderator",
  "tags": [],
  "nodes": [
    {
      "id": "01df470c-f637-4065-af99-291dc56f4796",
      "name": "AI 에이전트",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1312,
        224
      ],
      "parameters": {
        "text": "=You are a helpful, friendly, and empathetic customer support agent for [COMPANY_NAME], a [COMPANY_TYPE] company in [COUNTRY].  \n\nYour job is to read the customer's comment and reply in [TARGET_LANGUAGE] in a natural, unisex, and humanized way that feels warm and personal.  \n\nGuidelines for your replies:\n- Always reply as if you are a [NATIONALITY] person talking naturally.  \n- Keep the tone friendly, respectful, and caring.  \n- Use short, conversational sentences (don't sound like a machine).  \n- Mention [COMPANY_NAME] naturally when relevant.  \n- Always write in a *unisex style*.  \n- Match the *tone of the customer's comment*.  \n- Never use [FORBIDDEN_EXPRESSIONS]. Always use [PREFERRED_EXPRESSIONS] instead. \n- The word \"[SPECIFIC_FORBIDDEN_WORD]\" is strictly forbidden. Never use it in replies. Always use \"[PREFERRED_ALTERNATIVE]\" or another [TARGET_LANGUAGE] greeting instead.\n\n Whenever the customer asks about products, prices, or descriptions, use the Knowledge Base \"\" {{ $('KB Arrange').item.json.knowledgeContext }}\"\" to look up the correct information **before replying**.  \n If the Knowledge Base does not contain the answer, reply politely and naturally without inventing details.  \n\nHere is the customer's comment:  \n\"\"{{ \n  $('Last Post Fetcher').first().json.data\n    .sort((a, b) => new Date(b.created_time) - new Date(a.created_time))[0].message || \"\"\n}}\n\"\"  \n\nNow generate a reply in [TARGET_LANGUAGE] only.\n",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2.1
    },
    {
      "id": "6c83bfa2-e7b6-4846-97c5-c21f62a6f56e",
      "name": "AI 채팅 모델",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1232,
        464
      ],
      "parameters": {
        "options": {
          "temperature": 0.2
        },
        "modelName": "[AI_MODEL_NAME]"
      },
      "typeVersion": 1
    },
    {
      "id": "189eb862-ad36-4ea4-992e-e5111a0767f3",
      "name": "스케줄 트리거",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -656,
        224
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "seconds",
              "secondsInterval": 10
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "27f33e5c-06ac-44f0-a6e0-44c6f376ba82",
      "name": "병합",
      "type": "n8n-nodes-base.merge",
      "position": [
        336,
        224
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "7a18fcb5-df50-46f6-a8aa-de653b070786",
      "name": "지식 베이스",
      "type": "n8n-nodes-base.notion",
      "position": [
        80,
        368
      ],
      "parameters": {
        "options": {},
        "resource": "databasePage",
        "operation": "getAll",
        "returnAll": true,
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "[KNOWLEDGE_BASE_DATABASE_ID]",
          "cachedResultUrl": "[KNOWLEDGE_BASE_URL]",
          "cachedResultName": "Knowledge Base"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "829dd83a-58f8-44cd-a961-a1a0e2bd5c6e",
      "name": "최신 게시물 가져오기",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -240,
        224
      ],
      "parameters": {
        "url": "=https://graph.facebook.com/v21.0/{{$json[\"data\"][0].id}}/comments?access_token=[FACEBOOK_ACCESS_TOKEN]",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "facebookGraphApi"
      },
      "typeVersion": 4.2
    },
    {
      "id": "eb84d700-a32e-43a3-b4a9-781274635bab",
      "name": "댓글ID 확인기",
      "type": "n8n-nodes-base.notion",
      "position": [
        80,
        96
      ],
      "parameters": {
        "filters": {
          "conditions": [
            {
              "key": "Comment ID|rich_text",
              "condition": "equals",
              "richTextValue": "={{    $('Last Post Fetcher').first().json.data     .sort((a, b) => new Date(b.created_time) - new Date(a.created_time))[0].id  }}"
            }
          ]
        },
        "options": {},
        "resource": "databasePage",
        "operation": "getAll",
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "[PROCESSED_COMMENTS_DATABASE_ID]",
          "cachedResultUrl": "[PROCESSED_COMMENTS_DATABASE_URL]",
          "cachedResultName": "Processed Facebook Comments"
        },
        "filterType": "manual"
      },
      "typeVersion": 2.2,
      "alwaysOutputData": true
    },
    {
      "id": "b81bc886-a42c-4c7d-9e99-844340dc205d",
      "name": "KB 정리",
      "type": "n8n-nodes-base.code",
      "position": [
        544,
        224
      ],
      "parameters": {
        "jsCode": "// Get the Knowledge Base data from the Notion node\nconst kbPages = $input.all().map(item => item.json);\n\n// Helper function to extract text from Notion properties\nfunction extractText(property) {\n  if (!property) return '';\n  \n  // Handle rich_text properties\n  if (property.rich_text && property.rich_text.length > 0) {\n    return property.rich_text[0].plain_text || '';\n  }\n  \n  // Handle title properties\n  if (property.title && property.title.length > 0) {\n    return property.title[0].plain_text || '';\n  }\n  \n  // Handle select properties\n  if (property.select) {\n    return property.select.name || '';\n  }\n  \n  // Handle number properties\n  if (property.number) {\n    return property.number.toString();\n  }\n  \n  return '';\n}\n\n// Create a linear array of knowledge base entries\nconst knowledgeArray = kbPages.map(page => {\n  const properties = page.properties || {};\n  \n  // Extract information based on your actual Notion properties\n  const productName = page.property_products || '';\n  const price = page.property_prices || '';\n  const description = page.property_description || '';\n  const name = page.name || '';\n  \n  // Create a formatted knowledge entry\n  const knowledgeEntry = {\n    name: name,\n    product: productName,\n    price: price,\n    description: description,\n    // Create a searchable text string\n    searchableText: [name, productName, price, description]\n      .filter(Boolean)\n      .join(' | ')\n  };\n  \n  return knowledgeEntry;\n}).filter(entry => entry.name || entry.product); // Only include entries with names or products\n\n// Create a simple string array for easy searching\nconst knowledgeStrings = knowledgeArray.map(entry => \n  `NAME: ${entry.name || 'N/A'}` +\n  (entry.product ? ` | PRODUCT: ${entry.product}` : '') +\n  (entry.price ? ` | PRICE: ${entry.price}` : '') +\n  (entry.description ? ` | DESCRIPTION: ${entry.description}` : '')\n);\n\n// Output the processed data\nreturn [{\n  json: {\n    // Original data passthrough\n    ...($input.first()?.json || {}),\n    \n    // Structured knowledge base data\n    knowledgeBase: {\n      entries: knowledgeArray,\n      searchableStrings: knowledgeStrings,\n      totalProducts: knowledgeArray.length\n    },\n    \n    // Simple concatenated string for memory context\n    knowledgeContext: knowledgeStrings.join('\\n\\n'),\n    \n    // Alternative: Create a more concise version for memory\n    compactKnowledge: knowledgeArray.map(entry => \n      `${entry.name || entry.product}: ${entry.description || 'No description'} (${entry.price || 'Price not available'})`\n    ).join('\\n')\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "91e25c71-a594-4bdc-a33c-c66857b62751",
      "name": "새 댓글 조건 판단",
      "type": "n8n-nodes-base.if",
      "position": [
        784,
        224
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "e566ada9-1a12-41b8-aa9a-55bb7e14a10c",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.property_comment_id }}",
              "rightValue": ""
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "83aa9b95-6671-4813-90e8-3820202324e6",
      "name": "최신 댓글",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        1024,
        240
      ],
      "parameters": {
        "edge": "comments",
        "node": "={{ \n  $('Last Post Fetcher').first().json.data\n    .sort((a, b) => new Date(b.created_time) - new Date(a.created_time))[0].id \n}}",
        "options": {},
        "graphApiVersion": "v23.0"
      },
      "typeVersion": 1
    },
    {
      "id": "c0420da3-170b-4741-a71d-69998b34b13b",
      "name": "답글 작성기",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        1712,
        224
      ],
      "parameters": {
        "edge": "comments",
        "node": "={{ \n  $('Last Post Fetcher').first().json.data\n    .sort((a, b) => new Date(b.created_time) - new Date(a.created_time))[0].id \n}}",
        "options": {
          "queryParameters": {
            "parameter": [
              {
                "name": "message",
                "value": "={{ $('AI Agent').first().json.output }}"
              }
            ]
          }
        },
        "graphApiVersion": "v23.0",
        "httpRequestMethod": "POST"
      },
      "typeVersion": 1
    },
    {
      "id": "15eb2020-9963-4ae8-adf4-445d5506ae07",
      "name": "댓글ID DB 저장",
      "type": "n8n-nodes-base.notion",
      "position": [
        1968,
        224
      ],
      "parameters": {
        "options": {},
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "[PROCESSED_COMMENTS_DATABASE_ID]",
          "cachedResultUrl": "[PROCESSED_COMMENTS_DATABASE_URL]",
          "cachedResultName": "Processed Facebook Comments"
        },
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Comment ID|rich_text",
              "textContent": "={{    $('Last Post Fetcher').first().json.data     .sort((a, b) => new Date(b.created_time) - new Date(a.created_time))[0].id  }}"
            },
            {
              "key": "Response Status|status",
              "statusValue": "Done"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "1cbe6d39-f106-4320-b9a0-7520e7ea4a17",
      "name": "메모지",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -512,
        128
      ],
      "parameters": {
        "color": 4,
        "width": 214,
        "content": "Initiates the workflow by retrieving all posts from the specified Facebook Page via the Graph API."
      },
      "typeVersion": 1
    },
    {
      "id": "db015463-5489-4b59-aca8-8f648a6dc40e",
      "name": "메모지1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        128
      ],
      "parameters": {
        "color": 5,
        "width": 176,
        "content": "Processes the list of posts to isolate the most recently published one."
      },
      "typeVersion": 1
    },
    {
      "id": "a3a44851-6263-47b0-bd4e-e1e931cd9033",
      "name": "메모지2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "color": 4,
        "width": 256,
        "content": "Queries a database to verify if the latest comment's unique ID has already been processed, preventing duplicate replies."
      },
      "typeVersion": 1
    },
    {
      "id": "8d5f94d9-f8d1-44d5-baba-683c8d2d625e",
      "name": "메모지3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        288
      ],
      "parameters": {
        "color": 5,
        "width": 230,
        "height": 192,
        "content": "Fetches the complete, up-to-date product information and knowledge base from the connected Notion database."
      },
      "typeVersion": 1
    },
    {
      "id": "a7c140a5-42cb-4709-a761-077ea5aacf4c",
      "name": "메모지4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        144
      ],
      "parameters": {
        "color": 5,
        "content": "Transforms the raw knowledge base data into a structured and easily searchable format for the AI model."
      },
      "typeVersion": 1
    },
    {
      "id": "2c1e6e91-6bf3-4b11-bc89-da414ee8709c",
      "name": "메모지5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        128
      ],
      "parameters": {
        "color": 4,
        "width": 224,
        "height": 192,
        "content": " A conditional gate; it only allows the workflow to proceed if the comment is new"
      },
      "typeVersion": 1
    },
    {
      "id": "2eee31fa-d437-4c18-9328-1f447b447d9a",
      "name": "메모지6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        144
      ],
      "parameters": {
        "color": 5,
        "width": 208,
        "content": "Extracts the full content and metadata of the most recent comment from the latest post."
      },
      "typeVersion": 1
    },
    {
      "id": "8ce9e8cb-b20f-4efa-97b2-eba6e3c47ede",
      "name": "메모지7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        112
      ],
      "parameters": {
        "color": 6,
        "width": 288,
        "height": 208,
        "content": "The core processing unit. It analyzes the customer's comment, consults the knowledge base for factual responses, and generates a personalized, empathetic reply in the target language."
      },
      "typeVersion": 1
    },
    {
      "id": "101a2030-dbd0-44af-8116-9bd1bf1a874d",
      "name": "메모지8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1616,
        144
      ],
      "parameters": {
        "color": 4,
        "content": "Takes the AI-generated response and posts it as a reply to the customer's comment on Facebook."
      },
      "typeVersion": 1
    },
    {
      "id": "5104091f-7597-4413-a5b6-28da90821b66",
      "name": "메모지9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1888,
        128
      ],
      "parameters": {
        "color": 5,
        "width": 272,
        "height": 208,
        "content": " Logs the ID of the newly processed comment into the database to mark it as complete and prevent reprocessing in the future."
      },
      "typeVersion": 1
    },
    {
      "id": "c2a5a6cb-79a4-4c7b-9475-4681b45bd3d3",
      "name": "게시물 가져오기",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -432,
        224
      ],
      "parameters": {
        "url": "=https://graph.facebook.com/v21.0/[FACEBOOK_PAGE_ID]/posts?access_token=[FACEBOOK_ACCESS_TOKEN]\n",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "facebookGraphApi"
      },
      "credentials": {
        "facebookGraphApi": {
          "id": "C41mPQIciSciFLKJ",
          "name": "Facebook Graph account"
        }
      },
      "typeVersion": 4.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "0e48350f-f5ab-4cdd-83e8-5b4b16974fdd",
  "connections": {
    "27f33e5c-06ac-44f0-a6e0-44c6f376ba82": {
      "main": [
        [
          {
            "node": "b81bc886-a42c-4c7d-9e99-844340dc205d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "01df470c-f637-4065-af99-291dc56f4796": {
      "main": [
        [
          {
            "node": "c0420da3-170b-4741-a71d-69998b34b13b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b81bc886-a42c-4c7d-9e99-844340dc205d": {
      "main": [
        [
          {
            "node": "91e25c71-a594-4bdc-a33c-c66857b62751",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c0420da3-170b-4741-a71d-69998b34b13b": {
      "main": [
        [
          {
            "node": "15eb2020-9963-4ae8-adf4-445d5506ae07",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6c83bfa2-e7b6-4846-97c5-c21f62a6f56e": {
      "ai_languageModel": [
        [
          {
            "node": "01df470c-f637-4065-af99-291dc56f4796",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "c2a5a6cb-79a4-4c7b-9475-4681b45bd3d3": {
      "main": [
        [
          {
            "node": "829dd83a-58f8-44cd-a961-a1a0e2bd5c6e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7a18fcb5-df50-46f6-a8aa-de653b070786": {
      "main": [
        [
          {
            "node": "27f33e5c-06ac-44f0-a6e0-44c6f376ba82",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "83aa9b95-6671-4813-90e8-3820202324e6": {
      "main": [
        [
          {
            "node": "01df470c-f637-4065-af99-291dc56f4796",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "189eb862-ad36-4ea4-992e-e5111a0767f3": {
      "main": [
        [
          {
            "node": "c2a5a6cb-79a4-4c7b-9475-4681b45bd3d3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "eb84d700-a32e-43a3-b4a9-781274635bab": {
      "main": [
        [
          {
            "node": "27f33e5c-06ac-44f0-a6e0-44c6f376ba82",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "829dd83a-58f8-44cd-a961-a1a0e2bd5c6e": {
      "main": [
        [
          {
            "node": "eb84d700-a32e-43a3-b4a9-781274635bab",
            "type": "main",
            "index": 0
          },
          {
            "node": "7a18fcb5-df50-46f6-a8aa-de653b070786",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "91e25c71-a594-4bdc-a33c-c66857b62751": {
      "main": [
        [],
        [
          {
            "node": "83aa9b95-6671-4813-90e8-3820202324e6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

이 워크플로우를 어떻게 사용하나요?

위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.

이 워크플로우는 어떤 시나리오에 적합한가요?

고급 - AI 챗봇, 멀티모달 AI

유료인가요?

이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.

워크플로우 정보
난이도
고급
노드 수23
카테고리2
노드 유형10
난이도 설명

고급 사용자를 위한 16+개 노드의 복잡한 워크플로우

저자
Abdullah Alshiekh

Abdullah Alshiekh

@abdullah01

🚀 Automation pro building AI-powered workflows with n8n. 💼 Special focus on real use cases 🔧 Love clean, flexible, and business-ready automations.

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34