What is a Workspace?
- Overview
- Workspace Structure
A workspace is a project that:
- Enables various Automations inside your organization, connecting your APIs and systems
- Is easily configurable through workspace config, Apps, and automation graphs
- Produces events recording activities and optionally triggering automations
- Presents computed data through Web Pages accessible to admins or external users
- Has configurable roles providing distinct user groups with fine-grained permissions
Workspace Configuration
The workspace config provides centralized settings and parameters for your entire workspace.Basic Configuration
Basic Configuration
Workspace configuration is defined in the workspace source code:The
config.value
field is exposed as a config
variable inside your automations, making these settings accessible throughout your workspace.You can reference other config values within your configuration using the
{{config.PROPERTY}}
syntax, as shown in the LOGIN_URL
example above.Using Secrets
Using Secrets
For sensitive configuration values, use secrets:Secrets provide a secure way to store and use sensitive information like API keys, passwords, and tokens without exposing them in your code.
Secrets with names starting with
prismeai_*
are reserved for super admins to configure system settings by workspace.Environment Variables
Environment Variables
You can also inject configuration values from environment variables:This environment variable would set
config.API_URL
for a workspace with the slug “test”. Workspace config takes precedence over environment variables.Configuration Schema
Configuration Schema
For more controlled configuration, especially for Apps, you can define a schema for your config:This schema defines the structure, types, and defaults for your configuration, providing better validation and documentation.
Workspace Events
Each workspace maintains a continuous real-time stream of events that describe activities and interactions:
- Event Types
- Event Structure
- Working with Events
Workspaces work with two main types of events:
- Native Events: Automatically generated by the platform (updates, webhooks, errors, automation executions, etc.)
- Custom Events: Emitted by your automations or installed apps
Events from workspaces inactive for longer than 15 days and with fewer than 100 events are regularly deleted. Events from deleted workspaces are kept for up to 6 months after deletion.
Activity View
Activity View
The Activity view provides a real-time window into your workspace events:
- Filter Events: Narrow down by event type, source, or time range
- Inspect Details: View complete event data including payload and source
- Track Correlations: Follow chains of related events
- Debug Issues: Identify problems by examining event flows
Workspace Secrets
Secrets provide a secure way to store sensitive information like API keys, passwords, and access tokens.Managing Secrets
Managing Secrets
Workspaces can have secrets provided through:
- The web interface
- API calls
- CI pipeline integration with an external secrets manager
You can manage secrets programmatically using the
/workspaces/:workspaceId/security/secrets
API.Using Secrets
Using Secrets
Secrets can be used in:
- Workspace Configuration:
- Repository Configuration:
Secrets beginning with
prismeai_*
are reserved for super admins to configure system settings.Version Control
Workspace versioning allows you to save the current state of your workspace to a remote git repository, providing backup, history, and collaboration capabilities.Repository Configuration
Repository Configuration
Configure version control in your workspace source code:Different authentication methods are supported:
- Username/Password: For basic authentication
- Personal Access Tokens: For services like GitHub which forbid user password usage from CLI, instead they let you generate a Personal Access Token you will use exactly like a password
- SSH Keys: For secure key-based authentication, see below example.
- read-write (default): Both push and pull operations
- read-only: Only pull operations
- write-only: Only push operations
SSH keys
SSH keys
If you want to use SSH authentication, use the following :Note that the repository url must be prefixed with
git@
when using SSH, and https://
when using user / password authentication.Using Secrets
Using Secrets
You can also use secrets inside repositories config section :
Push and Pull Operations
Push and Pull Operations
Once a repository is configured:Versioning saves the workspace’s static configuration, including security roles, automations, pages, blocks, and apps, but not dynamic data like events, collections, or uploaded files.
- Push: Save the current workspace state to the repository
- Pull: Update the workspace from the repository
A native repository named “Prismeai” is always available for saving versions to the platform’s storage. However, these versions are lost if the workspace is deleted, unlike with external Git repositories.
Excluding Files from Import
Excluding Files from Import
When pulling from a repository, you can exclude specific parts of your workspace from being overwritten:This is useful for preserving local customizations while still getting updates from the shared repository.It is also possible to specify
pull.exclude
option for archive imports using the following system repository (type: archive
) :Import Results
Import Results
After each archive import or repository pull, a This event provides a complete record of what changed during the import.
workspaces.imported
event is emitted with details:Self-Signed TLS
Self-Signed TLS
When trying to authenticate using user/password method against a repository with a self-signed HTTPS certificate, you can receive the following error :This is an infrastructure issue which needs to be solved within
prismeai-workspaces
deployment, by mounting a copy of the /etc/ssl/certs/ca-certificates.crt
file at the same address and adding the git server certificate to it.Custom Domains
You can attach a custom domain to your workspace to display pages under your own domain name.1
Add DNS Record
Add a CNAME entry to your domain pointing to
pages.prisme.ai
For root domains, use an ALIAS record instead of a CNAME.2
Configure Workspace
Add the domain to your workspace configuration:
3
Activate Custom Domain
For Enterprise version, contact support to complete the setup.Contact Support
JSON Schema Form
Workspace configuration often uses JSON Schema Form, a standard for creating declarative complex forms. This is particularly important for app configuration.Basic Schema Form
Basic Schema Form
A schema form starts with a single field, typically of type “object”:This creates a form with two fields, producing an object with “firstname” and “lastname” properties.
Field Types
Field Types
Fields can have various types:
- string: Text input
- localized:string: Translatable text
- number: Numeric input
- localized:number: Translatable numbers
- boolean: Switch button
- localized:boolean: Translatable booleans
- object: Nested object with properties
- array: List of items
- title: Field label
- description: Help text
- default: Default value
- enum: List of allowed values
- enumNames: Display labels for enum values
- required: Whether the field is required
- pattern: Validation regex
- hidden: Whether to hide the field
Advanced Schema Features
Advanced Schema Features
Schema forms support advanced features:Custom WidgetsConditional Fields (oneOf)Arrays and Objects
Form Validation
Form Validation
Schema forms include validation rules. Each rule can just have a true value to display default message with default behavior but can also be an object with value and message. A field can have many validators. The list of validators is :
- required: the value is required
- min: the value as number must be greater than validator value
- max: the value as number must be lower than validator value
- email: the value must be a valid email address
- tel: the value must be a valid phone number
- date: the value must be a valid Date
- minLength: the value as string must have a greater length than validator value
- maxLength: the value as string must have a lower length than validator value
- pattern: the value must match the regular expression set in validator value.
Complete Example
Complete Example
Here’s a more complete schema form example:This form collects personal information with various field types and widgets.