parameters and api objects from the Function’s arguments.
Limitations
- The maximum run-time of a Function instance is 15 minutes. For on-premises installations, you can change this limit via the
FUNCTION_EXECUTION_MAX_EXECUTION_TIME_IN_MINUTESenvironment variable in thevalues.yamlfile. For long-running operations that exceed this limit, set up a dedicated middleware service, such as AWS Lambda or Azure Functions, and call back using the Inject API once the process completes. This approach is more scalable than Cognigy Functions for time-intensive tasks. - You can define a Function only in JavaScript or TypeScript.
Working with Functions
- GUI
- API
You can view, create, edit, and delete Functions in Build > Functions. To define, trigger, and monitor a Function, use the Code and Instances tabs.Also, you can trigger a Function from the Flow editor by using the Trigger Function Node.
Examples
You can use HTTP requests to interact with third-party systems.
GET Request
POST Request
Functions can interact with Flows through the Inject and Notify APIs.The following examples assume that you pass
userId and sessionId through the function’s parameters.