# External trigger

The task "**External trigger**" needs to be placed at the very beginning of the pipeline if you want to execute it by calling [Ylem's API](/api/api-endpoints.md#run-pipeline) from the outside.

The following cases are the most common for such a situation:

* Trigger pipeline from [Apache Kafka](/integrations/library-of-integrations/apache-kafka.md), [AWS Lambda](/integrations/library-of-integrations/aws-lambda.md), [AWS S3](/integrations/library-of-integrations/aws-s3.md), [Google Pub/Sub](/integrations/library-of-integrations/google-pub-sub.md), [RabbitMQ](/integrations/library-of-integrations/rabbitmq.md)
* Trigger pipeline by [calling an API](/api/api-endpoints.md#run-pipeline) directly or calling it from your custom script

The input dataset that you transfer to the API endpoint will also be available in the task that follows "**External trigger**":

The following simple pipeline example accepts data from outside and forwards it further as a notification.

<figure><img src="/files/uEYpoxUNxzIicQR3H2nm" alt=""><figcaption></figcaption></figure>

Let's send the following JSON as input to the [API endpoint](/api/api-endpoints.md#run-pipeline) that triggers this pipeline:

```json
{
    "info": "some information",
    "customer_id": 1
}
```

As you can see the input dataset is available in the "Notification task" as a whole under the `{{ INPUT() }}` function and also every input key-value pair is available separately by its key name.

<figure><img src="/files/I0DUri2B0ps6aJdxoBIL" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ylem.co/pipelines/tasks-ip/external-trigger.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
