Function Gateways
Function gateways enrich an object by returning structured data that is written back to the object's fields. Use script type functionGateway.
Echo
Script type: functionGateway
Gateway name: Echo
Reflects input parameters directly back as output. Useful for testing gateway wiring or passing computed formula values to target fields without making an external call.
Input: Any parameters — each input parameter is echoed back to the target field with the same name.
Output: One field per declared target, containing the value of the matching input parameter.
{
"name": "test-echo",
"type": "functionGateway",
"scope": "OBJECT",
"trigger": "MANUAL",
"gateway": "Echo",
"parameters": [
{ "name": "greeting", "value": "hello" }
],
"targets": [
{ "name": "greeting", "actionType": "OVERWRITE" }
]
}
Ai
Script type: functionGateway
Gateway name: Ai
Extracts structured field values from free-form text using Gemini (Vertex AI). Each declared target becomes a typed field in the Gemini response schema. The model omits fields it cannot determine with confidence.
Input parameters:
| Name | Type | Required | Description |
|---|---|---|---|
generalInformation | TEXT | Yes | Source text to extract data from |
usePro | BOOLEAN | No | Use the Pro model instead of Flash (default: false) |
<targetName> | TEXT | Per target | Extraction instruction for that target field (e.g. "The invoice total amount") |
Output: One field per declared target, typed according to the target's dataType. Three meta-fields are also available if declared as targets:
| Name | Type | Description |
|---|---|---|
inputTokens | INTEGER | Prompt token count |
outputTokens | INTEGER | Response token count |
estimatedCost | CURRENCY | Estimated API cost |
{
"name": "extract-contract",
"type": "functionGateway",
"scope": "OBJECT",
"trigger": "MANUAL",
"gateway": "Ai",
"parameters": [
{ "name": "generalInformation", "templateFile": "templates/contractText" },
{ "name": "jobTitle", "value": "The job title, if mentioned" },
{ "name": "startDate", "value": "The contract start date" }
],
"targets": [
{ "name": "jobTitle", "actionType": "OVERWRITE" },
{ "name": "startDate", "actionType": "OVERWRITE" }
]
}
See AI Integrations for model configuration.
DocumentTriage
Script type: functionGateway
Gateway name: DocumentTriage
Classifies an uploaded document into one of a set of candidate types and generates a concise title. Uses Gemini Flash on the first 10,000 characters of the document's Markdown content. The type unknown is always available as a fallback when the model cannot classify with confidence.
Input parameters:
| Name | Type | Required | Description |
|---|---|---|---|
markdownContent | LONGTEXT | Yes | Markdown content of the document (produced by MarkdownConversion) |
<typeKey> | TEXT | At least one | A candidate type key (e.g. incorporation.deed) with a short Dutch description as value |
Output:
| Name | Type | Description |
|---|---|---|
documentType | TEXT | One of the provided type keys, or unknown |
title | TEXT | Concise Dutch document title generated by the model |
{
"name": "triage-document",
"type": "functionGateway",
"scope": "OBJECT",
"trigger": "MANUAL",
"gateway": "DocumentTriage",
"parameters": [
{ "name": "markdownContent", "formula": "markdownContent" },
{ "name": "incorporation.deed", "value": "Notariële akte van oprichting" },
{ "name": "annual.report", "value": "Jaarverslag of jaarrekening" }
],
"targets": [
{ "name": "documentType", "actionType": "OVERWRITE" },
{ "name": "title", "actionType": "OVERWRITE" }
]
}
MarkdownConversion
Script type: functionGateway
Gateway name: MarkdownConversion
Converts an uploaded PDF to Markdown using Google Document AI's Layout Processor. The result is typically passed to DocumentTriage or Ai for further processing.
Input parameters:
| Name | Type | Required | Description |
|---|---|---|---|
file | FILE | Yes | The uploaded PDF binary |
Output:
| Name | Type | Description |
|---|---|---|
markdownContent | LONGTEXT | Markdown representation of the document |
status | TEXT | READY on success, ERROR on failure |
pageCount | INTEGER | Number of pages processed |
{
"name": "convert-pdf",
"type": "functionGateway",
"scope": "OBJECT",
"trigger": "CREATE",
"gateway": "MarkdownConversion",
"parameters": [
{ "name": "file", "formula": "uploadedFile" }
],
"targets": [
{ "name": "markdownContent", "actionType": "OVERWRITE" },
{ "name": "pageCount", "actionType": "OVERWRITE" }
]
}
Invoice
Script type: functionGateway
Gateway name: Invoice
Extracts structured invoice data from an uploaded PDF using Google Document AI's Invoice Processor. Currency amounts are returned as typed CURRENCY values in the document's detected currency.
Input parameters:
| Name | Type | Required | Description |
|---|---|---|---|
file | FILE | Yes | The uploaded invoice PDF |
Output: Structured invoice fields as returned by Document AI's Invoice Processor. Currency fields (e.g. amount, amountDue, taxAmount) are typed as CURRENCY.
{
"name": "process-invoice",
"type": "functionGateway",
"scope": "OBJECT",
"trigger": "CREATE",
"gateway": "Invoice",
"parameters": [
{ "name": "file", "formula": "invoiceFile" }
],
"targets": [
{ "name": "amount", "actionType": "OVERWRITE" },
{ "name": "amountDue", "actionType": "OVERWRITE" },
{ "name": "taxAmount", "actionType": "OVERWRITE" }
]
}
AddressSearch
Script type: functionGateway
Gateway name: AddressSearch
Looks up a Dutch address by postal code and house number via the webservices.nl API. Results are cached for 30 days per unique input combination.
Input parameters:
| Name | Type | Required | Description |
|---|---|---|---|
postalCode | TEXT | Yes | Dutch postal code (e.g. 1234AB, spaces allowed) |
houseNumber | INTEGER | Yes | House number |
houseNumberAddition | TEXT | No | House number addition (e.g. A, bis) |
Output:
| Name | Type | Description |
|---|---|---|
postalCode | TEXT | Normalised postal code (e.g. 1234AB) |
streetName | TEXT | Street name |
houseNumber | TEXT | House number |
houseNumberAddition | TEXT | Addition, if present |
address | TEXT | Full formatted address line |
city | TEXT | City name |
municipality | TEXT | Municipality name |
province | TEXT | Province name |
{
"name": "lookup-address",
"type": "functionGateway",
"scope": "OBJECT",
"trigger": "MANUAL",
"gateway": "AddressSearch",
"parameters": [
{ "name": "postalCode", "formula": "postalCode" },
{ "name": "houseNumber", "formula": "houseNumber" }
],
"targets": [
{ "name": "streetName", "actionType": "OVERWRITE" },
{ "name": "city", "actionType": "OVERWRITE" }
]
}
CompanyExtract
Script type: functionGateway
Gateway name: CompanyExtract
Fetches an official company extract PDF via webservices.nl and stores it as a binary file. Currently available for NL only. Cached for 7 days per registration number.
Input parameters:
| Name | Type | Required | Description |
|---|---|---|---|
countryCode | TEXT | Yes | ISO country code. Currently only NL is supported. |
registrationNumber | TEXT | Yes | 8-digit KvK registration number |
Output:
| Name | Type | Description |
|---|---|---|
uri | TEXT | Binary URI of the stored PDF (/binaries/{uuid}), usable directly as a FILE field value |
referenceDate | DATE | Reference date on the extract (yyyy-MM-dd) |
{
"name": "fetch-company-extract",
"type": "functionGateway",
"scope": "OBJECT",
"trigger": "MANUAL",
"gateway": "CompanyExtract",
"parameters": [
{ "name": "countryCode", "value": "NL" },
{ "name": "registrationNumber", "formula": "kvkNumber" }
],
"targets": [
{ "name": "extractFile", "actionType": "OVERWRITE" },
{ "name": "extractDate", "actionType": "OVERWRITE" }
]
}
CompanyRegister
Script type: functionGateway
Gateway name: CompanyRegister
Enriches a data object with company information from a national business register. Skips the lookup if verificationDate is less than 24 hours ago to prevent redundant API calls. Supports the same countries as CompanySearch.
Input parameters:
| Name | Type | Required | Description |
|---|---|---|---|
registrationNumber | TEXT | Yes* | Company registration number |
countryCode | TEXT | Yes* | ISO country code (see CompanySearch for supported countries) |
key | TEXT | Yes* | Composite key COUNTRY:registrationNumber (e.g. NL:12345678) — alternative to the two fields above |
verificationDate | DATETIME | No | If set and within 24 hours, the lookup is skipped |
* Either key or both registrationNumber + countryCode must be provided.
Output:
| Name | Type |
|---|---|
registrationNumber | TEXT |
legalName | TEXT |
registrationDate | DATE |
startDate | DATE |
endDate | DATE |
noMailing | BOOLEAN |
totalEmployees | INTEGER |
rsin | TEXT |
legalForm | TEXT |
legalFormExtended | TEXT |
primaryActivityCode | TEXT |
primaryActivityDescription | TEXT |
visitAddress | TEXT |
visitPostalCode | TEXT |
visitCity | TEXT |
mailingAddress | TEXT |
mailingPostalCode | TEXT |
mailingCity | TEXT |
verificationDate | DATETIME |
{
"name": "enrich-company",
"type": "functionGateway",
"scope": "OBJECT",
"trigger": "MANUAL",
"gateway": "CompanyRegister",
"parameters": [
{ "name": "registrationNumber", "formula": "kvkNumber" },
{ "name": "countryCode", "value": "NL" },
{ "name": "verificationDate", "formula": "verificationDate" }
],
"targets": [
{ "name": "legalName", "actionType": "OVERWRITE" },
{ "name": "visitAddress", "actionType": "OVERWRITE" },
{ "name": "verificationDate", "actionType": "OVERWRITE" }
]
}
DataEnrichment
Script type: functionGateway
Gateway name: DataEnrichment
POSTs the current data object's field values to a configurable HTTPS endpoint and merges the JSON response back into the data object. Only HTTPS endpoints are accepted.
Input parameters:
| Name | Type | Required | Description |
|---|---|---|---|
_apiEndpoint | HYPERLINK | Yes | The HTTPS endpoint to POST to |
_header_<name> | TEXT | No | Additional request headers (e.g. _header_Authorization) |
<fieldName> | any | No | Any non-_ parameter is included in the request body |
Output: The JSON object returned by the endpoint, merged directly into the declared targets.
{
"name": "enrich-external",
"type": "functionGateway",
"scope": "OBJECT",
"trigger": "MANUAL",
"gateway": "DataEnrichment",
"parameters": [
{ "name": "_apiEndpoint", "value": "https://api.example.com/enrich" },
{ "name": "_header_Authorization", "formula": "concat(\"Bearer \", apiToken)" },
{ "name": "companyId", "formula": "externalId" }
],
"targets": [
{ "name": "enrichedStatus", "actionType": "OVERWRITE" }
]
}