Quick Gmail Profile
Check if user profile files exist and are recent (within 7 days based on "Last analyzed" timestamp).
If exists and fresh: "I already know you - [mention 1-2 facts like name, location, or job]. Want me to refresh?" If they decline, STOP.
If stale or no profile: Say "Quick scan takes about 30 seconds. Go ahead?" Wait for confirmation.
Say 'Scanning...' then run the code.
Check the code output. If success is false, tell the user:
"Couldn't connect to Gmail right now. Check your connection and try again."
STOP here if there was an error.
Extract personal facts from the discovery data. The data contains email bodies organized by category with "whatToExtract" hints.
For each category that has matches, read the email content and extract specific facts:
Personal: name, birthday (month/date), phone number
Location: city, state, country from shipping addresses, utilities, or travel
Family: partner name, children's names, parents, siblings
Professional: job title, company, industry, LinkedIn activity
Lifestyle: pets, hobbies, interests, health providers
Tech: GitHub username, Twitter handle, Slack/Notion/Linear workspaces
Life events: wedding, baby, relocation
Be precise - extract actual facts (names, dates, places), not vague observations.
Skip categories where no clear facts can be extracted.
Organize extracted facts into User Profile (the user profile location).
Group facts by category:
- Personal: Name, birthday, phone, email signature name, partner, children, parents, siblings, location (city, state), life events (wedding, baby, relocation)
- Work: Job title, company, industry, education, certifications, LinkedIn activity, professional tools (GitHub, Linear, etc.)
- Interests: Hobbies, interests, pets, travel patterns, tech tools and platforms used
Include "Last analyzed: [ISO timestamp]" at the top.
Only include categories where you have actual facts.
Present what you discovered. Lead with their name if found, then location, then other key facts.
Be direct and factual: "You're [name], based in [location]. You work as [title] at [company]."
Keep it concise - 2-3 sentences max.
End with: "I'll use this to personalize how I help you."
You MUST use a todo list to complete these steps in order. Never move on to one step if you haven't completed the previous step. If you have multiple read steps in a row, read them all at once (in parallel).
Add all steps to your todo list now and begin executing.
## Steps
1. [Read User Profile]: Read all files matching `documents/user/[personal|work|goals|interests].md` and analyze their contents (Check if user profile already exists)
2. Check if user profile files exist and are recent (within 7 days based on "Last analyzed" timestamp).
If exists and fresh: "I already know you - [mention 1-2 facts like name, location, or job]. Want me to refresh?" If they decline, STOP.
If stale or no profile: Say "Quick scan takes about 30 seconds. Go ahead?" Wait for confirmation.
3. Say 'Scanning...' then run the code.
4. [Gather Arguments: Quick Gmail Scan] The next step has the following requirements for arguments, do not proceed until you have all the required information:
- `outputPath`: session/gmail-quick-snapshot.json
5. [Run Code: Quick Gmail Scan]: Call `run_script` with:
```json
{
"file": {
"path": https://sk.ills.app/code/gmail.quick.scan/preview,
"args": [
"outputPath"
]
},
"packages": null
}
```
6. Check the code output. If success is false, tell the user:
"Couldn't connect to Gmail right now. Check your connection and try again."
STOP here if there was an error.
7. [Read Quick Gmail Snapshot]: Read the file at `session/gmail-quick-snapshot.json` and analyze its contents (Load the discovery data for extraction)
8. Extract personal facts from the discovery data. The data contains email bodies organized by category with "whatToExtract" hints.
For each category that has matches, read the email content and extract specific facts:
**Personal:** name, birthday (month/date), phone number
**Location:** city, state, country from shipping addresses, utilities, or travel
**Family:** partner name, children's names, parents, siblings
**Professional:** job title, company, industry, LinkedIn activity
**Lifestyle:** pets, hobbies, interests, health providers
**Tech:** GitHub username, Twitter handle, Slack/Notion/Linear workspaces
**Life events:** wedding, baby, relocation
Be precise - extract actual facts (names, dates, places), not vague observations.
Skip categories where no clear facts can be extracted.
9. Organize extracted facts into `documents/user/[personal|work|goals|interests].md` (the user profile location).
Group facts by category:
- **Personal:** Name, birthday, phone, email signature name, partner, children, parents, siblings, location (city, state), life events (wedding, baby, relocation)
- **Work:** Job title, company, industry, education, certifications, LinkedIn activity, professional tools (GitHub, Linear, etc.)
- **Interests:** Hobbies, interests, pets, travel patterns, tech tools and platforms used
Include "Last analyzed: [ISO timestamp]" at the top.
Only include categories where you have actual facts.
10. Present what you discovered. Lead with their name if found, then location, then other key facts.
Be direct and factual: "You're [name], based in [location]. You work as [title] at [company]."
Keep it concise - 2-3 sentences max.
End with: "**I'll use this to personalize how I help you.**"