* Renumber the workspace-level integrations ADR to 017 and mark it accepted * Correct ADR 017 where the endpoint list and the promotion of Local Baserow integrations differ from the code
17 KiB
ADR 017: Workspace-level integrations
| Status | Accepted |
| Date | 2026-10-29 |
| Issue | https://github.com/baserow/baserow/issues/6015 |
| Author | Tsering Paljor (@paljort) |
| Contributors |
Summary
Integrations currently belong to individual applications, so the same SMTP connection or Local Baserow identity must be configured and maintained separately in every app that uses it.
Admins will be able to create workspace-level integrations in Workspace settings or promote existing ones for use across applications in the workspace. A hidden shared application will own them, preserving the existing Integration → Application → Workspace model.
Published apps and workflows will receive independent copies; duplicates and snapshots within the workspace will retain their references. Workspace exports and templates will flatten workspace integrations to the app level.
Context
Integrations hold the credentials and identity that services in Builder apps, Automations and Dashboards use, such as an SMTP connection or a Local Baserow identity. Every integration belongs to exactly one application today, so an editor who uses the same connection in several apps sets it up and maintains each copy independently.
Workspace admins need to configure such an integration once and make it available to every app in the workspace, either by creating it at workspace level or by promoting an integration that already exists in an app, which makes that integration available to the whole workspace while the original app keeps using it. App builders need to pick it when configuring a service, the same way they pick an app-level one. Credential changes should reach every editor app without being re-entered.
In scope for v1:
- Workspace integration management and use.
- Promotion from an app.
- Behaviour during publishing, duplication, snapshots, workspace export/import, templates and trash.
Immediate follow-ups to v1:
- Usage counts on delete.
- Removal of lazy creation and the backfill task, once a data migration guarantees every workspace has a shared application.
In scope for v2:
- Publishing credential changes independently of app changes.
- Bulk replacement of references.
- Builder-managed sharing.
Glossary
| Term | Meaning |
|---|---|
| App | Any application that can own integrations: a Builder app, an Automation, etc. |
| Shared application | The hidden application owned by a workspace. |
| Workspace integration | An integration owned by the shared application. |
| Promotion | Making an integration that belongs to one app available to every app in the workspace. |
| Published copies | Published Builder apps, published Automation workflows and workflow test clones. |
Decision
1. A hidden shared application owns the workspace integrations
Each workspace will have one hidden application of a new shared type. New workspaces receive it when they are created. Existing workspaces are backfilled by a background task after deployment, and until that task has reached a workspace, listing its applications creates the shared application if it is missing.
A workspace integration remains an ordinary Integration owned by this shared application. Integration has a foreign key to Application, and existing code depends on that ownership chain: Local Baserow uses application.workspace for context, application types determine the supported integration types, services validate integration ownership when saved, imported and dispatched, and publishing, duplication and snapshots go through export/import. Keeping the chain intact retains that behaviour and the existing permission scoping without a second lookup path, and follows the Builder's hidden __shared__ page precedent.
The shared application remains accessible through existing application managers and APIs, so that nothing which resolves it needs a separate lookup path, but is hidden from user-facing application lists. It cannot be managed as an ordinary application, and features such as exports, templates, trash listings and statistics must explicitly exclude it where appropriate.
In the trash, a workspace integration is listed under the workspace; the shared application is never shown as a parent.
The background task does the one-off backfill in batches after the rollout, instead of a data migration that would run before it. Until the task has reached a workspace, the new code can meet a workspace whose shared application does not exist yet, which is what the lazy creation in the listing covers. Its downsides are small for one release: a write on a read endpoint, taken under the workspace row lock so that concurrent listings cannot create two, and code that is soon obsolete. The next release adds a data migration that creates any missing shared applications and removes both the lazy path and the task.
2. Managed in Workspace settings, through the existing integration API
Workspace integrations are created, edited and deleted in an Integrations tab in the Workspace settings modal, alongside AI Providers and Snapshots. Everyone who may list them can open the page; the management actions follow the Admin-only permissions of decision 6, and a Local Baserow integration shows there the identity it runs as, as in decision 7.
Inside an app, a workspace integration is picked through the integration selector of decision 3. Promotion is triggered from the app's own integration settings by an Admin, after which the integration appears in Workspace settings and in the workspace group of the selector in every app.
Workspace integrations are created, updated, ordered, deleted and promoted through the existing integration endpoints, addressed at the shared application, and the backend chooses the workspace-level or app-level permission operation by whether the target application is the shared one. One read endpoint is added, GET /api/application/{application_id}/workspace-integrations/: it returns the shared application and the workspace integrations the given application can use (decision 7), to anyone who may list that application's integrations (decision 6). The Workspace settings page learns the shared application's id from the application list, which is why that listing is where lazy creation lives (decision 1). Inside an app the frontend takes it from the new endpoint, because the application list leaves the shared application out for someone whose only role is on that app.
3. A service or user source may use an integration of its own application or of the workspace
Ownership validation will accept an integration owned either by the application of the service or user source, or by the shared application of the same workspace.
Cross-workspace references remain invalid. Integration selectors will distinguish app-level and workspace-level choices.
4. Published copies get their own copy, duplicates and snapshots keep the link
Publishing copies each referenced workspace integration into the published copy as an app-level integration. Published content therefore does not depend on an editable workspace integration: changing or deleting the workspace integration cannot directly disrupt a published copy.
The trade-off is that credential changes, including urgent rotations, do not propagate to published copies. Each affected app or workflow must be republished until integration-only publishing is available; a full republish may also expose unrelated changes that are not ready to go live.
By contrast, duplication and snapshot creation/restoration within the same workspace retain the workspace integration reference. They use its current configuration, not a historical snapshot of its settings. This reference-preserving rule does not apply to workspace imports or templates, even into the same workspace (decision 5).
5. Workspace exports and templates flatten to the app level
Workspace exports and templates include referenced workspace integrations as app-level integrations, with sensitive fields stripped using the existing export rules.
Each imported app receives its own copy; shared ownership is not preserved, even when importing into the original workspace. Local Baserow copies are re-authorised to the importer, while integrations such as SMTP require their credentials to be configured again.
This retains a common export/import path and avoids leaving services without integrations after import. The cost is duplication: three apps using one workspace integration produce three app-level integrations on import. Consolidating them afterwards is an Admin task using the ordinary tools: promote one copy and repoint the other services to it, by hand in v1 and with bulk replacement once it exists. Import itself will not recreate workspace-level ownership: exporting a workspace integration once in a dedicated section would have required its own import handling, creation of the shared application during import and an Admin permission on the importer, for a result that promotion and bulk replacement reach anyway.
6. Admins manage, Builders list
Workspace-scoped permissions will allow Builders to list and select workspace integrations, while only Admins may create, update, order, delete or restore them. The operations are separate from app-level integration permissions: because the shared application belongs to the workspace, reusing existing Builder-level operations could unintentionally grant management rights over integrations used by other apps.
Someone who is a Builder of a single application, with no workspace role that lets them build, may also see and select the workspace integrations, but only from that application. Anyone who can list an application's integrations can use its workspace integrations from it, just as everyone who can edit an application already uses the access of the integrations it holds. This is the group workspace integrations are meant to serve, such as agencies and contractors given one application. An Admin who wants to keep an integration away from them keeps it at the application level. Only the workspace settings page needs the workspace-level permission.
Roles can't be assigned on the shared application itself, and nobody can be invited to it, so the workspace role alone decides who manages workspace integrations. A role on the shared application would otherwise reach updating, deleting and restoring them, but not creating, listing or ordering them.
7. Every integration type an app can use from the workspace is allowed
The shared application will support every integration type that isn't limited to particular applications. In particular, a Local Baserow integration authorised as a person will make that identity clear wherever it is selected (for example, “Runs as [person] in all applications in this workspace”).
This deliberately makes an authorised identity usable across applications: a Builder who can select the integration may use capabilities available through that identity. The Admin-only management rule and visible identity are the v1 controls; this broader reach is an accepted security consequence.
An application is only offered, and only shown, the workspace integrations of a type it can use. A database, whose buttons only send through SMTP and Slack integrations, is never sent a Local Baserow integration or the databases, tables and views its identity can reach, and a dashboard, whose data sources always use its own integration, is sent none. Otherwise someone with a role on that one database would learn the structure of databases they have no access to, through an application that can't use the integration.
The only type limited to particular applications today is the MCP server: an agent only reads the MCP servers it owns, so a workspace MCP server would do nothing, and promoting one would take it away from its agent.
8. Promotion only, as a one-row move
An Admin may promote an existing app-level integration by moving its application reference to the workspace's shared application. Promotion moves the existing integration rather than creating a copy, preserving existing references. Only Admins may promote integrations. The original app's services and user sources continue to work under decision 3; published copies remain unchanged.
Promotion is undoable unless new services or user sources began referencing the integration after the move, in which case moving it back could break them.
A dashboard's integration is not promoted. Dashboards have no integration selector: every new data source takes the dashboard's own integration, so promoting it would leave new widgets without one, with no way to repair them from the dashboard. Promotion opens up to dashboards once their data sources can choose an integration.
A Local Baserow integration authorised as a person other than the promoting Admin is re-authorised as that Admin when it is promoted, and the promotion dialog says so. Undoing the promotion moves the integration back but doesn't restore the previous person's authorisation, which only that person can give again. An integration that runs as a workspace identity (ADR 013) keeps that identity. Workspaces with duplicate integrations can promote one and manually repoint other apps' services to it in v1. Bulk replacement is deferred to v2. Demotion is not offered; an Admin who wants to stop sharing an integration deletes it and recreates it at the app level.
Options considered
| Option | Why not |
|---|---|
| Create the shared application by a data migration before the rollout | Blocks the deployment until every workspace is processed; the background task does the same work in batches after the rollout, with lazy creation covering the gap. |
| Let published copies directly reference workspace integrations | Shared edits or deletion could immediately affect live apps and workflows. |
| Omit workspace integrations from exports | Imported services would lose their integrations, with no bulk repair path; templates also need portable copies. |
| Reuse app-level integration permissions | Could allow Builders to manage shared integrations through the existing ownership chain. |
Consequences
- Benefit: Multiple editor applications can use one integration and receive its current configuration without maintaining separate copies. The existing integration model and most of its infrastructure remain intact.
- Maintenance cost: The shared application appears in ordinary backend application queries. Application-wide features must deliberately exclude or protect it where necessary, including aggregate counts.
- Editor availability: Deleting a workspace integration breaks editor services that reference it, including those in duplicates and restored snapshots, until it is restored from trash; published copies remain unaffected.
- Publishing cost: Credential rotation across published copies requires republishing each affected app or workflow. Pushing integration changes without publishing unrelated app changes is deferred.
- Portability cost: Workspace imports and templates produce app-level copies rather than preserving shared ownership.
- Security boundary: Workspace integrations can make an authorised Local Baserow identity usable from multiple apps; Builders may select but not manage these integrations.
- Follow-ups: Usage counts on delete; removal of lazy creation and the backfill task once a data migration guarantees every workspace has a shared application.
- v2 candidates: integration-only publishing; bulk “Replace with” for services and user sources; and potentially allowing Builders to share integrations.
Revisit triggers
- Reconsider the hidden shared application if excluding it from general application operations becomes a recurring source of defects or disproportionate maintenance work.
- Reconsider independent published copies if central credential rotation requires stronger consistency or a faster operational response than republishing can provide.
- Reconsider snapshot reference semantics if users need restored snapshots to recover historical integration settings.
- Reconsider flattened exports if preserving sharing across workspace imports becomes a core requirement.
- Reconsider Admin-only management if workspace workflows require Builders to share integrations directly.