n8n 템플릿 사용하기

n8n 템플릿 사용하기

새 워크플로우를 만들 때 빈 워크플로우로 시작할지, 기존 템플릿을 쓸지 선택할 수 있어요. 템플릿이 주는 가치는 이렇습니다:

  • 시작을 돕는 것: n8n에 이미 내가 원하는 일을 하는 템플릿이 있을 수 있어요.
  • 무엇을 만들 수 있는지의 예시: 직접 만들 수 있는 것들의 예를 보여주죠.
  • 나만의 워크플로우를 만들기 위한 모범 사례: 어떻게 설계하는 게 좋은지 안내해 줍니다.

출처: n8n — Use templates (공식 문서)

템플릿 접근하기

Templates 아이콘을 선택하면 템플릿 라이브러리를 볼 수 있어요.

n8n의 템플릿 라이브러리를 쓰면 n8n 웹사이트의 Workflows 브라우징으로 이동합니다. 조직이 제공하는 커스텀 라이브러리를 쓴다면 앱 안에서 템플릿을 검색·탐색할 수 있습니다.

워크플로우를 n8n 라이브러리에 추가하기

워크플로우를 n8n의 템플릿 라이브러리에 제출할 수 있어요.

n8n은 크리에이터 프로그램과 템플릿 마켓플레이스를 개발 중입니다. 진행 중인 프로젝트라 세부 내용은 바뀔 수 있어요. 템플릿 제출 방법과 크리에이터가 되는 방법은 n8n Creator hub를 참고하세요.

셀프호스팅 n8n: 자체 라이브러리 사용하기

환경 변수 N8N_TEMPLATES_HOST에 본인 API의 베이스 URL을 설정하세요.

엔드포인트 (Endpoints)

API는 n8n과 같은 엔드포인트와 데이터 구조를 제공해야 해요.

엔드포인트는 다음과 같습니다:

Method Path Purpose
GET /templates/workflows/<id> Fetch template metadata for preview/browsing
GET /workflows/templates/<id> Fetch workflow data to import onto canvas
GET /templates/search Search for workflow templates
GET /templates/collections/<id> Get a specific template collection
GET /templates/collections List all template collections
GET /templates/categories List all template categories
GET /health Health check endpoint

중요: 두 개의 서로 다른 응답 형식이 필요합니다

두 워크플로우 엔드포인트는 서로 다른 응답 형식을 요구해요:

  • /templates/workflows/{id}: 템플릿 자체를 반환하며, 워크플로우는 workflow 키에 포함됩니다.
  • /workflows/templates/{id}: 템플릿이 담고 있는 워크플로우를 반환해요.

자세한 내용은 아래 Schemas를 참고하세요.

쿼리 파라미터 (Query parameters)

/templates/search 엔드포인트는 다음 쿼리 파라미터를 받습니다:

Parameter Type Description
page integer The page of results to return
rows integer The maximum number of results to return per page
category comma-separated list of strings (categories) The categories to search within
search string The search query

/templates/collections 엔드포인트는 다음 쿼리 파라미터를 받습니다:

Parameter Type Description
category comma-separated list of strings (categories) The categories to search within
search string The search query

스키마 (Schemas)

두 워크플로우 엔드포인트의 핵심 차이:

// GET /templates/workflows/{id} returns (wrapped):
{
  "workflow": {
    "id": 123,
    "name": "...",
    "totalViews": 1000,
    // ... see full workflow item schema below
    "workflow": {    // actual workflow definition
      "nodes": [...],
      "connections": {}
    }
  }
}

// GET /workflows/templates/{id} returns (flat):
{
  "id": 123,
  "name": "...",
  "workflow": {      // actual workflow definition
    "nodes": [...],
    "connections": {}
  }
}

응답 객체의 상세 스키마:

Show workflow item data schema

/templates/workflows/{id} 엔드포인트가 사용합니다 (workflow 키로 감싸져 있음).

