Emails with ESG reports should not sit in the inbox. This automation watches your Gmail for messages about CSRD reporting, reads the attached XHTML file, and sends a clear audit summary back to the sender. It helps sustainability and finance teams close the loop fast without manual review.
Here is how it works. A Gmail trigger checks new mail and an If filter looks for a subject match like CSRD Reporting. The attachment is downloaded, converted from binary to text, and parsed by code to inspect tags and content. An AI Agent with an OpenAI chat model turns the findings into a short email using a structured format for the subject and body. The reply is posted in the same thread so the sender gets feedback right away.
You need Gmail and OpenAI access, plus n8n credentials for both. Set the subject keyword you want, adjust the prompt tone, and choose the output fields you plan to send. Teams that handle supplier ESG files or weekly disclosures can cut review time from about 30 minutes to under 3 minutes and keep a consistent response style across the inbox.