Aggregate a list of messages into a single message
Some connectors return a list of elements, but for some use cases it would be useful to group all elements in a single message.
Example scenario (basic version):
- Twitter Connector queries for 10 most recent tweets about a subject
- These 10 tweets are grouped in a single message
- The SMTP or Office365 Connector sends a single email with these 10 tweets
An improved version of this scenario would be:
- Every hour, Twitter Connector queries for 10 most recent tweets about a subject
- At the end of the day, all tweets for the last 24 hours are grouped in a single message
- Deduplication is performed on these aggregated tweets, perhaps using the BizTalk Transform Service
- The SMTP or Office365 Connector sends a single email with tweets for the last 24 hours
Note that this is not the same as the Scatter-Gather pattern for which a template is already available: the goal is not to aggregate messages from a predefined number of sources (1 message per source), but instead to aggregate a variable number of messages from a single source.
Logic Apps no supports Batching. Please see https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-batch-process-send-receive-messages for more details.
[Deleted User] commented
I was quite surprised that this wasn't part of Logic Apps. For reference, I was trying out the following scenario
* Every X Minutes
* List Azure Resource Manager resources (~10)
* // do some custom logic
* Send a Mail
But, I got stuck because I could not figure out an easy way to simply send only 1 email instead of 10 emails.
Allan Tennent commented
Something like this would be useful in the scenario i'm looking at - need one email out from a sql result with multiple results. Can only currently repeat over this result set for an email per result where I only want one email.