You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- create a new OAuth 2.0 Client ID ([instructions](https://developers.google.com/workspace/guides/create-credentials))
34
+
- Download JSON file and rename it to `credentials.json`.
35
+
- Put `credentials.json` in the `gmail_llm` directory.
36
+
37
+
4. Set OpenAI API key:
38
+
39
+
- Get an OpenAI API key [here](https://platform.openai.com/api-keys)
40
+
- Rename` .env.local` to `.env` and set your key
41
+
42
+
```
43
+
OPENAI_API_KEY=<YOUR_API_KEY>
44
+
```
45
+
46
+
## Usage
47
+
48
+
Run the script:
49
+
50
+
```
51
+
python main.py
52
+
```
53
+
54
+
see an example in [summary](summary/2023-12-04.md) folder
55
+
56
+
## TODO
57
+
58
+
-[ ] improve prompt to extract as many links as possible and have better categorization
59
+
-[ ] Experiment with different forms of output, maybe article form? Have it copy someone's writing style, publish it to substack, could be a newsletter automation with AI thing
60
+
-[ ] Check if text extracted from emails can be cleaned up, any redundant info fed into prompt?
61
+
62
+
## Links
63
+
64
+
- Docs for listing emails [users.messages.list](https://developers.google.com/gmail/api/reference/rest/v1/users.messages/list)
65
+
- Docs for querying [Searching for Messages](https://developers.google.com/gmail/api/guides/filtering)
66
+
-[Counting tokens with tiktoken](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb)
0 commit comments