n8n-workflow
Automate document workflows with n8n. Use when a user asks to create an n8n workflow, automate a process, connect services, build an integration pipeline, set up webhook triggers, or access n8n workflow templates. Covers workflow design, node configuration, and accessing 7800+ community templates.
Usage
Getting Started
- Install the skill using the command above
- Open your AI coding agent (Claude Code, Codex, Gemini CLI, or Cursor)
- Reference the skill in your prompt
- The AI will use the skill's capabilities automatically
Example Prompts
- "Process all PDFs in the uploads folder and extract invoice data"
- "Set up a workflow that converts uploaded spreadsheets to formatted reports"
Documentation
Overview
Create, configure, and deploy n8n workflows for document and data automation. n8n is an open-source workflow automation tool with 400+ integrations. This skill helps you design workflows, configure nodes, use community templates, and self-host n8n instances.
Instructions
When a user asks for help with n8n workflows, determine which task they need:
Task A: Set up n8n locally
Install n8n to start building workflows:
# Quick start with npm (requires Node.js 18+)
npm install -g n8n
n8n start
# Or with Docker
docker run -d --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n
Access the editor at http://localhost:5678. For production Docker Compose setups with PostgreSQL, scaling, and backups, see the n8n-self-host skill.
Task B: Design a workflow from scratch
- Identify the trigger (webhook, schedule, event, manual)
- Map out the data flow: source -> transform -> destination
- Create the workflow JSON structure:
{
"name": "Document Processing Pipeline",
"nodes": [
{
"name": "Webhook Trigger",
"type": "n8n-nodes-base.webhook",
"position": [250, 300],
"parameters": {
"path": "process-doc",
"httpMethod": "POST"
}
},
{
"name": "Extract Data",
"type": "n8n-nodes-base.code",
"position": [450, 300],
"parameters": {
"jsCode": "const items = $input.all();\nreturn items.map(item => ({ json: { text: item.json.body.content } }));"
}
}
],
"connections": {
"Webhook Trigger": {
"main": [[ { "node": "Extract Data", "type": "main", "index": 0 } ]]
}
}
}
- Import the JSON into n8n via the editor or CLI:
# Import via CLI
n8n import:workflow --input=workflow.json
Task C: Use community templates
- Browse templates at
https://n8n.io/workflows/(7800+ available) - Search by use case, integration, or keyword
- Download and import the template:
# Download a template
curl -o template.json "https://api.n8n.io/api/templates/workflows/TEMPLATE_ID"
# Import into your n8n instance
n8n import:workflow --input=template.json
- Customize the template by updating credentials and parameters
Task D: Configure common nodes
HTTP Request node for API calls:
{
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://api.example.com/process",
"sendBody": true,
"bodyParameters": {
"parameters": [
{ "name": "document", "value": "={{ $json.fileContent }}" }
]
}
}
}
Schedule Trigger for recurring workflows:
{
"type": "n8n-nodes-base.scheduleTrigger",
"parameters": {
"rule": { "interval": [{ "field": "hours", "hoursInterval": 1 }] }
}
}
Code node for custom transformations:
// Process each item
const results = [];
for (const item of $input.all()) {
results.push({
json: {
processed: item.json.content.toUpperCase(),
timestamp: new Date().toISOString()
}
});
}
return results;
Examples
Example 1: Automated invoice processing pipeline
User request: "Create an n8n workflow that watches a folder for new invoices, extracts data, and saves to a spreadsheet"
Workflow design:
- Trigger: Local File Trigger watching
/invoices/directory - Read File: Read the uploaded PDF/image
- HTTP Request: Send to an OCR API for text extraction
- Code Node: Parse extracted text into structured fields (vendor, amount, date)
- Google Sheets: Append the row to an invoice tracking spreadsheet
- Email: Send confirmation with the extracted data
Example 2: Slack-to-Notion document sync
User request: "When someone posts a document link in Slack, automatically save it to Notion"
Workflow design:
- Slack Trigger: Listen for messages containing URLs in a specific channel
- Code Node: Extract and validate the URL from the message
- HTTP Request: Fetch document metadata from the URL
- Notion Node: Create a new page in the target database with title, URL, and metadata
- Slack Node: Reply in thread confirming the document was saved
Example 3: Scheduled report generation
User request: "Every Monday at 9 AM, pull data from our API and email a summary"
Workflow design:
- Schedule Trigger: Cron expression
0 9 * * 1 - HTTP Request: Fetch weekly metrics from the internal API
- Code Node: Aggregate and format data into an HTML table
- Send Email: Deliver the formatted report to the distribution list
Guidelines
- Always set up error handling with the Error Trigger node for production workflows.
- Use environment variables for credentials and API keys, never hardcode them.
- Test workflows with small datasets before enabling automated triggers.
- Use the n8n CLI for version-controlled workflow management: export with
n8n export:workflow --all --output=workflows/. - Set execution timeouts to prevent runaway workflows.
- For high-volume workflows, self-host n8n with a PostgreSQL backend instead of the default SQLite.
- Pin node versions in production to avoid breaking changes on updates.
- Use sub-workflows to keep complex automations modular and reusable.
Information
- Version
- 1.0.0
- Author
- terminal-skills
- Category
- Automation
- License
- Apache-2.0