# Assigning questions to specialized agents

**URL:** <https://community.crewai.com/t/assigning-questions-to-specialized-agents/4110>\
**Category:** CrewAI Community Support\
**Created:** [February 23, 2025, 1:26pm UTC](https://community.crewai.com/t/assigning-questions-to-specialized-agents/4110 "2025-02-23T13:26:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steitcher](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/steitcher/32/2741_2.png) [@Steitcher](https://community.crewai.com/u/Steitcher)\
**Post date:** [February 23, 2025, 1:26pm UTC](https://community.crewai.com/t/assigning-questions-to-specialized-agents/4110/1 "2025-02-23T13:26:38Z")

</div>

I’m considering using CrewAI to process customer email requests. Quite often, these requests contain multiple questions that belong to different knowledge areas and require specific RAG data sources to be answered correctly. I need to extract a list of questions from the email, classify them to determine the appropriate data source for each question, and assign to agents that specialize on answering these type of questions. Then, I need to compile all the responses into a single email reply for the client.

Is this scenario achievable with CrewAI? I’m not sure how to structure the flow when one task generates a series of subtasks routed to specialized agents.

---

<div class="post-metadata">

**Author:** ![zinyando](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/zinyando/32/4435_2.png) [@zinyando](https://community.crewai.com/u/zinyando)\
**Post date:** [February 23, 2025, 3:30pm UTC](https://community.crewai.com/t/assigning-questions-to-specialized-agents/4110/2 "2025-02-23T15:30:08Z")

</div>

This is possible with Flows. I think you should structure it this way

1. @start fetch\_email - fetch email from client if you are not passing it in the flow inputs
2. @listen get\_questions (fetch\_email) - extract questions from the email and puts them in a list
3. @router classify\_question - classify questions from the previous step and routes them to the appropriate crew with data source
4. @listen(classify\_question) handle\_question - handle question. This can have multiple variations based on the data source
5. @listen save\_email\_draft - get all the answers to the questions and draft a reply to the customer email

If you have multiple questions you will need to conditionally loop between classify\_question and the question\_handlers until all questions are answered.

This is simplistic but I’m sure you get the idea and you can start working on a solution that suits your situation.

Feel free to reach out to me if you need any clarification/help on any of this.

---

<div class="post-metadata">

**Author:** ![Steitcher](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/steitcher/32/2741_2.png) [@Steitcher](https://community.crewai.com/u/Steitcher)\
**Post date:** [February 23, 2025, 7:03pm UTC](https://community.crewai.com/t/assigning-questions-to-specialized-agents/4110/3 "2025-02-23T19:03:05Z")

</div>

Thank you for the detailed answer. Will try to build a prototype flow this week.
