How do I correctly connect Microsoft 365 Email (Outlook) → Search Messages to an Iterator Module?
I have built a scenario where I find an email in a folder, summarize it and email the summary to myself. Now I want to expand that scenario to handle multiple emails in one summary email. I thought that I should do that by:
- Use Microsoft 365 Email (Outlook) → Search Messages to pull emails from my `specified folder.
- Iterate over each message.
- Pass each message to an OpenAI module to summarize the content.
- Aggregate all summaries into a single digest email.
If that is a workable solution, I’m currently stuck on the Iterator setup.
The problem:
I can’t figure out how to connect the output of the Search Messages module to the Iterator module. In the Array field of the Iterator, I don’t see a way to pass the bundle of emails from the previous module:
What I want to do:
- Feed the Iterator the array of full email objects (each containing subject, sender, body, etc.)
- Loop over each of those messages and summarize them
- Aggregate and email them together
My question:
How do I properly configure the Iterator to consume the full array of messages returned by Search Messages
?
OR
Is there a different/better way to accomplish what I am trying to do?
A screenshot of my current setup is attached for reference. Any help is appreciated!