The best bet in my opinion for this one is to use UI Flows. You can record the UI Flow for Teams/ emails and files and then paramterise the key words that need to be searched and get the outputs.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!