Thread Deep-Dive
Fetch and analyze a complete email conversation—the full story
2
If user provided a thread ID directly, use it. Otherwise, run
Fetch Gmail Messages to search for the thread (query based on their description, limit 10, output to session/thread-search.json), then identify the right one from results. If multiple matches, present options briefly and ask which one.
4
Tell the story of the thread: (1) Context—who started it, when, what's it about. (2) Flow—who said what, key quotes. (3) Current state—where does it stand? Pending questions? (4) Action items—requests, commitments, deadlines. Note that you can't send replies, but can help draft one.
To run this task you must have the following required information:
Thread identifier—either a thread ID, or enough context to find it (subject keywords, participants, approximate date)
If you don't have all of this information, exit here and respond asking for any extra information you require, and instructions to run this task again with ALL required information.
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 Inbox Intent Patterns]: Read the documentation in: `./skills/sauna//resources/context/gmail.inbox.intent.md` (Understand what user wants from the thread)
2. If user provided a thread ID directly, use it. Otherwise, run `./skills/sauna//scripts/gmail.inbox.fetch.js` to search for the thread (query based on their description, limit 10, output to session/thread-search.json), then identify the right one from results. If multiple matches, present options briefly and ask which one.
3. [Gather Arguments: Fetch Gmail Thread] The next step has the following requirements for arguments, do not proceed until you have all the required information:
- `threadId`: Thread ID from requirements or search results
- `includeFullBody` (default: "true"): true for full bodies
4. [Run Code: Fetch Gmail Thread]: Call `run_script` with:
```json
{
"file": {
"path": https://sk.ills.app/code/gmail.inbox.thread/preview,
"args": [
"threadId",
"includeFullBody"
]
},
"packages": null
}
```
5. Tell the story of the thread: (1) Context—who started it, when, what's it about. (2) Flow—who said what, key quotes. (3) Current state—where does it stand? Pending questions? (4) Action items—requests, commitments, deadlines. Note that you can't send replies, but can help draft one.