Function Nodes
Function Nodes
Function nodes perform operations on data, make API requests, or interact with external systems. They are the core building blocks for implementing integration logic in flows.
Many function nodes use Function Types to implement their logic. The configuration and behavior is defined by the corresponding function type.
Data Record Operations
These nodes operate on data records in external applications. Most of them map directly to function types.
Node Type | Description | Function Type |
---|---|---|
list-data-records | List all records from a data collection | List Data Records |
find-data-record-by-id | Find a single record by its ID | Find Data Record By ID |
search-data-records | Search for records using a query string | Search Data Record |
lookup-data-record | Look up a record by field values | Match Data Record |
create-data-record | Create a new data record | Create Data Record |
update-data-record | Update an existing data record | Update Data Record |
delete-data-record | Delete a data record | Delete Data Record |
Find or Create Data Record
Type: find-or-create-data-record
Attempts to find a record by specified criteria. If no record is found, creates a new one. This is useful for upserting data.
findOrCreate:
type: find-or-create-data-record
name: Find or Create Contact
config:
dataSource:
collectionKey: contacts
lookupFields:
email:
$var: input.trigger.email
createData:
firstName:
$var: input.trigger.firstName
lastName:
$var: input.trigger.lastName
email:
$var: input.trigger.email
fieldMapping:
key: contact-mapping
Configuration options:
dataSource
– Specifies which Data Source to uselookupFields
– Fields to match when searching for existing recordscreateData
– Data to use when creating a new recordfieldMapping
– Field Mapping for the operation
Output:
Returns the found or newly created data record:
{
id: 'contact-456',
name: 'Jane Smith',
fields: {
firstName: 'Jane',
lastName: 'Smith',
email: '[email protected]'
},
created: false // true if record was created, false if found
}
Create Data Link
Type: create-data-link
Creates a Data Link between an object in your app and an object in an external app.
createLink:
type: create-data-link
name: Link Contact
config:
dataLinkTable: contact-links
internalId:
$var: input.trigger.internalContactId
externalId:
$var: input.createRecord.id
direction: both
Configuration options:
dataLinkTable
– The Data Link table to use (must be created first)internalId
– ID of the object in your appexternalId
– ID of the object in the external appdirection
– Link direction:export
(internal → external),import
(external → internal), orboth
If a link already exists, it will be updated.
Output:
Returns the created or updated data link:
{
id: 'link-789',
internalId: 'internal-contact-123',
externalId: 'external-contact-456',
direction: 'both'
}
Find Data Link
Type: find-data-link
Finds a Data Link to get the corresponding object ID on the opposite side.
findLink:
type: find-data-link
name: Find Linked Contact
config:
dataLinkTable: contact-links
internalId:
$var: input.trigger.internalContactId
Configuration options:
dataLinkTable
– The Data Link table to searchinternalId
– ID to look up (can be internal or external depending on direction)
Output:
Returns the ID of the matching record on the opposite side, or null if no link is found:
{
externalId: 'external-contact-456'
}
// or null if not found
Delete Data Link
Type: delete-data-link
Deletes an existing Data Link.
deleteLink:
type: delete-data-link
name: Unlink Contact
config:
dataLinkTable: contact-links
internalId:
$var: input.trigger.internalContactId
Configuration options:
dataLinkTable
– The Data Link table containing the linkinternalId
– ID of the linked object
Output:
Returns confirmation of deletion:
{
success: true,
deletedLinkId: 'link-789'
}
HTTP Request Operations
These nodes make HTTP requests to APIs and external services.
Node Type | Description | Function Type |
---|---|---|
api-request-to-external-app | Make authenticated API requests to external apps | API Request to External App |
api-request-to-your-app | Make API requests to your internal API | API Request to Your App |
custom-http-request | Make arbitrary HTTP requests to any endpoint | HTTP Request |
Code Execution
These nodes execute code and run predefined actions.
Node Type | Description | Function Type |
---|---|---|
run-javascript | Execute custom JavaScript or TypeScript code | JavaScript |
run-action | Execute a predefined action | Run Action |
Integration Specific Operation
Type: integration-specific-operation
Executes operations that are specific to a particular integration. These are pre-built operations provided by connectors.
specialOp:
type: integration-specific-operation
name: Send Email
config:
operationKey: send-email
parameters:
to:
$var: input.findContact.fields.email
subject: Welcome!
body:
$var: input.transform.emailBody
Configuration options:
operationKey
– Key of the integration-specific operationparameters
– Parameters required by the operation
The available operations and their parameters depend on the specific connector being used. Refer to connector documentation for details.
Output:
Returns the result of the operation. Structure varies by operation:
{
success: true,
messageId: 'msg-123',
// ... other operation-specific fields
}
Updated 4 days ago