Verified all n8n API capabilities:
- Authentication with X-N8N-API-KEY header
- Read workflow JSON (96 nodes)
- Update workflow via PUT
- View execution history
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Plan 02: Added Task 4 (checkpoint:human-action) to remove docker.sock
volume mount from n8n container after verifying proxy works
- Plan 02: Added must_have truth for docker.sock removal (SEC-02 complete)
- Plan 03: Removed "Create API returns 403" from must_haves - container
create is intentionally ALLOWED for update command functionality
- Plan 03: Added rationale explaining why container create is needed
- Clarified that blocked APIs are: exec, build, commit (not create)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- All 4 API requirements verified (API-01 through API-04)
- Phase goal achieved: Claude Code can programmatically read, update, and test workflows
- Verification passed: 4/4 must-haves confirmed
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
All 4 API requirements verified successfully:
- API-01: Authentication works (200 response from /api/v1/workflows)
- API-02: Can read workflow (Docker Manager Bot - 96 nodes)
- API-03: Can update workflow (PUT successful, updatedAt: 2026-02-03T13:15:35.015Z)
- API-04: Can view execution history (5 recent executions retrieved)
Created .env.n8n-api with N8N_HOST and N8N_API_KEY (gitignored)
Created .gitignore to protect API credentials
Workflow ID: HmiXBlJefBRPMS0m4iNYc
n8n Instance: https://api.bergerhouse.net
Phase 6: n8n API Access
- 1 plan in 1 wave
- Covers API-01 through API-04 requirements
- Human checkpoint for API key creation + automated verification
- Fixed: Use PUT (not PATCH) per current n8n docs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 06: n8n API Access
- 1 plan in 1 wave
- 0 parallel (sequential due to human checkpoint)
- Ready for execution
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 6: n8n API Access
- n8n REST API capabilities identified
- Authentication patterns documented (X-N8N-API-KEY header)
- Workflow CRUD operations researched
- Execution history access patterns found
- Common pitfalls catalogued (activation timeout, public vs private endpoints)
- No official SDK exists - raw HTTP client required
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Archived:
- milestones/v1.0-ROADMAP.md (full phase details)
Updated:
- MILESTONES.md (new entry for v1.0)
- PROJECT.md (requirements → Validated, Current State added)
- ROADMAP.md (collapsed to one-line with archive link)
- STATE.md (reset for next milestone)
v1.0 Docker Control via Telegram shipped:
- 5 phases, 12 plans, 5 days
- Telegram bot with keyword commands
- Docker socket integration via n8n
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously the "no update needed" branch was empty, leaving users
with no feedback after the update check completed.
Added Format No Update and Send No Update nodes to display
"<container> is already up to date" message.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Parse Logs Command returned 'lineCount' but Match Logs Container
expected 'lines', causing the line count to always be undefined
and Docker to return its default.
Renamed to 'lines' for consistency throughout the logs flow.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Log content may contain <, >, & characters (like "<computed>") which
Telegram interprets as HTML tags when using parse_mode=HTML.
Added escapeHtml() function to convert:
- & → &
- < → <
- > → >
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When Config.Image has no tag (e.g., "nitnelave/lldap" instead of
"nitnelave/lldap:latest"), Docker's API pulls ALL tags for that image.
This caused massive downloads and rate limit hits.
Now appends ":latest" if no tag or digest is present in the image name.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Docker's /images/create API streams progress JSON for every layer.
For large images, this can be gigabytes of output that was being
buffered by curl and n8n, causing hangs and disk usage spikes.
Now pipes through `tail -c 10000` to only keep the last 10KB where
error/success messages appear. Discards the streaming progress data.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Reference $('Format Update Result') instead of $json for currentImageId
- The Telegram node doesn't pass through input data, it returns API response
- Also add no-op command fallback when currentImageId is missing
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add --max-time 600 (10 min) to curl pull command
- Add timeout: 660 to n8n executeCommand node
Docker's /images/create API streams progress until complete.
Without timeout, large image pulls could hang indefinitely.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Testing session found and fixed multiple issues:
- Show Menu keyboard/HTML issues
- Container exact match priority
- Update acknowledgment and error handling
- Old image removal after update
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1. Send "Updating <container>..." message immediately when update starts
so user knows the command was received during long image pulls
2. Check pull response for rate limiting and other errors before
continuing with update. Errors like "toomanyrequests" now show
a proper error message instead of silently failing to update.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Mimics Unraid's update behavior by removing the orphan image after
the new container is started. The old image ID is now passed through
the entire update flow and used to call DELETE /images/{id} at the end.
Removal is fire-and-forget with force=false so it will fail gracefully
if another container still uses the image.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixed matching in Match Container, Match Update Container, and Match
Logs Container nodes:
1. First check for exact name match (e.g., "jellyplex" matches only jellyplex)
2. Then fall back to substring matching (container name contains query)
3. Removed reverse matching (query contains container name) which caused
"jellyplex" to incorrectly match "plex"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Native Telegram node replyKeyboard wasn't displaying. Fallback to
simple text message listing available commands. Can revisit persistent
keyboard feature later.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
HTTP Request node with $credentials reference was causing 404 errors.
Native Telegram node handles credentials more reliably for static menus.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
n8n IF nodes don't support credentials - $credentials syntax only works
in nodes that make external calls. Reverted to direct user ID in the
IF conditions and updated README with simpler configuration instructions.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Step-by-step installation guide for Unraid
- n8n container configuration with Docker socket access
- Credential creation instructions for Telegram API and Auth
- Usage section with all 6 commands documented
- No troubleshooting section (focused on initial setup)
Tasks completed: 2/2
- Standardize error messages to terse format
- Migrate user ID to n8n credentials system
SUMMARY: .planning/phases/05-polish-deploy/05-02-SUMMARY.md
- Auth nodes now reference $credentials.telegramAuth.userId
- Added telegramAuth credential reference to both IF nodes
- Removed hardcoded user ID from workflow JSON
- Workflow can now be safely exported/shared
- Docker socket errors now show 'Cannot connect to Docker'
- Action failures now show 'Failed to {action} {container}'
- Removed HTTP status codes and technical details from error messages
- Simplified callback action error handling
- Remove Prepare Claude Request, Claude Intent Parser, Parse Intent,
Intent Router, Send Unknown Intent, Send Intent Error nodes
- Remove Anthropic API credential reference
- Rename Route Message to Keyword Router with updated rules
- Update IF User Authenticated to connect to Keyword Router
- Update Parse and Match to work without NLU context
- Update Parse Action Command to parse from message text directly
- Update Match Container to reference Parse Action Command
- Update Parse Logs Command to work with keyword routing
Keyword Router handles: /start, status, restart, start, stop,
update, logs with fallback to menu
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Workflow currently has Claude API nodes that need removal.
Added to Phase 5 scope along with keyword routing replacement.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove Claude API integration and intent parsing (04-02-PLAN)
- REQ-08 (conversational queries) moved to out of scope
- Phase 4 renamed from "Logs & Intelligence" to "Logs" (complete)
- v1.0 now focuses on keyword-based container control
Simple substring matching works well for container management.
NLU adds complexity without proportional value for v1.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
HTTP Request node with credential access via URL expression was
failing. Native Telegram node handles credentials internally and
is more reliable for this use case.
Add defensive error handling to throw clear error if chatId is
missing before attempting to send Telegram message. This helps
debug 'resource not found' errors by identifying data flow issues.
Fixed Check Match Count and Check Update Match Count nodes:
- Changed typeValidation from 'strict' to 'loose'
- Changed rightValue from strings ('0', '1') to numbers (0, 1)
- Removed empty leftValue from options
This fixes 'Wrong type: string but expecting number' errors.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed Match Container to get action data from Parse Intent node
instead of the old Parse Action node which isn't executed in the
intent-based routing flow.
Mapping:
- action -> intent.parameters.action
- containerQuery -> intent.container
- chatId -> intent.original_message.chat.id
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Parse and Match now returns formatted text directly, so Format Response
node is redundant. Connect Parse and Match directly to Send Docker Response
to avoid 'Unexpected response format' error.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed typeValidation from 'strict' to 'loose' and rightValue from
strings to numbers to fix type mismatch error in Switch node conditions.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>