Skip to main content

Overview

Retrieves complete workflow JSON for a specific template by ID. The returned workflow can be directly imported into n8n through the UI or API. Access to 2,700+ curated workflows from the community template library. Performance: Fast (< 100ms) - single database lookup

Parameters

templateId
number
required
The numeric ID of the template to retrieve.Get template IDs from search_templates.Example: 1234, 5678
mode
string
default:"full"
Response detail level.

Response

template
object
Complete template information
usage
string
Instructions for using the workflow

Examples

{
  "templateId": 1234
}

Response Example (Full Mode)

{
  "template": {
    "id": 1234,
    "name": "Slack Notification on Webhook",
    "description": "Send Slack notification when webhook is triggered",
    "author": {
      "name": "n8n Team",
      "username": "n8n",
      "verified": true
    },
    "nodes": [
      "n8n-nodes-base.webhook",
      "n8n-nodes-base.slack"
    ],
    "views": 15234,
    "created": "2023-05-15T10:30:00Z",
    "url": "https://n8n.io/workflows/1234",
    "workflow": {
      "nodes": [
        {
          "id": "webhook-1",
          "name": "Webhook",
          "type": "n8n-nodes-base.webhook",
          "typeVersion": 1,
          "position": [250, 300],
          "parameters": {
            "httpMethod": "POST",
            "path": "slack-notification",
            "responseMode": "onReceived"
          }
        },
        {
          "id": "slack-1",
          "name": "Slack",
          "type": "n8n-nodes-base.slack",
          "typeVersion": 1,
          "position": [450, 300],
          "parameters": {
            "resource": "message",
            "operation": "post",
            "channel": "#general",
            "text": "={{ $json.message }}"
          },
          "credentials": {
            "slackApi": {
              "id": "1",
              "name": "Slack account"
            }
          }
        }
      ],
      "connections": {
        "Webhook": {
          "main": [
            [
              {
                "node": "Slack",
                "type": "main",
                "index": 0
              }
            ]
          ]
        }
      },
      "settings": {
        "executionOrder": "v1",
        "timezone": "America/New_York",
        "saveDataErrorExecution": "all",
        "saveDataSuccessExecution": "all"
      }
    }
  },
  "usage": "Import this workflow into n8n. Configure Slack credentials. Test the webhook by sending a POST request to the generated webhook URL."
}

Response Example (Nodes Only Mode)

{
  "template": {
    "id": 1234,
    "name": "Slack Notification on Webhook",
    "nodes": [
      "n8n-nodes-base.webhook",
      "n8n-nodes-base.slack"
    ]
  }
}

Use Cases

  • Download workflows for direct import: Get complete workflow JSON ready to import into n8n
  • Study workflow patterns: Analyze how experienced users build workflows
  • Get workflow JSON for customization: Modify templates to fit your specific needs
  • Clone popular workflows: Start with proven workflow patterns
  • Learn complex automations: Understand how advanced workflows are structured

Best Practices

Always verify the template exists before attempting to modify it.
// First check if template exists
get_template({"templateId": 1234, "mode": "nodes_only"})

// Then get full workflow
get_template({"templateId": 1234, "mode": "full"})
Check which nodes are used to ensure compatibility with your n8n instance.
// Check nodes first
get_template({"templateId": 1234, "mode": "nodes_only"})

// Then get full workflow if compatible
get_template({"templateId": 1234, "mode": "full"})
If you plan multiple customizations, save the template JSON to avoid repeated API calls.
Newer templates may use more recent n8n features and best practices.
Templates use placeholder credentials. Ensure you have the required credentials configured.

Common Pitfalls

Template IDs change on database refresh: Template IDs are not permanent. They may change if the template database is rebuilt.
Some templates use deprecated node versions: Older templates may use deprecated node versions that require migration.
Credentials are placeholders: All credentials in templates are placeholders. You must configure your own credentials after import.
Not all templates work with all n8n versions: Check node versions and n8n version compatibility before importing.
External service dependencies: Templates may reference external services you don’t have access to (APIs, databases, etc.).

Performance Metrics

MetricValueNotes
Query time< 10msSingle database lookup
Workflow JSON parsing< 50msJSON serialization
Total response time< 100msComplete operation
Network calls0Uses local cache

Mode Comparison

ModeResponse SizeUse CaseIncludes Workflow
nodes_only~500 bytesQuick overviewNo
structure~2-5KBTopology viewPartial (nodes + connections)
full~5-50KBImport/customizationYes (complete)

search_templates

Search for templates first

validate_workflow

Validate template workflow

n8n_create_workflow

Import template to n8n

Build docs developers (and LLMs) love