Skip to content

[Improve] Deliver onboarding automation reports by Email as a fallback - #2519

Draft
roomote-roomote[bot] wants to merge 1 commit into
developfrom
improve/onboarding-email-fallback-1i596eakf28oo
Draft

[Improve] Deliver onboarding automation reports by Email as a fallback#2519
roomote-roomote[bot] wants to merge 1 commit into
developfrom
improve/onboarding-email-fallback-1i596eakf28oo

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

​Opened on behalf of @mrubens. View the task or mention @roomote-roomote for follow-up asks.

What changed

  • Resolve onboarding automation report destinations from usable configured chat channels and user direct-message routes before considering Email.
  • Use the owner's available verified Email identity only when no supported chat route is usable.
  • Preserve an existing explicit destination when onboarding re-enables a recommended custom automation.

Why this change was made

Recommended automations should deliver useful reports immediately without replacing communication destinations users have already configured. Email now provides a safe final fallback when no chat route is available.

Impact

Onboarding-created custom automations default to the best existing chat destination, then Email, and otherwise retain the existing no-destination behavior. Existing explicit automation targets are left unchanged.

@roomote-community

roomote-community Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

1 issue outstanding. See task

  • Existing custom report targets still trigger fallback DM resolution (apps/web/src/trpc/commands/setup-new/index.ts:2617).

Reviewed c756ee7

? await getCustomAutomationById(recommendation.automationId, tx)
: null;
const reportTarget = enabled
? await resolveSetupAutomationReportTarget(auth.userId, tx)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reportTarget is resolved before the existing-target guard below. That resolver probes chat DMs; the Slack and Teams probes can open/create a direct-message conversation. Re-enabling a recommendation that already has an explicit destination therefore creates unrelated DM channels (and makes external calls while holding the recommendation transaction lock) even though the result is discarded at line 2628. Resolve the fallback only when the existing target is absent or unconfigured.

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