Action that converts values between different units of measurement. Supports length, weight, temperature, volume, area, speed, and time conversions.

Example

// Convert miles to kilometers
await runAction({
ActionName: 'Unit Converter',
Params: [{
Name: 'Value',
Value: 5
}, {
Name: 'FromUnit',
Value: 'miles'
}, {
Name: 'ToUnit',
Value: 'kilometers'
}]
});

// Convert temperature
await runAction({
ActionName: 'Unit Converter',
Params: [{
Name: 'Value',
Value: 32
}, {
Name: 'FromUnit',
Value: 'fahrenheit'
}, {
Name: 'ToUnit',
Value: 'celsius'
}]
});

Hierarchy (view full)

Constructors

Properties

conversions: Record<string, Record<string, number>> = ...

Methods

  • Executes the action with the provided parameters.

    Parameters

    • params: RunActionParams<any>

      The action execution parameters including context

    Returns Promise<ActionResultSimple>

    Promise resolving to the action result