AI Agents
AI Agent 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 ' 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' 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 '