Feature Request: Support Triggering Components via API (e.g., `/inject`)
Currently, components can only be triggered from the UI or through internal flows. Would it be possible to support API-based triggers, such as:
- An endpoint like
/inject - Allow sending HTTP requests (POST/GET) to directly trigger a component
- Useful for integration with external systems that need to programmatically start a component
Use Case:
- Triggering flows via external APIs
- Easier integration with third-party tools (similar to Node-RED’s HTTP in/out nodes)
- Adds flexibility to control components without relying on the UI
Example:
POST /inject
Content-Type: application/json
{
"component": "my_component",
"data": { "value": 123 }
}
Questions:
- Is there a roadmap or plan to support API-based triggers like this?
Hi! I’d like to work on this issue.
@soumyavoorugonda Many thanks! Kindly update me when it’s done.
https://github.com/langflow-ai/langflow/issues/9857
@FILM6912 A possible workaround:
You can use the Webhook component or even the API request and add a trigger field to the components you want to trigger, which can be one or more components (example in the image).
This trigger field ensures the order of execution, without necessarily needing to pass an input to the connected component.
inputs = [
MessageInput(
name="trigger",
display_name="Trigger",
info="Trigger input to connect with flow (not used in processing).",
required=False,
advanced=True,
show=True
),