Hi there! Thanks for sharing your idea—it's a great use case for Power Automate and AI, and I can see where you're trying to go with it.
That said, based on your description and the screenshot you shared, it looks like you're still getting familiar with some of the fundamentals of Power Automate. For example, initializing a variable inside an "Apply to each" loop can cause issues, and it's something that typically needs to be done outside the loop to work properly.
The solution you're aiming for—summarizing multiple emails using AI and sending a concise message to Teams—is definitely possible, but it involves several advanced steps like handling arrays, string manipulation, and integrating AI models effectively. It’s more of a full solution build than a quick fix, and might be a bit much to tackle all at once if you're just starting out.
You might find it helpful to begin with smaller, simpler flows to build up your confidence and understanding. Once you're comfortable with the basics, you'll be in a much better position to take on more complex scenarios like this one.
The forums are great for solving specific issues, so if you break your goal down into smaller parts (like “how do I extract email bodies from a folder?” or “how do I send a message to Teams?”), you’ll likely get more targeted help.
Also, just a quick note: To use AI capabilities in Power Automate (like summarizing email content), you’ll need a premium license, AI Builder credits, and possibly admin configuration from your IT department. If this is your first flow, it’s worth checking whether those features are available in your environment before diving too deep.
Keep going—you’re on the right track by experimenting and asking questions!