커스텀 워크플로우 템플릿 라이브러리 구성하기
커스텀 워크플로우 템플릿 라이브러리 구성하기
셀프호스팅 n8n 인스턴스를 위해 자체 워크플로우 템플릿 라이브러리를 구성하는 방법입니다. n8n은 워크플로우 템플릿 라이브러리를 제공하는데, 셀프호스팅할 때는 세 가지 중 하나를 고를 수 있어요:
- n8n의 워크플로우 템플릿 라이브러리를 계속 사용 (기본 동작)
- 워크플로우 템플릿 비활성화
- 자체 워크플로우 템플릿 라이브러리 생성
출처: n8n — Configure a custom workflow templates library (공식 문서)
워크플로우 템플릿 비활성화
환경 변수 N8N_TEMPLATES_ENABLED를 false로 설정하세요.
자체 워크플로우 템플릿 라이브러리 사용하기
환경 변수 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": {}
}
}
workflow·category·collection 아이템의 상세 JSON 스키마는 Use templates 문서의 스키마 섹션에서 동일하게 제공됩니다.
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로 연락할 수 있습니다.
워크플로우를 n8n 라이브러리에 추가하기
워크플로우를 n8n의 템플릿 라이브러리에 제출할 수 있어요.
n8n은 크리에이터 프로그램과 템플릿 마켓플레이스를 개발 중입니다. 진행 중인 프로젝트라 세부 내용은 바뀔 수 있어요. 템플릿 제출 방법과 크리에이터가 되는 방법은 n8n Creator hub를 참고하세요.
[^1]: n8n 템플릿은 n8n과 커뮤니티 멤버가 설계한 미리 빌드된 워크플로우로, 본인의 n8n 인스턴스로 가져올 수 있습니다. 템플릿을 쓸 때는 크레덴셜을 채우고 필요에 맞게 구성을 조정해야 할 수도 있어요.