Configure Webhooks and Screenshot Settings for Docflows
Note: The standalone Technical Drift Audit feature has been deprecated and superseded by the real-time Docflows.
Docflows provides a proactive approach to preventing documentation drift. Instead of running periodic audits, the system automatically analyzes engineering pull requests (PRs) and Jira tickets as they happen, suggesting documentation changes directly to the writing team.
To enable this feature, configure a webhook for each connected repository or Jira instance. This allows the external service (like GitHub) to securely notify our platform about new activity. You can also configure browser automation settings to capture visual screenshots of your preview environments.
Configuring Webhooks for Automated Suggestions
After connecting a repository or Jira instance in the Admin Dashboard, set up the corresponding webhook to begin receiving automated suggestions.
Step 1: Retrieve Webhook Credentials
- Navigate to the Admin Dashboard page.
- Under the Repositories tab, locate the Active Repositories list.
- Find the repository or service you want to connect and click the Webhook button.
- A dialog appears containing a unique Payload URL and a Secret for that specific integration. Keep this dialog open.
Step 2: Set up the Webhook in GitHub
For each connected code repository, follow these steps in GitHub:
- Navigate to your repository's main page.
- Click Settings > Webhooks > Add webhook.
- Paste the Payload URL from the SudoDocs dialog into the corresponding field.
- Change the Content type to
application/json. - Paste the Secret from the SudoDocs dialog into the corresponding field.
- Under "Which events would you like to trigger this webhook?", select Let me select individual events.
- Deselect Pushes, and select both Pull requests and Issue comments - the latter lets SudoDocs respond when someone comments
@sudodocson a PR to request a fix. - Ensure Active is checked, and click Add webhook.
Once configured, the system begins analyzing new and updated pull requests for that repository, and suggestions appear in Docflows. Every suggestion is generated through the same Information Architect / Technical Writer / Editor review pipeline as manually-created drafts, fully automated - see Doc Team Roles to customize what each role checks for.
Step 3: Set up the Webhook in Jira
For connected Jira instances, follow these steps in your Jira account:
- Navigate to Jira Settings > System.
- Under Advanced, click Webhooks.
- Click Create a Webhook.
- Give the webhook a descriptive name (e.g., "SudoDocs Doc Suggestions").
- Paste the Payload URL from the SudoDocs dialog into the URL field. Note that the Jira URL already contains the secret as a query parameter.
- In the "Issue related events" section, find the Issue subsection and check the box for updated.
- Click Create.
This configuration notifies the system when Jira tickets are moved to a "Done", "Resolved", or "Closed" status, triggering a documentation suggestion.
Configure Screenshot Settings for Docflows
For code repository integrations, SudoDocs can spin up a headless browser using Playwright to take automated screenshots of your preview environments. This helps writers visually verify engineering changes before publishing them.
To configure screenshots for an active repository:
- Go to the Admin Dashboard and select the Repositories tab.
- In the Active Repositories list, find your repository and click Screenshot Settings.
- Enter your Preview URL Pattern (e.g.,
https://pr-{pr_number}.preview.example.com). - Select your environment's authentication method from the Access Method dropdown (see options below).
- Define your Route Map as a list of glob patterns mapped to application routes (e.g.,
templates/admin_dashboard.html => /admin/dashboard). - Click Save Settings.
Supported Access Methods
SudoDocs supports five authentication modes to handle various preview environment configurations:
| Access Method | Configuration Fields | Use Case |
|---|---|---|
| None (publicly reachable) | None | Public staging sites requiring no credentials. |
| HTTP Basic Auth | Username, Password | Sites protected by standard browser-level HTTP authentication. |
| Custom Header | Header Name, Header Value | Staging environments gated by a secret bypass token or header-based gateway. |
| Session Cookie | Cookie Name, Cookie Value | Applications using third-party OAuth or Single Sign-On (SSO) with no local login form. |
| Login Form | Login URL, Username Field, Password Field, Submit Button (CSS Selectors) | Standard applications featuring a username and password form. |
Tip on Session Cookies: To use a session cookie, log into the preview environment manually using a dedicated test account. Open your browser's Developer Tools, copy the session cookie name and value, and paste them into the SudoDocs Screenshot Settings dialog. Because session cookies expire, you must periodically refresh this value.
Tip on Login Forms: Use a dedicated, low-privilege service account for form logins. Define CSS selectors for the fields (e.g.,
#passwordfor the Password Field, andbutton[type=submit]for the Submit Button). SudoDocs reuses the Username and Password fields defined in the Basic Auth section so that credentials are encrypted together.
Troubleshooting Screenshot Failures
If SudoDocs fails to capture screenshots for a Docflow suggestion, a warning banner appears at the top of the suggestion card in the Docflows list:
- Preview environment was unreachable: SudoDocs could not establish a network connection to your preview URL. Check that your staging server is up and accessible from the public internet.
- Login to the preview environment failed: SudoDocs reached the login page but could not authenticate. Verify that your login form CSS selectors, service account username, or password are correct in the repository's Screenshot Settings.