fix: route email trigger path through standard info channel#8996
Conversation
Add an "Email triggers" section to the triggers skill covering the
local-part config, the parsed_email/raw_email/email_extra_args payload,
the URL-style extras convention, where to find trigger_path (only with
a preprocessor, at event.trigger_path), and — most importantly — that
binary attachments are uploaded to the workspace S3 bucket and surface
as `{ s3: "windmill_emails/<job_id>/attachments/<filename>" }`. Scripts
must use wmill.loadS3File / wmill.load_s3_file to read them.
Also pulls EmailTrigger into the schema mappings so a real
`email_trigger.schema.yaml` is generated, and adds Email/Azure to the
trigger kinds list in the CLI agent guidance.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying windmill with
|
| Latest commit: |
9f5c0ee
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0ae147c7.windmill.pages.dev |
| Branch Preview URL: | https://email-trigger-path-attachmen.windmill.pages.dev |
This commit updates the EE repository reference after PR #553 was merged in windmill-ee-private. Previous ee-repo-ref: 318a46897a605dc9be3817901f35ba5a99a0a525 New ee-repo-ref: 26184ab7a4aadfc529dcedf038aa08d36c7ad381 Automated by sync-ee-ref workflow.
|
🤖 Updated |
…tachments # Conflicts: # backend/ee-repo-ref.txt
…into email-trigger-path-attachments
|
/ai-fast review this PR |
|
Claude finished @hugocasa's task in 1m 37s —— View job Review
Verdict: LGTM. Docs are accurate, regenerated artifacts match the base inputs ( A few minor observations — none blocking: 1. Code-fenced JSON example uses non-JSON placeholder
{ "s3": "windmill_emails/<job_id>/attachments/<filename>" }The fence is 2. "URL-style extras" wording
URL extras are usually 3. RFC reference
4. Fallback string is verbatim
5. Schema completeness
6.
|
Summary
Two related fixes for email triggers — the wire-format change is in the EE companion (windmill-labs/windmill-ee-private#553); this PR contains the skill/docs side and the EE ref bump.
What changed in this PR
triggersskill now documents email triggers (was missing entirely). New section insystem_prompts/base/triggers.mdcovers:local_part/workspaced_local_partconfig and thelocalpart+key=value@…URL-extras conventionparsed_email/raw_email/email_extra_argspayload shapetrigger_pathlives after the EE fix (only with a preprocessor, atevent.trigger_path)parsed_email.attachments[i].bodyis{ s3: "windmill_emails/<job_id>/attachments/<filename>" }, must be read viawmill.loadS3File/wmill.load_s3_fileraw_emailbodies, and theparquetserver feature requirementEmailTriggeris now inSCHEMA_MAPPINGS, so the generatedtriggers/SKILL.mdincludes the email-trigger YAML schema next to the others (one combined skill — there is not one skill per trigger type).cli/src/guidance/core.ts.system_prompts/auto-generated/(skill + newemail_trigger.schema.yaml) andcli/src/guidance/skills.gen.ts.What changed in the EE companion
windmill-labs/windmill-ee-private#553 — stops conflating
trigger_pathwith user-supplied URL extras. Before, both were stuffed into the same map and bundled underemail_extra_argsvia a bespokebuild_job_args_v2override. After, URL extras go through the payload,trigger_pathrides the standardinfochannel, and the defaultTriggerJobArgsimpl puts it atevent.trigger_path— same as every other trigger.Breaking change
Scripts that read
email_extra_args.trigger_path(with or without preprocessor) need to switch toevent.trigger_pathand add a preprocessor. Add a clear note in the next release.Test plan
+foo=barextras; confirm the job receivesemail_extra_args = {foo: "bar"}(notrigger_pathmixed in).event.trigger_path,event.kind === "email",event.email_extra_args = {foo: "bar"},event.parsed_email,event.raw_email.wmill.loadS3File(parsed_email.attachments[0].body).🤖 Generated with Claude Code