Skip to main content

Gateway Scripts

Gateway scripts call external services registered with the platform. There are two kinds: consumer gateways (fire-and-forget) and function gateways (enrichment — they return data that is written back to the object).

Consumer Gateway

A consumer gateway calls an external service and does not return a result. Typical use cases: sending emails, triggering webhooks, posting notifications.

{
"name": "invite",
"type": "consumerGateway",
"scope": "OBJECT",
"trigger": "MANUAL",
"gateway": "UserInvitation",
"parameters": [
{
"name": "email",
"dataType": "EMAIL",
"formula": "emailAddress"
},
{
"name": "subject",
"dataType": "TEXT",
"value": "Invitation to join"
},
{
"name": "message",
"dataType": "TEXT",
"templateFile": "templates/personInvitationMailText"
}
]
}
PropertyTypeDescription
gatewaystringThe name of the registered gateway to call.

Available consumer gateways depend on the platform configuration. Common ones include:

  • UserInvitation — sends an invitation email via SendGrid

Function Gateway

A function gateway calls an external service that returns structured data. The returned values are written back to the object's fields.

{
"name": "complete",
"type": "functionGateway",
"scope": "OBJECT",
"trigger": "MANUAL",
"gateway": "Ai",
"parameters": [
{
"name": "generalInformation",
"templateFile": "templates/dossierAndDocuments"
},
{
"name": "jobTitle",
"value": "The job title if you can find it in the document"
},
{
"name": "activeDate",
"value": "The start date of the contract"
}
],
"targets": [
{
"name": "jobTitle",
"actionType": "OVERWRITE"
},
{
"name": "activeDate",
"actionType": "OVERWRITE"
}
]
}
PropertyTypeDescription
gatewaystringThe name of the registered enrichment function.
targetsTarget[]Fields to write the returned values to.

Targets

Each target maps a returned value to a field on the object:

PropertyTypeDescription
namestringThe field name to write to (must be a value type on the object).
actionTypeOVERWRITEHow to apply the returned value. Currently OVERWRITE replaces the existing value.

Available function gateways depend on the platform configuration. Common ones include:

  • Ai — extracts structured data from documents using Gemini
  • DocumentAI — processes documents using Google Cloud Document AI

Producer Gateway

A producer gateway queries an external source and returns a list of results. Unlike function gateways, a producer gateway does not modify any object — it is read-only and always invoked on demand.

Producer scripts are exposed via the Sources API. See Sources for the endpoint reference and response format.

{
"name": "CompanySearch",
"type": "producerGateway",
"scope": "GENERAL",
"gateway": "CompanySearch",
"parameters": [
{ "name": "countryCode", "dataType": "TEXT" },
{ "name": "query", "dataType": "TEXT" }
]
}
PropertyTypeDescription
gatewaystringThe name of the registered producer gateway to call.
scopeGENERALProducer gateways are always GENERAL scope — they are not tied to a specific object.

Available producer gateways depend on the platform configuration. Common ones include:

  • CompanySearch — searches a national business register by name and returns matching companies.

Parameters and preconditions

All three gateway types support the same parameter system as other scripts. See Scripts Overview for the full reference. Preconditions are not evaluated for producer gateways (they have no object context).