Notifications & emails

Two layers of notifications: per-link channels (where you want pings sent) and lifecycle emails (sent automatically when something matters).


Two layers

flowchart TD
    Event[Something happens] --> Branch{Per-link<br/>or lifecycle?}
    Branch -->|New batch ready| Channels[Per-link channels<br/>email, Slack, Teams,<br/>Google Chat, webhook]
    Branch -->|Account-level events| Acct[Account webhooks<br/>JSON to your endpoint]
    Branch -->|Lifecycle moments| Mail[Lifecycle emails<br/>direct to your inbox]

Per-link channels

Each repo link decides where its notifications go.

Channel Plan
Email Any plan
Slack Enterprise / Unlimited
Microsoft Teams Enterprise / Unlimited
Google Chat Enterprise / Unlimited
Generic webhook (HMAC-signed) Enterprise / Unlimited

The Notify on new suggestions master switch controls all channels for that link. Off = nothing sends, not even email.

Quick map

flowchart LR
    A[Open Space settings] --> B[Expand the link]
    B --> C[Pick a channel]
    C --> D[Paste the webhook URL<br/>or tick Email]
    D --> E[Save]

Email

On by default when the master toggle is on. Sent to whoever created the repo link. Untick the Email box to silence it without affecting other channels.


Slack

You'll need a Slack workspace where you can install apps.

Steps

  1. Go to api.slack.com/apps -> Create New App -> From scratch.
  2. Name it, for example DocuWriter Autopilot, and pick your workspace.
  3. In the left menu, open Incoming Webhooks and toggle Activate Incoming Webhooks on.
  4. Click Add New Webhook to Workspace, pick the channel, and authorize.
  5. Copy the webhook URL, which starts with https://hooks.slack.com/services/....
  6. In DocuWriter -> Space settings -> expand the repo link -> tick Slack and paste the URL -> Save.

What you get: a message in the channel each time a new batch is ready, with a Review suggestions button that opens the batch in DocuWriter.

Slack official guide: Sending messages using incoming webhooks


Microsoft Teams

Microsoft recommends the Workflows app for incoming webhook-style messages in Teams.

Steps

  1. In Teams, open the channel where you want notifications.
  2. Click the three dots next to the channel name -> Workflows.
  3. Search for the template Post to a channel when a webhook request is received.
  4. Click the template -> Next -> confirm the team and channel -> Add workflow.
  5. Copy the webhook URL Teams shows you.
  6. In DocuWriter -> Space settings -> expand the repo link -> tick Microsoft Teams and paste the URL -> Save.

What you get: an Adaptive Card in the channel with the Space name, repo, branch, and a review action.

Microsoft official guide: Create incoming webhooks with Workflows for Microsoft Teams


Google Chat

You'll need a Business or Enterprise Google Workspace account, and your admin needs to allow incoming webhooks.

Steps

  1. In Google Chat, open the space where you want notifications.
  2. Click the space title -> Apps & integrations -> + Add webhooks.
  3. Give it a name, for example DocuWriter Autopilot, and an optional avatar URL -> Save.
  4. Click More -> Copy link to get the webhook URL.
  5. In DocuWriter -> Space settings -> expand the repo link -> tick Google Chat and paste the URL -> Save.

What you get: a Google Chat card with the Space, repo, branch, and a review action.

Google official guide: Build a Google Chat app as a webhook Do not share your webhook URL publicly. Anyone with the link can post to your space.


Generic webhook (n8n, Zapier, your own service)

A simpler, per-link alternative to the account-level Webhooks system.

Steps

  1. In DocuWriter -> Space settings -> expand the repo link -> tick Webhook.
  2. Paste your endpoint URL.
  3. Optionally add a secret. Every request is signed with HMAC-SHA256; the signature lands in the X-DocuWriter-Signature header as sha256=<hex>.
  4. Save.

Payload

{
  "event": "repository_sync.suggestions_ready",
  "space": { "id": 123, "name": "My Space" },
  "link": {
    "id": 456,
    "provider": "github",
    "repository": "org/repo",
    "branch": "main"
  },
  "batch": { "id": 789, "suggestion_count": 4 },
  "review_url": "https://app.docuwriter.ai/space/123/repository-sync/batch/789"
}

If you verify the signature, do it against the raw request body before any JSON parsing re-serializes it. That is the most common cause of mismatches.


Account webhooks

Use account webhooks when you want to wire DocuWriter into n8n, Zapier, Make, or your own backend at the account level, not just one repo link.

Events

Event Fires when
repository_sync.suggestions_ready A new batch is ready
repository_sync.suggestion_applied Someone applies a suggestion
repository_sync.suggestion_discarded Someone discards a suggestion
generation.created / generation.updated Any generation is created or updated

Every request includes:

Header Value
X-DocuWriter-Signature sha256=<hash>
X-DocuWriter-Event Event name
User-Agent DocuWriter-Webhook/1.0

Set up: Profile -> Settings -> Integrations -> enter URL -> pick events -> Create webhook subscription. To verify delivery, trigger one of the selected events and inspect Webhook logs.

Full payload examples and a Node.js verification snippet live in Webhooks.


Lifecycle emails

Emails we send at the right moment to help you get value from Autopilot. Each email has its own unsubscribe link in the footer.

Email When you get it
First suggestion ready Your first Autopilot suggestion lands
Apply dismissed re-engagement You discarded several suggestions in a row
Has link no events Repo connected but no PRs / pushes for a while
Apply threshold reached You hit milestone counts of applied suggestions
Inbox dormancy digest Suggestions piling up unread
Connect repo nudges (Day 2 / 5 / 10 / 20) Account active but no repo connected yet
Preview daily digest Suggestions you did not see today because of cap overflow
Preview limit reached You hit the 50/day Preview cap
Churned activity Account inactive and there is activity you missed

The per-link master toggle does not silence lifecycle emails. They unsubscribe individually from each email's footer.


Troubleshooting

Issue What to check
No notification at all Master toggle is on for the link
Slack / Teams / Google Chat option disabled Space owner needs Enterprise or Unlimited
Webhook returning errors Endpoint must be reachable from the public internet
Signature mismatch Verify against the raw body, not a re-serialized version
Lifecycle email I do not want Use the unsubscribe link in that email's footer