You’ll need the following Logic-App workflow to group the hourly records by borderID
and format them into a single text block.
If you use this code/logic, the problem will be solved and you can easily use the final string to send an email (for example through the “Send an email” action).
The full working Logic-App JSON is available here: