Mail automations

Hi everyone, I am new in this group. I am looking for help to create an automation that scans my iOS mailand gives me a summary of all my unread emails. It also should scan the body of the mail to identify any escalations or complaints and highlight the same to me. I did make an automation using the help of ChatGPT, but it seems to fail every time I run it because the ChatGPT prompt is not equipped to handle a large volume of data. Can someone help, thank you.