Files
n8n-mcp/dist/mcp/tool-docs/templates/get-template.js
Romuald Członkowski 7b0ff990ec chore: update n8n to 2.2.3 and bump version to 2.31.7 (#523)
- Updated n8n from 2.1.5 to 2.2.3
- Updated n8n-core from 2.1.4 to 2.2.2
- Updated n8n-workflow from 2.1.1 to 2.2.2
- Updated @n8n/n8n-nodes-langchain from 2.1.4 to 2.2.2
- Rebuilt node database with 540 nodes (434 from n8n-nodes-base, 106 from @n8n/n8n-nodes-langchain)
- Updated README badge with new n8n version
- Updated CHANGELOG with dependency changes

Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Romuald Członkowski <romualdczlonkowski@MacBook-Pro-Romuald.local>
Co-authored-by: Claude <noreply@anthropic.com>
2026-01-06 13:18:56 +01:00

84 lines
4.2 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTemplateDoc = void 0;
exports.getTemplateDoc = {
name: 'get_template',
category: 'templates',
essentials: {
description: 'Get workflow template by ID with configurable detail level. Ready to import. IDs from search_templates.',
keyParameters: ['templateId', 'mode'],
example: 'get_template({templateId: 1234, mode: "full"})',
performance: 'Fast (<100ms) - single database lookup',
tips: [
'Get template IDs from search_templates first',
'Use mode="nodes_only" for quick overview, "structure" for topology, "full" for import',
'Returns complete workflow JSON ready for import into n8n'
]
},
full: {
description: `Retrieves the complete workflow JSON for a specific template by its ID. The returned workflow can be directly imported into n8n through the UI or API. This tool fetches pre-built workflows from the community template library containing 2,700+ curated workflows.`,
parameters: {
templateId: {
type: 'number',
required: true,
description: 'The numeric ID of the template to retrieve. Get IDs from search_templates'
},
mode: {
type: 'string',
required: false,
description: 'Response detail level: "nodes_only" (minimal - just node list), "structure" (nodes + connections), "full" (complete workflow JSON, default)',
default: 'full',
enum: ['nodes_only', 'structure', 'full']
}
},
returns: `Returns an object containing:
- template: Complete template information including workflow JSON
- id: Template ID
- name: Template name
- description: What the workflow does
- author: Creator information (name, username, verified status)
- nodes: Array of node types used
- views: Number of times viewed
- created: Creation date
- url: Link to template on n8n.io
- workflow: Complete workflow JSON with structure:
- nodes: Array of node objects (id, name, type, typeVersion, position, parameters)
- connections: Object mapping source node names to targets
- settings: Workflow configuration (timezone, error handling, etc.)
- usage: Instructions for using the workflow`,
examples: [
'get_template({templateId: 1234}) - Get complete workflow (default mode="full")',
'get_template({templateId: 1234, mode: "nodes_only"}) - Get just the node list',
'get_template({templateId: 1234, mode: "structure"}) - Get nodes and connections',
'get_template({templateId: 5678, mode: "full"}) - Get complete workflow JSON for import'
],
useCases: [
'Download workflows for direct import into n8n',
'Study workflow patterns and best practices',
'Get complete workflow JSON for customization',
'Clone popular workflows for your use case',
'Learn how complex automations are built'
],
performance: `Fast performance with single database lookup:
- Query time: <10ms for template retrieval
- Workflow JSON parsing: <50ms
- Total response time: <100ms
- No network calls (uses local cache)`,
bestPractices: [
'Always check if template exists before attempting modifications',
'Review workflow nodes before importing to ensure compatibility',
'Save template JSON locally if planning multiple customizations',
'Check template creation date for most recent patterns',
'Verify all required credentials are configured before import'
],
pitfalls: [
'Template IDs change when database is refreshed',
'Some templates may use deprecated node versions',
'Credentials in templates are placeholders - configure your own',
'Not all templates work with all n8n versions',
'Template may reference external services you don\'t have access to'
],
relatedTools: ['search_templates', 'n8n_create_workflow']
}
};
//# sourceMappingURL=get-template.js.map