[workflow] Cleaning up my mailbox

Hello!

I started working on N8N last week and I was frustrated with my hundreds of emails in my mailbox.
I made a small workflow to clean it up using the really cheap turbogpt API from openai.

I had lots of meeting confirmations, signature confirmations, newsletter, etc.
My prompt just asks the AI to flag anything that seems to have been sent by a computer and not by a human.

I wanted to share it with you:

I have one minor issue though.
When selecting a category from the dropdown, it actually creates a category named after the category ID I selected.
image

2 Likes

I’m wondering if there is a better model I should use. I’ve been playing with the prompt but the results are not very good for the time being.

One suggestion for this (very cool) usecase: pick a more sophisticated model to get better results. But to keep costs down, first try some “dumb” filters to remove a bunch of the easy to filter out emails. So maybe you have a few IF checks that can very easily filter out those Google Calendar (or whichever) transactional emails; then use the more expensive AI model for the more fuzzy stuff.

1 Like

That’s a good idea!
I will look into it.

I only know the openai’s davinci and turbogpt model using completion.

If anyone can suggest a model, I’d be glad to hear it!

1 Like

Yeah - I would totally filter our most of the emails by using some keywords that come up in many newsletters and automated emails.
A few examples might me:

  • Filter out any email that had an unsubscribe link in the body or a sender address that matched a regular expression (e.g., [email protected])

  • Identify frequent email senders, you can use a workflow to track their email addresses and add them to a Google Sheets list. This way, you can apply an auto filter to sort your emails by sender frequency.