Email sequences: Nylas staging setup
This is a closed-beta, send-only integration. Staging is not a production approval and API acceptance is not proof of delivery.Required configuration
NYLAS_API_URI is optional and defaults to the US API. For local automated
tests, set EMAIL_PROVIDER_MOCK_MODE=true; this bypasses real credentials.
SMARTLEAD_MOCK_MODE remains only as a temporary compatibility alias.
Do not configure Google or Microsoft OAuth secrets in Brein. Nylas hosts OAuth
and manages provider tokens. Brein stores only the returned grant id.
Controlled staging run
- Configure a Nylas application and exact redirect URI.
- Enable one controlled Brein workspace only.
- Connect a Brein-controlled Google sender and verify the consent screen asks
for
gmail.send, not inbox-read scope. - Create a campaign with one controlled, explicitly authorized recipient.
- Review the rendered recipient message, confirm, authorize step 1, activate, and capture the Nylas accepted response separately from mailbox delivery.
- Verify the visible unsubscribe URL creates local suppression and that later pending messages become skipped.
- When the next step becomes due, verify no send occurs before a new human authorization, then authorize it and observe one send.
- Pause, disconnect, and delete the grant. Verify the sender is unusable and no campaign resumes automatically.
- Repeat with Microsoft, explicitly checking the broader permission copy.
- Attempt every operation from a second workspace and verify denial.
Rollback
SetEMAIL_CAMPAIGNS_ENABLED=false first. Pause any active Brein campaigns,
revoke controlled Nylas grants, and keep the local audit rows. Do not remap a
Nylas grant to a legacy provider or another workspace. The provider migration is not a
reason to activate or modify real customer campaigns.
The complete privacy and provider release gates are in
docs/trust/nylas-send-only.md.