Combine multiple user feedback into one Google doc

I want to combine gmail emails from a specific label into one google doc, I also want to extract the user sentiment: positive/negative - and their feedback message from these emails. Maybe using ChatGPT?

Our emails come through with the content prefixed e.g
Response: Positive
Comments: the users message

I also have multiple labels since feedback is sorted by website section types using a gmail filter, would this be an expensive operation to do? as I want to get feedback from possibly a large date range e.g from the last 6 months.

Could this be done in one scenario? and use a filter based on label name?

Hi @MaxW, your requirements are feasible. are you looking to analyze mails periodically, like all the label1 and label2 each day, or instantly on mail reception ? this will determine our module choice for the first module to fetch mails. second, you’ll need a regex pattern match to get key:value pairs of response:responseAnswer and comment:commentAnswer (chatgpt is not needed if it’s all systematic data, might be useful if you think there’ll be errors in user input. careful for AI hallucinations though).

After that you have response and comment, depending on if we’re fetching multiple mails or once, we can use a text aggregator to get all ‘response’ & ‘comment’ values and just paste it in google docs. there might be some formatting & organization aspects to look at, but i’ll let you try that yourself first.