워크플로 템플릿
새 워크플로를 생성할 때 빈 워크플로로 시작할지, 기존 템플릿을 사용할지 선택할 수 있습니다. Templates를 선택하여 템플릿 라이브러리를 봅니다. n8n의 템플릿 라이브러리를 사용하는 경우 n8n 웹사이트의 워크플로로 이동합니다.
새 워크플로를 생성할 때 빈 워크플로로 시작할지, 기존 템플릿을 사용할지 선택할 수 있습니다.
템플릿이 제공하는 것:
- 시작 도움: n8n에 이미 필요한 것을 수행하는 템플릿이 있을 수 있습니다.
- 구축 가능한 것의 예시
- 자신만의 워크플로를 만들기 위한 모범 사례
템플릿 접근#
Templates를 선택하여 템플릿 라이브러리를 봅니다.
n8n의 템플릿 라이브러리를 사용하는 경우 n8n 웹사이트의 워크플로로 이동합니다. 조직에서 제공하는 사용자 정의 라이브러리를 사용하는 경우 앱 내에서 템플릿을 검색하고 탐색할 수 있습니다.
n8n 라이브러리에 워크플로 추가#
워크플로우를 n8n의 템플릿 라이브러리에 제출할 수 있습니다.
n8n은 크리에이터 프로그램을 진행 중이며, 템플릿 마켓플레이스를 개발하고 있습니다. 이는 진행 중인 프로젝트로, 세부 사항은 변경될 수 있습니다.
템플릿 제출 방법 및 크리에이터가 되는 방법은 n8n Creator hub를 참조하세요.
셀프 호스팅 n8n: 자체 라이브러리 사용#
환경 변수에서 N8N_TEMPLATES_HOST를 API의 기본 URL로 설정합니다.
엔드포인트#
API는 n8n과 동일한 엔드포인트 및 데이터 구조를 제공해야 합니다.
엔드포인트 목록:
| 메서드 | 경로 | 목적 |
|---|---|---|
| GET | /templates/workflows/<id> |
미리보기/탐색을 위한 템플릿 메타데이터 가져오기 |
| GET | /workflows/templates/<id> |
캔버스에 임포트할 워크플로우 데이터 가져오기 |
| GET | /templates/search |
워크플로우 템플릿 검색 |
| GET | /templates/collections/<id> |
특정 템플릿 컬렉션 가져오기 |
| GET | /templates/collections |
모든 템플릿 컬렉션 목록 조회 |
| GET | /templates/categories |
모든 템플릿 카테고리 목록 조회 |
| GET | /health |
상태 확인 엔드포인트 |
두 워크플로우 엔드포인트는 서로 다른 응답 형식이 필요합니다:
/templates/workflows/{id}: 템플릿 자체를 반환하며,workflow키 안에 워크플로우가 포함됩니다/workflows/templates/{id}: 템플릿에 포함된 워크플로우를 반환합니다
자세한 내용은 아래 스키마를 참조하세요.
쿼리 파라미터#
/templates/search 엔드포인트는 다음 쿼리 파라미터를 허용합니다:
| 파라미터 | 타입 | 설명 |
|---|---|---|
page |
정수 | 반환할 결과 페이지 |
rows |
정수 | 페이지당 반환할 최대 결과 수 |
category |
쉼표로 구분된 문자열 목록 (카테고리) | 검색할 카테고리 |
search |
문자열 | 검색어 |
/templates/collections 엔드포인트는 다음 쿼리 파라미터를 허용합니다:
| 파라미터 | 타입 | 설명 |
|---|---|---|
category |
쉼표로 구분된 문자열 목록 (카테고리) | 검색할 카테고리 |
search |
문자열 | 검색어 |
스키마#
두 워크플로우 엔드포인트의 주요 차이점:
// GET /templates/workflows/{id} 반환값 (래핑됨):
{
"workflow": {
"id": 123,
"name": "...",
"totalViews": 1000,
// ... 아래 전체 workflow item 스키마 참조
"workflow": { // 실제 워크플로우 정의
"nodes": [...],
"connections": {}
}
}
}
// GET /workflows/templates/{id} 반환값 (플랫):
{
"id": 123,
"name": "...",
"workflow": { // 실제 워크플로우 정의
"nodes": [...],
"connections": {}
}
}
응답 객체의 상세 스키마:
`workflow` 항목 데이터 스키마 보기
`/templates/workflows/{id}` 엔드포인트에서 사용됩니다 (`workflow` 키로 래핑됨).
이 스키마는 검색/탐색 UI에서 템플릿을 표시하는 데 사용되는 템플릿 메타데이터를 설명합니다. 실제 임포트 가능한 워크플로우 정의가 포함된 중첩 `workflow` 속성이 있습니다.
```json title="Workflow item data schema"
{
"$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"
]
}
```
`category` 항목 데이터 스키마 보기
```json title="Category item data schema"
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
]
}
```
`collection` 항목 데이터 스키마 보기
```json title="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
추가 지원이 필요하면 문의하세요.
