# Using dynamic path in FileRead Tool Path

**URL:** <https://community.crewai.com/t/using-dynamic-path-in-fileread-tool-path/2063>\
**Category:** CrewAI Community Support\
**Created:** [December 15, 2024, 6:57pm UTC](https://community.crewai.com/t/using-dynamic-path-in-fileread-tool-path/2063 "2024-12-15T18:57:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohnnyJ](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/johnnyj/32/1489_2.png) [@JohnnyJ](https://community.crewai.com/u/JohnnyJ)\
**Post date:** [December 15, 2024, 6:57pm UTC](https://community.crewai.com/t/using-dynamic-path-in-fileread-tool-path/2063/1 "2024-12-15T18:57:38Z")

</div>

Hello, I want to pass an input from a flow into a crew which is a file path to a text file. In the crew, I cannot work out how to add this input into a correctly instantiated FileReadTool(file\_path=)

I tried doing it in before\_kickoff() but it throws errors, and it cannot be called outside the class in the normal use way with a pre-loaded fixed string. Any help please?

---

<div class="post-metadata">

**Author:** ![LucasMSena](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/lucasmsena/32/2293_2.png) [@LucasMSena](https://community.crewai.com/u/LucasMSena)\
**Post date:** [January 28, 2025, 5:12pm UTC](https://community.crewai.com/t/using-dynamic-path-in-fileread-tool-path/2063/2 "2025-01-28T17:12:59Z")

</div>

I’m trying to use a dynamic path in FileReadTool as well.  
In my crew, I have 2 agents and 2 tasks. The output of task 1 would compose the path, and the task 2 uses the tool, something like:  
´FileReadTool(file\_path=f"docs/{task1\_output}.txt")´