이 스키마는 검색/브라우징 UI에서 템플릿을 표시할 때 쓰는 템플릿 메타데이터를 설명합니다. 실제 가져올 수 있는 워크플로우 정의를 담은 중첩 workflow 프로퍼티를 포함해요.

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Generated schema for Root",
  "type": "object",
  "properties": {
    "id": { "type": "number" },
    "name": { "type": "string" },
    "totalViews": { "type": "number" },
    "price": {},
    "purchaseUrl": {},
    "recentViews": { "type": "number" },
    "createdAt": { "type": "string" },
    "user": {
      "type": "object",
      "properties": {
        "username": { "type": "string" },
        "verified": { "type": "boolean" }
      },
      "required": ["username", "verified"]
    },
    "nodes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "icon": { "type": "string" },
          "name": { "type": "string" },
          "codex": {
            "type": "object",
            "properties": {
              "data": {
                "type": "object",
                "properties": {
                  "details": { "type": "string" },
                  "resources": {
                    "type": "object",
                    "properties": {
                      "generic": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "url": { "type": "string" },
                            "icon": { "type": "string" },
                            "label": { "type": "string" }
                          },
                          "required": ["url", "label"]
                        }
                      },
                      "primaryDocumentation": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": { "url": { "type": "string" } },
                          "required": ["url"]
                        }
                      }
                    },
                    "required": ["primaryDocumentation"]
                  },
                  "categories": { "type": "array", "items": { "type": "string" } },
                  "nodeVersion": { "type": "string" },
                  "codexVersion": { "type": "string" }
                },
                "required": ["categories"]
              }
            }
          },
          "group": { "type": "string" },
          "defaults": {
            "type": "object",
            "properties": {
              "name": { "type": "string" },
              "color": { "type": "string" }
            },
            "required": ["name"]
          },
          "iconData": {
            "type": "object",
            "properties": {
              "icon": { "type": "string" },
              "type": { "type": "string" },
              "fileBuffer": { "type": "string" }
            },
            "required": ["type"]
          },
          "displayName": { "type": "string" },
          "typeVersion": { "type": "number" },
          "nodeCategories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": { "type": "number" },
                "name": { "type": "string" }
              },
              "required": ["id", "name"]
            }
          }
        },
        "required": [
          "id", "icon", "name", "codex", "group", "defaults",
          "iconData", "displayName", "typeVersion"
        ]
      }
    },
    "description": { "type": "string" },
    "image": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "url": { "type": "string" }
        }
      }
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "name": { "type": "string" }
        }
      }
    },
    "workflowInfo": {
      "type": "object",
      "properties": {
        "nodeCount": { "type": "number" },
        "nodeTypes": { "type": "object" }
      }
    },
    "workflow": {
      "type": "object",
      "properties": {
        "nodes": { "type": "array" },
        "connections": { "type": "object" },
        "settings": { "type": "object" },
        "pinData": { "type": "object" }
      },
      "required": ["nodes", "connections"]
    }
  },
  "required": ["id", "name", "totalViews", "createdAt", "user", "nodes", "workflow"]
}
Show category item data schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "id": { "type": "number" },
    "name": { "type": "string" }
  },
  "required": ["id", "name"]
}
Show collection item data schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "id": { "type": "number" },
    "rank": { "type": "number" },
    "name": { "type": "string" },
    "totalViews": {},
    "createdAt": { "type": "string" },
    "workflows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": { "id": { "type": "number" } },
        "required": ["id"]
      }
    },
    "nodes": { "type": "array", "items": {} }
  },
  "required": ["id", "rank", "name", "totalViews", "createdAt", "workflows", "nodes"]
}

n8n의 API 엔드포인트를 대화형으로 탐색할 수도 있어요:

https://api.n8n.io/templates/categories https://api.n8n.io/templates/collections https://api.n8n.io/templates/search https://api.n8n.io/health

더 많은 지원이 필요하면 contact us로 연락할 수 있습니다.

[^1]: n8n 템플릿은 n8n과 커뮤니티 멤버가 설계한 미리 빌드된 워크플로우로, 본인의 n8n 인스턴스로 가져올 수 있습니다. 템플릿을 쓸 때는 크레덴셜을 채우고 필요에 맞게 구성을 조정해야 할 수도 있어요.

더 알아보기 (Learn more)