task icon Task

Setup Gmail Connection

Build your personal inbox profile - contacts, patterns, writing style from sent emails
1
instruction icon Tell the user you're connecting to Gmail to build their personal profile based on the last 90 days of activity. Explain you'll analyze their inbox patterns (who they email, who emails them, volume) and capture their writing style from sent emails.
3
instruction icon Run these tasks in parallel as subagents: - taskAnalyze Gmail Usage to create the Gmail usage profile - taskAnalyze Writing Style to analyze writing style - taskExtract User Profile to extract persistent user insights Wait for all three to complete.
4
instruction icon Present the completed profiles to the user. From the Gmail profile, highlight key insights: their key contacts (bidirectional relationships), email volume patterns, labels they use. From the writing style analysis, mention the style patterns observed. If any persistent interests or work domain were extracted to your user profile, mention those briefly. Ask if the profiles accurately reflect how they use email.
5
instruction icon Clean up temporary files: delete uiGmail Profile Analysis and uiWriting Samples after presenting
                  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. Tell the user you're connecting to Gmail to build their personal profile based on the last 90 days of activity. Explain you'll analyze their inbox patterns (who they email, who emails them, volume) and capture their writing style from sent emails.

2. [Gather Arguments: Connect to Gmail] The next step has the following requirements for arguments, do not proceed until you have all the required information:
- `profileOutputPath` (default: "session/gmail-profile-data.json"): ui:gmail.profile.analysis
- `writingSamplesOutputPath` (default: "session/writing-samples.json"): ui:session.style.samples

3. [Run Code: Connect to Gmail]: Call `run_script` with:

```json
{
  "file": {
    "path": https://sk.ills.app/code/gmail.inbox.connect/preview,
    "args": [
      "profileOutputPath",
      "writingSamplesOutputPath"
    ]
  },
  "packages": null
}
```

4. Run these tasks in parallel as subagents: - `./skills/sauna//resources/recipes/gmail.inbox.profile.md` to create the Gmail usage profile - `./skills/sauna//resources/recipes/context.style.analyze.md` to analyze writing style - `./skills/sauna//resources/recipes/context.profile.extract.md` to extract persistent user insights Wait for all three to complete.

5. Present the completed profiles to the user. From the Gmail profile, highlight key insights: their key contacts (bidirectional relationships), email volume patterns, labels they use. From the writing style analysis, mention the style patterns observed. If any persistent interests or work domain were extracted to your user profile, mention those briefly. Ask if the profiles accurately reflect how they use email.

6. Clean up temporary files: delete `./documents/session/gmail-profile-analysis.json` and `./documents/session/writing-samples.json` after presenting