Skip to content

Commit cfa9931

Browse files
ImTotemclaude
andcommitted
fix(infra): parse n8n workflow ID correctly and use publish:workflow
list:workflow outputs ID|Name format — split on | not whitespace. update:workflow is deprecated, use publish:workflow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 70537fa commit cfa9931

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

infra/scripts/init_n8n.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ import_workflow() {
4242
activate_workflow() {
4343
local name="$1"
4444
local wf_id
45-
wf_id=$($COMPOSE exec -T n8n n8n list:workflow 2>/dev/null | grep "$name" | awk '{print $1}')
45+
wf_id=$($COMPOSE exec -T n8n n8n list:workflow 2>/dev/null | grep "$name" | awk -F'|' '{print $1}')
4646
if [ -z "$wf_id" ]; then
4747
echo " WARNING: Could not find workflow '$name' to activate"
4848
return 1
4949
fi
50-
$COMPOSE exec -T n8n n8n update:workflow --id="$wf_id" --active=true
50+
$COMPOSE exec -T n8n n8n publish:workflow --id="$wf_id"
5151
echo " Activated '$name' (id: $wf_id)"
5252
}
5353

0 commit comments

Comments
 (0)