GuidesAutomation
Generic Automation Examples
Curated open-source automation examples and practical patterns for document workflows.
n8n examples from GitHub are useful to learn practical workflow patterns before building production automation.
This guide complements:
1. How to Use This List
- Use template repositories to study workflow structure, not as copy-paste production code.
- Prefer patterns that include retries, validation, and failure handling.
- Keep extraction logic modular so you can swap parser/OCR providers later.
- Record the repository commit or release you used as a reference.
2. Relevant Open-Source Repositories
| Repository | Focus | Why it matters |
|---|---|---|
| hanson-cheng/n8n-workflows | Workflow library | Broad set of reusable workflow patterns. |
| enescingoz/awesome-n8n-templates | Template catalog | Fast way to discover starter blueprints by use case. |
| ggplab/n8n-playbook | OCR and file automation | Practical examples for document ingestion and routing. |
| bitovi/n8n-nodes-markitdown | PDF and file conversion | Useful for normalizing multiple file formats into text/Markdown. |
| prokodo-agency/n8n-nodes-pdf-toolkit | PDF utility nodes | Supports split/merge/OCR building blocks. |
| ConniAU/n8n-pdf-parse | PDF parsing node | Good low-level parser for URL/binary file flows. |
| ivansiyanko/n8n-invoice-ai | AI extraction + confidence | Demonstrates validation and review handoff patterns. |
| ibam28/ai-invoice-processing | Self-hosted stack | Shows OCR + local model + database pipeline. |
3. Reusable Patterns You Should Keep
Trigger and Intake
- Webhook, email, Drive, or object storage trigger.
- Normalize input into one event shape early.
{
"document_id": "doc-001",
"source": "webhook|email|drive|s3",
"file_url": "https://...",
"mime_type": "application/pdf"
}Route by Document Type
- Use
Switch/IFnodes on MIME type, filename, or classifier output. - Keep one branch per extraction strategy (layout parser, OCR fallback, plain text parser).
Normalize Before Persisting
Use one canonical schema before writing to APIs or databases:
{
"document_id": "string",
"checksum": "string",
"parser_version": "v1",
"source": "webhook|drive|s3|email",
"extracted_text": "string",
"structured": {},
"confidence": 0.0,
"extracted_at": "2026-09-27T12:00:00.000Z"
}Confidence and Human Review
- Auto-process records above threshold.
- Route low-confidence records to manual review.
- Store both original extraction and reviewer-corrected values for auditability.
Dead-Letter and Retry
- Enable retries with backoff on extraction nodes.
- Add an
Error Triggercompanion workflow. - Persist failed context to a dead-letter table for triage.
4. Reference Pipeline (Generic)
Document Input
-> Intake Trigger
-> Route by Type
-> Extraction (Parser/OCR)
-> Normalize Schema
-> Validation + Confidence
-> (High) Persist / Index
-> (Low) Manual Review Queue
-> Metrics + Alerts5. 30-Minute Practice Lab
Goal: evaluate one repository pattern and adapt it safely.
- Pick one template repository from Section 2.
- Import one workflow into a test n8n instance.
- Replace external credentials with mock values.
- Add normalization to the canonical schema from Section 3.
- Add one retry rule and one dead-letter capture step.
- Execute 3 tests: valid document, unsupported file type, malformed payload.
- Capture outcomes in a short decision note: keep, modify, or reject pattern.
Success criteria:
- Workflow runs end-to-end in a test environment.
- Output matches canonical schema.
- Failure case is captured with enough context to debug quickly.
6. Evaluation Checklist
Before adopting a community example, confirm:
- It has clear node-level logic and no hidden assumptions.
- It includes validation and error handling, not only happy-path logic.
- It supports idempotent writes (
document_id + checksum). - It is compatible with your deployment model (local, self-hosted, or cloud).
- It does not expose secrets in workflow JSON exports.
7. Next Step
After selecting a reference pattern:
- Implement the baseline workflow from content/docs/guides/automation/01-n8n.mdx.
- Add the extraction reliability practices from content/docs/guides/automation/02-data-extraction.mdx.