Hacker News new | past | comments | ask | show | jobs | submit login
[flagged] Show HN: I built AI agents with CrewAI to automate my entire Gmail workflow (github.com/tonykipkemboi)
26 points by Tonykip 48 days ago | hide | past | favorite | 25 comments
I created a crew of AI agents using CrewAI to automate my old Gmail account that had a lot of unread emails.

This is what I had it do:

- Categorizing emails and assigning priority levels

- Applying labels and stars based on content analysis

- Creating draft responses for important emails only + saving it in Drafts folder

- Sending Slack notifications for high-priority messages (I use Slack a lot)

- Cleaning up low-priority emails based on configurable rules (delete low quality emails + empty trash afterwards)

It works with most of the models so long as they're good at tool calling (most OSS Ollama models struggle) and connects via IMAP for easy setup.

The project is well-documented with clear installation instructions in my repo above.

I also have a YouTube tutorial walking through the project here:

https://www.youtube.com/watch?v=zz0SA8xMBCo

I built this to solve my own email overload problem and thought others might find it useful too.

Would appreciate any feedback or suggestions for improvement.

NOTE: I work at CrewAI. This is a side project I built to help solve my old email with a lot of unread emails that was running out of storage. I though to share here in case someone find it useful.




You should announce that you are a developer advocate at CrewAI. Flagged this as spam.


fixing that right now; oversight on my end. this is purely a project i built to fix my email problems. also how is this spam?


Local personal agents are going to be a major app type, and this is a great example - thanks for sharing it!

They run locally on my computer with my full credentials and has access to everything. Once I'm past my trust issues, I'd use these a lot.

PS: Running them locally gives me the false sense of security because I feel like "I can unplug the AI". Maybe someone can explain the psychology behind this :)


disconnect internet and if it runs well then you get an even safer feeling. for this example though, it still needs internet access to read and write the emails but the model processing the contents can be local to your system.


I’m far from an expert on agents, but just wondering: I noticed that you have one agent who has the instructions along the lines of “your job is to empty the trash when needed.” Can you help me understand why an agent would be necessary for that? It seems like that type of task could be more efficient in old-fashioned code rather than AI.


Or just never empty it. Who cares?


frfr let it all pile up


you're absolutely right. i definitely don't need an agent for that just like the first section of pulling in the emails. i can use the `@after_kickoff` decorator to empty trash.


If anyone has questions about implementation details or how to adapt it for different workflows, I'm happy to help.


Why not archive vs. the destructive delete. There is a risk of misclassification to promotion and then 2 days later delete. Seems like a default aggressive stance.


i thought about doing that but for this email account specifically, i hadn't used it in years and the storage is full and haven't been able top receive any emails isnce last Aug. so thought to delete since they're old and probably not important anymore.

i can definitely add an archive tool and pass that to the agent and remove the delete tool.


To be transparent - I do work at CrewAI. This is a side project I built using the open-source framework solve a real problem I was having with email management. Happy to answer any questions about how it works or the thought process behind it.


Is there a way to provide context to the agent that writes email drafts? Like context beyond whatever it is replying to. Such as writing style/tone, context about my background that pertains to any email replies, etc.


yes, you could use the `knowledge_source=[file_name]` param in the agent to pass in the writing style or one shot examples. they'll get indexed in a vector db and used by the agent.


Last night I used claude 3.7 to write 1000 lines of code, and there were only two small issues it fixed on its own. Complete quickbooks integration done in basically 20 minutes. We are living in a different world


it's wild. saas at your command.


I just don't read email. It hasn't gotten me fired or anything in 20 years. Maybe I would be getting paid more if I read them, but I highly doubt it


Do you work in a corporate environment?

Do you just wait for people to follow up with you on other channels when they don't get any acknowledgement from an email?


This was a popular tip when Tim Ferriss published his "Four Hour Workweek" book: He recommended ignoring e-mail or only checking once per week, forcing anyone who wants to contact you to put in more effort.

People some times get away with it in some corner of an old corporate job where their job is stable enough that nothing matters. Their coworkers and manager usually hate it.

> Do you just wait for people to follow up with you on other channels when they don't get any acknowledgement from an email?

This is it. They shift the burden of communication to their manager and coworkers.

It's a tip that only sounds good if you imagine yourself as the one doing it.

Then one day you have to deal with a person who does this and you realize how painful it makes your job.


Yes, I know that this is what happens which is why I am upfront about it. If they hate it, they can tell me, I won't take it personally.

I like to think that I use the time saved not reading email to help those teammates and managers get actual shit done.


I am a swe at Google, and before that I worked at startups and large companies.

I'm pretty upfront that I only check my email once per week and that they should find me on chat.

Of course I make exceptions sometimes for certain things, but those exceptions don't turn into a lasting disciplined email routine


Lots of o orgs moved away from email as their primary comm tool.


How do people contact you? Do most employees use Teams or Slack instead of email?


Gchat ftw!

Or has it been renamed again?


this is an interesting trend. email is just a database at this point. do you see this changing to something else?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: