What is a use case?
A use case is Codika’s deployment unit. It is a folder on disk that contains everything needed to deploy one or more n8n workflows as a single automation to the Codika platform. When deployed, a use case becomes a Process that users can discover, install, and run with their own credentials.Folder structure
Required files
| File | Purpose |
|---|---|
config.ts | Exports WORKFLOW_FILES, getConfiguration(), and optionally getDeploymentInputSchema() and getDefaultDeploymentParameters() |
version.json | Tracks the local semantic version (e.g., {"version": "1.2.3"}). Updated automatically on deploy. |
workflows/*.json | n8n workflow JSON files. Each file listed in WORKFLOW_FILES is packaged and sent to the platform. |
Optional files
| File | Purpose |
|---|---|
project.json | Contains projectId and organizationId. Created by codika-helper init or codika-helper project create --path .. Enables org-aware profile selection. |
deployments/ | Local archive of past deployments. Created automatically by codika-helper deploy. |
config.ts structure
The config file must export these members:Configuration fields
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Display name (2-5 words) |
subtitle | string | No | One-line tagline |
description | string | Yes | 1-2 sentences describing the automation |
workflows | array | Yes | Array of workflow configurations |
tags | string[] | No | Categorization tags |
processDeploymentMarkdown | string | No | Markdown documentation for the process |
Workflow configuration fields
| Field | Type | Required | Description |
|---|---|---|---|
workflowTemplateId | string | Yes | Unique identifier for the workflow |
workflowId | string | Yes | Must match the workflowId parameter in Codika Init node |
workflowName | string | Yes | Display name |
integrationUids | string[] | Yes | Required integrations (e.g., ['google_gmail', 'anthropic']) |
triggers | array | Yes | At least one trigger definition |
outputSchema | array | Yes | Output field definitions (empty array [] for sub-workflows) |
n8nWorkflowJsonBase64 | string | Yes | Base64-encoded workflow JSON |
cost | number | No | Execution cost in credits (0 for sub-workflows) |
markdownInfo | string | No | Workflow-specific documentation |
Version management
Theversion.json file tracks a semantic version:
- Reads the current version
- Bumps it based on the flag:
--patch(default),--minor, or--major - Sends the API version to the platform (X.Y format)
- Writes the new version back to
version.json
| Local bump | Example | API version strategy |
|---|---|---|
--patch (default) | 1.0.0 → 1.0.1 | minor_bump |
--minor | 1.0.1 → 1.1.0 | minor_bump |
--major | 1.1.0 → 2.0.0 | major_bump |
--version 3.0 | Any → explicit | explicit (version 3.0) |