You don’t really need to create a file to attach.
You could setup a rule that checks (e.g. once a day/week/month/etc) the battery levels (Item states) and sends an email notification with the ones below a defined threshold.
Check the DPs for rule examples. Start with: Design Pattern: Working with Groups in Rules