01.0 First Steps
To automate a function, you need to create a scenario. A scenario is a set of nodes, functional blocks that perform specific tasks.
To configure any created scenario, follow these three main steps:
- Add a trigger node to start the scenario.
- Add an action node to perform a task in the scenario.
- Run the scenario.
Adding a Trigger Node
The trigger node will start the scenario. Scenario initiation can be triggered by:
- An event in an external application (e.g., a message in Telegram or a new email in Gmail).
- Clicking the Run once button.
- Sending an HTTP request.
Selecting a Node
To select the appropriate trigger node:
- On the scenario page, click any Add Node button.
- In the Choose Application window, go to the Triggers tab, search for, and select the desired node. For example, select the New Email trigger from the Gmail group.
Authorization (if necessary)
On first click of any added node, you will either see fields for configuration or a Create Authorization button. The presence of this button means that authorization is required for the node to work. Most APP nodes require prior authorization. To authorize (using the New Email node as an example):
- Click the Create Authorization button.
- Click New Authorization.
- In the Choose Service window, select the required application. For the New Email node, this is the Gmail application.
- Confirm Nodul platform access rights in the modal windows.
- Verify in the New Email node that:
- The Connection field shows the connection.
- The node configuration fields are available.
Configuring the Node
Almost every added node needs to be configured by filling in the required and optional fields.
For the New Email node, for example, you can fill in the Labels field. If you set the Labels field to UNREAD, the node will trigger the scenario when there is a new unread message.
Performing the Initiating Action
To test the node:
- Save the node settings.
- Save the scenario.
- Right-click the trigger node and select Run Node Once.
- Send an email to the account used for authorization.
- Wait for the node to execute and check for a success message.
The node will execute even without sending a new email if there are unread messages in the mailbox. If there are no unread messages, you will need to send an email.
Adding an Action Node
After the trigger node executes, the next node, the action node, will start its work. This node represents an event that should occur after the trigger event.
For example: When a new unread message arrives in Gmail, a response should be generated for that email.
In this case, the action is generating a response based on the incoming email's text. This action can be performed by one of the AI nodes.
Selecting a Node
To select the appropriate action node:
- Click the right connection point of the previously added trigger node.
- In the Choose Application window on the Actions tab, search for and select the desired node. For generating a response, choose the AI Anthropic Claude 3 node from the AI ChatGPT Alternatives group.
Configuring the Node
Unlike the New Email node, the AI Anthropic Claude 3 node does not require authorization and can be configured immediately. To configure this node:
- Right-click the added AI Anthropic Claude 3 node.
- Fill in the required fields:
- Model: Choose an AI model, such as Sonnet.
- User Prompt: Enter the user request to the AI, such as "Generate a response to the email with the text X."
- Define the value of X, i.e., the email text to which you are responding. The email text is provided by the New Email trigger node as output data during execution.
Since the email text can vary, you need to input the parameter from the previous node rather than the actual text. To do this:
- Click the User Prompt field in the AI Anthropic Claude 3 node.
- In the Data tab, select the decodedContent parameter from the New Email node.
- Save the node settings.
To display the output parameters of previous nodes in the Data tab, those nodes must be executed (in our case, the New Email node). A successful node execution is indicated by a green icon in the corner of the node. Additionally, nodes must be connected directly or through other nodes.
Testing the Node
To test how the added node performs the action:
- Right-click the trigger node and select Run Node Once.
- Review the execution results, including the generated text.
Running the Scenario
The created scenario must be saved. If you need to test the scenario, you can run it once by clicking the Run Once button. After this execution, if the initiating event occurs, all nodes in the scenario will be executed sequentially, and you can review their results in the nodes' information windows.
Once the scenario is tested and ready for use, save it and click the Deploy button. The scenario will automatically become active and will execute whenever there is an unread email in the mailbox.