Skip to content

Promote automation fixes to production (n8n multi-env deploy)#71

Merged
derrickmehaffy merged 6 commits into
mainfrom
develop
Jun 30, 2026
Merged

Promote automation fixes to production (n8n multi-env deploy)#71
derrickmehaffy merged 6 commits into
mainfrom
develop

Conversation

@derrickmehaffy

Copy link
Copy Markdown
Member

Promotes the automation workstream from develop to production (main). All changes are scoped to apps/automation/ — no CMS/web/search code is touched.

What's included (5 commits)

  • Deploy matching scoped by env tagdeploy-workflows.mjs now decides create-vs-update by the environment tag (staging/production) instead of matching workflow names globally. Staging and production share one n8n instance with identical workflow names, so the old name-match would have updated the staging set in place on a production deploy. Now each set is independent: first deploy to a new env creates fresh, re-deploys touch only that env's set.
  • Deploy re-links before PUT + tags only deployed workflows — re-points executeWorkflow → render-email and Settings → Error Workflow → error-handler to the target instance's ids in dependency order, and scopes tagging to the workflows this run deployed.
  • security-scan summary reads stage results from the Format nodes (not the merge output, which carried no stage/result keys).
  • render-email converts the Strapi Blocks/markdown body to HTML before sending.
  • README documents env-tag keying, the deploy flow, the credential matrix, and the architecture diagram.

Validation

Already exercised end-to-end against the live shared instance (n8n.tools.strapi.team):

  • Production set deployed (12 workflows, tagged community-hub + production), staging set verified untouched.
  • All 25 credential bindings audited correct (no crossed Header-Auth creds).
  • 10 reactive workflows activated (8 webhooks + render-email + error-handler); the 2 schedule workflows intentionally left inactive.

🤖 Generated with Claude Code

derrickmehaffy and others added 6 commits June 30, 2026 09:04
…loy script

workflows:deploy now tags every workflow with community-hub plus the environment tag (staging, or production when namespace=strapi) via PUT /workflows/:id/tags, creating any missing tag. Applied to the staging set.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…t nodes

Build Summary read the 'Wait for All Stages' merge output (which combines the two PATCH responses and has no stage/result keys), so its pick() returned null for both stages and every summary field came out null. Read the dependency + AI results directly from the Format Package Scan Result / Format AI Result nodes instead; the merge stays only to gate timing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…flows

Re-link executeWorkflow/errorWorkflow references to the target's ids BEFORE the create/update (push referenced sub-workflows first, seed ids from existing) — n8n rejects publishing an active workflow whose executeWorkflow target isn't published, so the old relink-in-a-second-pass failed on re-deploys against active instances. Also scope the tag pass to the deployed workflows only, so pre-existing workflows on a shared instance aren't tagged/overwritten.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The email-template body is Strapi richtext (markdown), but render-email dropped it raw into the HTML shell, so **bold**, > blockquotes, and paragraph breaks showed as literal text. Add a markdown->HTML converter in 'Wrap In Branded Shell' (bold/italic/inline-code/blockquote/headings/paragraphs + bare-URL autolink), HTML-escaping first so interpolated reviewer feedback can't inject markup.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix(automation): staging bring-up follow-ups (email rendering, scan summary, deploy robustness, tags)
…bber staging

deploy-workflows.mjs matched existing workflows by name globally. With staging and
production sharing one n8n instance and carrying identical workflow names, a
production deploy would update the staging set in place instead of creating a
separate set.

Scope the create-vs-update decision to the environment tag (staging/production):
a first deploy to a new environment creates a fresh set, and re-deploys update only
that environment's set, leaving the other untouched. Document the tag-keying in the
workflows README.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
community-web Building Building Preview, Comment Jun 30, 2026 6:20pm

Request Review

@derrickmehaffy derrickmehaffy merged commit 6f89db5 into main Jun 30, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant