Configuring Enjo
AI Actions

Setup code AI Action

1min

Code AI Action uses NodeJS code to execute the action in the external application.

Adding a code AI Action to AI Agent

Step 1: In the Enjo dashboard - click on the AI Agent studio menu item. Click on the AI Agent, head over to the ‘AI Actions’ tab, and click on the ‘Add AI Action’ option.

Step 2: Choose 'Create New AI Action,' select 'Code' and click 'Next.'

Document image


Step 3: Add the parameters that will be used inside the function.

Step 4: In the code, use ‘inputData’ to reference the input parameters. You can use Axios to make API calls. Always ensure that the returned values are in the form of JSON or a string.

Step 5: Click on 'Test Function' to test and view the output of the function and the logs. Then click 'Next'

Document image


Step 6: Add the action name, description, and output description (optional). Provide a list of question variations that the user can use to trigger the action.

Step 7: Describe all the inputs that the AI action needs to collect from the user. If you want to use your default values and do not want to ask the user for input, uncheck the 'Allow Override' checkbox. Once done, click 'Publish AI Action.'

Document image