Get Integration Form
Fetch the input form schema for a specific integration resource and operation. This tells you which fields are required to execute an activity, their types, defaults, and validation rules.
Returns either a flat object with default values or a JSON Schema describing the expected input shape.
Function Signature
client.workflow.getIntegrationForm(params: GetIntegrationFormParams): Promise<BolticSuccessResponse<Record<string, unknown> | IntegrationFormJsonSchema> | BolticErrorResponse>
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
integration_slug | string | ✅ | — | Integration identifier (e.g., "blt-int.asana") |
resource | string | ✅ | — | Resource type (e.g., "project", "task") |
operation | string | ✅ | — | Operation type (e.g., "create", "update", "read") |
secret | string | ✅ | — | Credential secret for the integration |
asJsonSchema | boolean | ❌ | false | When true, returns a JSON Schema object instead of flat defaults |
Get Default Values
Returns a flat object with default/fallback values for each input field. Fields like resource and operation are automatically excluded. The secret field is populated with the provided credential.
import { createClient } from "@boltic/sdk";
const client = createClient("your-api-key");
const result = await client.workflow.getIntegrationForm({
integration_slug: "blt-int.asana",
resource: "project",
operation: "create",
secret: "credential-secret-here",
});
if (result.error) {
console.error("Failed:", result.error.message);
} else {
console.log("Default values:", result.data);
// { name: '', workspace: [], team: '', secret: 'credential-secret-here', ... }
}
Get JSON Schema
Returns a JSON Schema object describing the expected input shape with types, required flags, defaults, and enum options:
const result = await client.workflow.getIntegrationForm({
integration_slug: "blt-int.asana",
resource: "project",
operation: "create",
secret: "credential-secret-here",
asJsonSchema: true,
});
if (!result.error) {
console.log("Form schema:", JSON.stringify(result.data, null, 2));
// {
// type: 'object',
// properties: {
// name: { type: 'string', required: true, default: '', description: '...' },
// workspace: { type: 'array', required: false, default: [], ... },
// ...
// }
// }
}
Workflow: Discover → Inspect → Execute
Combine getIntegrationResource and getIntegrationForm to dynamically discover and execute integrations:
const client = createClient("your-api-key");
// 1. Get available resources and operations
const resources = await client.workflow.getIntegrationResource({
integration_slug: "blt-int.asana",
});
// 2. Get the form schema for a specific resource + operation
const form = await client.workflow.getIntegrationForm({
integration_slug: "blt-int.asana",
resource: "task",
operation: "create",
secret: "my-asana-secret",
});
// 3. Fill in the form values and execute
if (!form.error) {
const defaults = form.data as Record<string, unknown>;
defaults.name = "New Task from SDK";
defaults.workspace = ["workspace-id"];
const result = await client.workflow.executeIntegration({
data: {
type: "apiActivity",
name: "create-task",
properties: {
...defaults,
integration_slug: "blt-int.asana",
},
},
});
console.log("Task created:", result.data);
}
JSON Schema Response Structure
interface IntegrationFormJsonSchema {
type: "object";
properties: {
[fieldName: string]: {
type: string; // 'string', 'number', 'boolean', 'array', 'object'
required?: boolean;
default?: unknown;
description?: string;
enum?: string[]; // Available options for select fields
};
};
}