Add setup guides to your connector configuration that users can access programmatically
When you build a custom connector, you can embed step-by-step setup guides directly in the connector YAML configuration. These guides are exposed through the StackOne API’s /actions endpoint and can be rendered in your own documentation, dashboards, or integration hubs.
authentication: - custom: type: custom label: API Key support: guides: config: # Account linking guide (for end-users/resource owners) warning: "Admin access required to generate an API key." sections: - title: Generating an API Key content: | Instructions for finding the API key. steps: - title: Navigate to Settings content: | Go to Settings > API in your account. - title: Create Key content: | Click Generate API Key and copy it. authorization: type: bearer token: $.credentials.apiKey configFields: - key: apiKey label: API Key type: password required: true secret: true
Critical: Set support.link to the URL where you’ll render these guides in your own documentation or dashboard. The Integration Hub uses this link to direct users to your rendered guides. If not set, the Hub will link to StackOne’s generic documentation instead of your custom instructions.
The content and list fields contain plain strings. To render markdown formatting, use a markdown parser in your rendering code. Common patterns include:
Links:[Provider Dashboard](https://example.com/dashboard) → Parse with markdown renderer to create clickable links
Bold:**Settings** for UI elements → Parse to render as <strong>Settings</strong>
Code:`https://api.example.com` → Parse to render as <code>https://api.example.com</code>
The API returns raw strings with markdown syntax. You’re responsible for parsing and rendering them. Use libraries like react-markdown, marked, or similar, and always sanitize HTML output with tools like DOMPurify to prevent XSS attacks.
Preview Feature: Scope definitions and scope-aware guides are under active development. The structure and behavior may change. Currently used primarily for OAuth scopes, but designed to support any action requirements (pricing tiers, platform configuration, feature flags, etc.).
Define action requirements in scopeDefinitions at the connector root level. While commonly used for OAuth/API scopes, these can represent any prerequisite needed to enable an action.
scopeDefinitions: employees:read: description: Read employee data employees:write: description: Create and update employee records includes: employees:read # Write includes read
Scopes aren’t limited to API permissions. Use them to represent pricing tiers (plan:enterprise), platform features (feature:advanced_reporting), or configuration requirements (config:sso_enabled).
guides: config: sections: - title: Read Permissions applicableScopes: employees:read # Only show this section when this scope selected steps: - title: Enable Read Access content: | Grant read permissions in the admin panel. - title: Write Permissions applicableScopes: employees:write # Only show this section when this scope selected steps: - title: Enable Write Access content: | Grant write permissions for creating/updating employees.
Use displayScopes: true to show which actions a step enables:
steps: - title: Select API Scopes content: | Choose the scopes you need based on your use case. displayScopes: true applicableScopes: employees:read employees:write departments:read # Space-separated list
When rendered, this shows badges indicating which actions are enabled by these requirements (scopes, features, etc.).
authentication: - custom: type: custom label: API Key support: description: Admin privileges required guides: config: warning: "Admin access to your account is required to generate an API key." sections: - title: Generating an API Key content: | Generate an API key from your admin dashboard. steps: - title: Sign in and open API settings content: | Sign in to your [Provider account](https://app.provider.com/signin). list: - Click **Settings** in the top navigation - Select **API** from the sidebar - Click **Create API Key** - title: Name and create the key content: | Give your API key a descriptive name. list: - "**Name:** Enter 'StackOne Integration'" - Click **Generate Key** - title: Copy the API key content: | Copy your new API Key and store it securely. list: - This key will only be shown once - Save it in a secure password manager authorization: type: bearer token: $.credentials.apiKey configFields: - key: apiKey label: API Key type: password required: true secret: true placeholder: sk_live_abc123def456 description: Generate via Settings > API in your Provider account environments: - key: production name: Production
Use a proper Markdown parser (like react-markdown or marked) with HTML sanitization (like DOMPurify) instead of regex replacements. The example below is simplified for demonstration and should not be used in production without proper sanitization.
function filterByRequirements( sections: GuideSection[], selectedRequirements: string[]): GuideSection[] { return sections.filter(section => { if (!section.applicableScopes) return true; // Show section if any of its requirements are met return section.applicableScopes.some(req => selectedRequirements.includes(req)); });}
If you see a warning about Unknown field 'guides', update your CLI to the latest version with npm install -g @stackone/cli@latest. The guides field is fully supported at runtime.
<Warning> Admin privileges required.</Warning>## Finding Your API Key<Steps> <Step title="Open Settings"> Navigate to Settings > API Keys. - Click **Generate Key** - Copy the key immediately </Step></Steps>
To YAML:
guides: config: warning: "Admin privileges required." sections: - title: Finding Your API Key content: | Generate your API key from the admin dashboard. steps: - title: Open Settings content: | Navigate to Settings > API Keys. list: - Click **Generate Key** - Copy the key immediately