# Pipeline: Access stage output in the subsequent stage

**URL:** <https://community.crewai.com/t/pipeline-access-stage-output-in-the-subsequent-stage/623>\
**Category:** CrewAI Community Support\
**Tags:** pipline, crewai\
**Created:** [October 2, 2024, 11:04am UTC](https://community.crewai.com/t/pipeline-access-stage-output-in-the-subsequent-stage/623 "2024-10-02T11:04:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zorx](https://avatars.discourse-cdn.com/v4/letter/z/ecccb3/32.png) [@zorx](https://community.crewai.com/u/zorx)\
**Post date:** [October 2, 2024, 11:04am UTC](https://community.crewai.com/t/pipeline-access-stage-output-in-the-subsequent-stage/623/1 "2024-10-02T11:04:01Z")

</div>

Hi,  
I am using pipelines and I am trying to access the previous stage’s output in the current stage.  
I have a pipeline with two crews: current\_date\_crew and get\_weather\_crew:  
Pipeline(stages=[current\_date\_crew, get\_weather\_crew]).kickoff(inputs)

- The current\_date\_crew access the web and gets the current date and time (and return just it).
- The get\_weather\_crew gets the weather for the given date:

When I am defining the task for get\_weather:  
get\_weather:  
description: \>  
Get the weather for the date using the previous stage’s output.  
expected\_output: \>  
Return the weather report.  
agent: weather\_agent

When I run it, the second stage (get\_weather\_crew) doesn’t seem to use the date from the previous stage (current\_date\_crew).

I also tried using explicit inputs like so:  
get\_weather:  
description: \>  
Get the weather for the date using {date}  
expected\_output: \>  
Return the weather report.  
agent: weather\_agent

but here I just get an error because I have no date on my inputs.

Does anyone have this problem also?  
Am I missing something?

P.S.,  
I know that for this specific example, using pipelines is an overkill since I can technically do it all in one crew. But for the sake of understanding pipelines I would like to implement it like so.

Thanks !

---

<div class="post-metadata">

**Author:** ![mayonesa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/mayonesa/32/59_2.png) [@mayonesa](https://community.crewai.com/u/mayonesa)\
**Post date:** [October 16, 2024, 5:27pm UTC](https://community.crewai.com/t/pipeline-access-stage-output-in-the-subsequent-stage/623/2 "2024-10-16T17:27:03Z")

</div>

Wow, I can’t believe that I am the first response after 14 days. Have you taken a look at the [pipeline output section in the docs](https://docs.crewai.com/concepts/pipeline#pipeline-output)? Is that how you’re doing it? Can you post your pipeline code?
