eavz

Executing Actions

Execute integration actions to interact with third-party services through a unified API.

Actions are the core way to interact with third-party services through Weavz. Each integration exposes a set of actions — like sending a Slack message, creating a GitHub issue, or reading a Google Sheet.

Execute an Action

1

Open the Playground

Navigate to the Playground from the sidebar.

2

Select the Actions tab

Click the Actions tab at the top of the Playground.

3

Pick an integration

Choose the integration you want to use (e.g., Slack).

4

Choose an action

Select a specific action (e.g., Send Channel Message).

5

Fill in inputs

Enter the required parameters — channel ID, message text, etc.

6

Execute

Click Execute and view the output in the result panel below.

Request Parameters

ParameterRequiredDescription
integrationNameYesIntegration identifier (e.g., slack, github, openai)
actionNameYesAction identifier (e.g., send_channel_message, create_issue)
inputYesAction-specific input parameters (object)
workspaceIdYesWorkspace scope for connection resolution and partials
connectionExternalIdNoExternal ID of the connection to use
integrationAliasNoAlias of the workspace integration to resolve. Useful when the same integration is configured multiple times in a workspace.
endUserIdNoYour end-user's identifier for per-user connection resolution

Using Connection External IDs

The simplest way to specify which connection to use is by external ID:

bash
curl -X POST https://api.weavz.io/api/v1/actions/execute \
  -H "Authorization: Bearer wvz_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "slack",
    "actionName": "send_channel_message",
    "input": { "channel": "C01ABCDEF", "text": "Hello!" },
    "connectionExternalId": "my_slack_connection"
  }'

Using Workspace Context

When a workspace has configured integrations, you can let the workspace's connection strategy resolve the connection automatically:

bash
# Let workspace integration configuration resolve the connection
curl -X POST https://api.weavz.io/api/v1/actions/execute \
  -H "Authorization: Bearer wvz_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "slack",
    "actionName": "send_channel_message",
    "input": { "channel": "C01ABCDEF", "text": "Hello!" },
    "workspaceId": "proj_abc123"
  }'
bash
# Target a specific alias when the same integration has multiple configurations
curl -X POST https://api.weavz.io/api/v1/actions/execute \
  -H "Authorization: Bearer wvz_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "slack",
    "actionName": "send_channel_message",
    "input": { "channel": "#alerts", "text": "Alert!" },
    "workspaceId": "proj_abc123",
    "integrationAlias": "slack_bot"
  }'

Connection Resolution

When you execute an action, Weavz resolves which connection to use based on the parameters you provide and the workspace's configured integrations:

  1. Explicit connectionconnectionExternalId directly specifies the connection
  2. Workspace integration — if workspaceId is set, the workspace's integration configuration determines the connection based on its strategy (fixed, per_user, or per_user_with_fallback)
  3. Fallback — if no workspace integration or explicit connection is found, returns a CONNECTION_REQUIRED error

Error Handling

typescript
import { WeavzClient, WeavzError } from '@weavz/sdk'
 
const client = new WeavzClient({ apiKey: 'wvz_your_key' })
 
try {
  const { output } = await client.actions.execute('slack', 'send_channel_message', {
    input: { channel: 'invalid', text: 'Hello!' },
    connectionExternalId: 'my_slack',
  })
} catch (err) {
  if (err instanceof WeavzError) {
    console.error('Code:', err.code)     // e.g., "ACTION_FAILED"
    console.error('Status:', err.status) // e.g., 400
    console.error('Message:', err.message)
    console.error('Details:', err.details)
  }
}

Common Error Codes

CodeStatusDescription
ACTION_FAILED400The action failed during execution
CONNECTION_REQUIRED400The action requires a connection but none was resolved
CONNECTION_NOT_FOUND404The specified connection does not exist
INTEGRATION_NOT_FOUND404The integration name is invalid
NOT_FOUND404The action name is invalid for this integration
VALIDATION_ERROR400Input parameters failed validation
QUOTA_EXCEEDED403Monthly action quota reached
RATE_LIMITED429Too many requests — slow down

Discovering Available Actions

List all available integrations and their actions:

bash
# List all integrations
curl https://api.weavz.io/api/v1/integrations \
  -H "Authorization: Bearer wvz_your_key"
 
# Get details for a specific integration
curl "https://api.weavz.io/api/v1/integrations?name=slack" \
  -H "Authorization: Bearer wvz_your_key"

The integration details include all available actions with their input schemas, making it easy to discover what's possible.

Using Input Partials

Input partials are saved parameter presets that pre-fill action inputs. They are scoped to a workspace and can be assigned to specific integrations or actions. When a partial is active, its values are merged into the action input automatically — and enforced keys cannot be overridden at runtime.

This is useful for setting default channels, repositories, or other parameters that should remain consistent across executions. See the Playground guide for how to create and manage partials from the dashboard.