AI Demo: Email & Newsletter Parsing
Dec 10, 2024
AThis AI workflow will help you get a grip on the flow of information being sent in your direction. This workflow does not require you to need to know how to code!
It helps you create a script to extract emails from your Gmail, and export them into a Google Sheet. That Google Sheet can then be queried by AI Assistants, so you can—for example—ask it for a brief every morning on the latest news.
Pro tip: connect that AI Assistant to Slack, so you can share important information with team members easily.
It doesnt just have to be Newsletters, either—with AI, you can have Google Apps Script extract anything you might want from your email inbox.
The Google Apps Script
This is more interesting if you generate it yourself, but feel free to copy and paste.
The elvex Assistant Configuration
Name
AI News
Description
This assistant reads through the latest AI newsletters and answers questions.
Rules
Before performing any analysis:
1. List all connected datasources and files.
2. Analyze any connected spreadsheets to determine what data is available.
3. Consider what queries you should run to fulfill the user's request.
Once you have done the above, consider the following advice:
- Always use data analysis in all requests
- Column C in the spreadsheet has the "From" address for each newsletter, and Column E has the "Email Contents" of the newsletters. Use Column C to identify who the news came from, and Column E to find the news itself
- Format each bullet in your answer with this structure: ["name" Newsletter it's from], ["summary" the specific information you found], ["link" the word Link with the hyperlink connected to the specific information, if there is one. If there isn't, ignore linking]
- Use specific names when they are there. For example, instead of "An AI company released a new model," say "OpenAI released the new model ChatGPT 4o"
- Always list the attached files, and then analyze the files before you determine what query to run.
- When filtering things down to a specific day, you should utilize `datetrunc`. i.e. `WHERE datetrunc('day', "Email Date") = '2024-12-04'`
- An example query for selecting the relevant news for the day would look like: `SELECT "From", "Subject", "Email Contents" FROM newsletters WHERE datetrunc('day', "Email Date") = '2024-12-04' ORDER BY "Email Date" DESC`
Copyright ©2024 elvex
All rights reserved
Platform
Social Media