# \[Pipeline to Pipeline communication\] - passing pipeline id dinamically to send\_to =\>

**URL:** <https://discuss.elastic.co/t/pipeline-to-pipeline-communication-passing-pipeline-id-dinamically-to-send-to/257222>\
**Category:** Logstash\
**Created:** [December 1, 2020, 2:59pm UTC](https://discuss.elastic.co/t/pipeline-to-pipeline-communication-passing-pipeline-id-dinamically-to-send-to/257222 "2020-12-01T14:59:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flavio1](https://avatars.discourse-cdn.com/v4/letter/f/cab0a1/32.png) [@Flavio1](https://discuss.elastic.co/u/Flavio1)\
**Post date:** [December 1, 2020, 2:59pm UTC](https://discuss.elastic.co/t/pipeline-to-pipeline-communication-passing-pipeline-id-dinamically-to-send-to/257222/1 "2020-12-01T14:59:36Z")

</div>

Hi everybody, does exist a method to pass the value of pipeline id dinamically in send\_to. in my environment every log has a field with a value corresponding to a pipeline id present in my pipelines.yml. A hoped that with this method i avoided to write a series of "if" in cascade. Below an example of the logstash code i'm writing.

> **Code**
>
> ```auto
> input { pipeline { address => filebeat } }
> 
> filter{
> 
> mutate{
> 
> add_field => {
> 
> "pipeline_id" => "%{[target][field_1]}"
> 
> }
> 
> }
> 
> }
> 
> output {
> 
> pipeline { send_to => %{pipeline_id}} 
> 
> }
> 
> ```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [December 1, 2020, 3:08pm UTC](https://discuss.elastic.co/t/pipeline-to-pipeline-communication-passing-pipeline-id-dinamically-to-send-to/257222/2 "2020-12-01T15:08:30Z")

</div>

No, pipeline to pipeline links are created when the pipelines are initialized. They cannot be dependent on the contents of events.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 29, 2020, 3:09pm UTC](https://discuss.elastic.co/t/pipeline-to-pipeline-communication-passing-pipeline-id-dinamically-to-send-to/257222/3 "2020-12-29T15:09:02Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
