Data & AI

Data Tools

Fetch JSON from HTTP APIs, transform arrays and extract text from PDFs in an OrgSDK action. Local transforms need no stored credential.

View 11 plugin functions ↓

Use Data Tools in a project

  • Fetch and transform JSON from external APIs
  • Extract text, page counts and available metadata from text-based PDFs
  • Chunk, deduplicate and reshape arrays for a report

Access and credentials

Local data and file utilities plus outbound HTTP fetch. No stored credentials and no destructive external actions.

This plugin does not declare a stored credential requirement.

Sort a dataset

In Studio, open your project’s Plugins page and enable Data Tools. Paste this example into an action in the same project.

// Put these three numbers in order from smallest to largest.
return await data.processData({
  "data": [
    3,
    1,
    2
  ],
  "processor": "sort"
});

Workflow examples and guides

Use with OrgSDK

OrgSDK gives external AI clients persistent projects and controlled execution. Plugins add optional tools to those projects. Each run uses pinned plugin versions, and project configuration determines which credentials they can use.

Set up OrgSDK locally ↗

Capabilities

11 functions from this published version. Read calls retrieve or process information; write actions can change data in the connected service.

11 of 11 functions

Convert currency amount from one currency to another. IMPORTANT: Returns OBJECT with {convertedAmount: number, originalAmount: number, rate: number}. Use result.convertedAmount to get the numeric converted value. Example: const result = await convertCurrency(100, 'USD', 'AUD'); const converted = result.convertedAmount; Available rates: USD_TO_AUD=1.53, EUR_TO_AUD=1.67, GBP_TO_AUD=1.92

Parameters and return value
ParameterTypeDetails
amountnumber—
fromCurrencystring—
toCurrencystring—

Returns Promise<{ originalAmount: number; fromCurrency: string; convertedAmount: number; toCurrency: string; rate: number }>

Fetch JSON data from a URL

Parameters and return value
ParameterTypeDetails
urlstring—

Returns Promise<any>

data.sumArray

Read call

Sum all numbers in an array

Parameters and return value
ParameterTypeDetails
numbersnumber[]—

Returns number

Split array into chunks of specified size

Parameters and return value
ParameterTypeDetails
arrayT[]—
sizenumber—

Returns T[][]

data.uniqueBy

Read call

Remove duplicates from array by key

Parameters and return value
ParameterTypeDetails
arrayT[]—
keykeyof T—

Returns T[]

data.groupBy

Read call

Group array items by key

Parameters and return value
ParameterTypeDetails
arrayT[]—
keykeyof T—

Returns Record<string, T[]>

Process data array

Parameters and return value
ParameterTypeDetails
dataany[]—
processorstring—

Returns any[]

Transform data array with various operations

Parameters and return value
ParameterTypeDetails
dataany[]—
transformerstring—
keystring—

Returns any

Save a result to storage

Parameters and return value
ParameterTypeDetails
keystring—
valueany—
storageRecord<string, any>—

Returns { key: string; value: any; saved: boolean }

Validate data against rules

Parameters and return value
ParameterTypeDetails
dataany—
rulesRecord<string, any>—

Returns { valid: boolean; errors: string[] }

data.parsePdf

Read call

Extract text content and metadata from a PDF. Accepts standard base64 string (e.g. from getMessageAttachment().dataBase64). Returns full text, page count, and optional metadata.

Parameters and return value
ParameterTypeDetails
base64Datastring—

Returns Promise<{ text: string; totalPages: number; metadata?: { title?: string; author?: string; subject?: string; creator?: string; producer?: string } }>