Lerty Trigger icon

Lerty Trigger

Triggers when receiving messages from Lerty agents

Lerty Trigger

AI-generated

Overview

The Lerty Trigger node listens for incoming webhook events from Lerty agents and triggers workflows based on specified event types. It is useful for automating responses or processing messages, agent responses, or file attachments received from Lerty agents. For example, it can trigger a workflow when a user message is received or when an agent sends a response.

Use Case Examples

  1. Trigger a workflow when a user sends a message to a Lerty agent.
  2. Trigger a workflow when a file attachment is received from a Lerty agent.

Properties

Name Meaning
Agent Name or ID The Lerty agent to receive messages from. Users can select from a list of agents or specify an ID using an expression.
Event Types Types of events to trigger on, such as agent responses, user messages, or file attachments.
Secret Token A secret token used for webhook authentication to verify incoming requests.

Output

JSON

  • json
    • agent_id - The ID of the Lerty agent that sent the event.
    • conversation_id - The conversation or thread ID related to the event.
    • type - The type of event received (e.g., user_message, agent_response, file_attachment).
    • response_webhook - URL for response webhook if provided in the event.
  • headers - HTTP headers received with the webhook request, including authentication headers.

Dependencies

  • Lerty API credentials (base URL and API token) for agent lookup and webhook registration.

Troubleshooting

  • If the secret token is set but the incoming request's signature or authorization header does not match, the webhook returns a 401 Unauthorized error. Ensure the secret token is correctly configured and matches the sender's token.
  • If the event type received is not included in the selected event types, the webhook responds with a 200 status but filters out the event without triggering the workflow.
  • Errors during agent loading or webhook registration throw descriptive errors indicating failure to load agents or register the webhook, which may be due to invalid credentials or network issues.

Links

Discussion