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
You'll need to get an [oauth crednetials.json](https://developers.google.com/gmail/api/quickstart/nodejs#authorize_credentials_for_a_desktop_application) file from google cloud console and put it in this directory.
2. create a new project (or select an existing one)
9
+
3. enable the gmail api (you may need to search for it)
10
+
4. create credentials and select desktop app
11
+
- Create Credentials > OAuth client ID
12
+
- Application type > Desktop app
13
+
- After the credentials are created, click `Download JSON` and put it in this directory as `credentials.json`
14
+
15
+
# Running
16
+
17
+
The first time you run the script it will open a browser window prompting you to login and authorize access. Afterwards credentials will be stored in a `token.json` file and you won't have to do this again (hopefully)
18
+
19
+
```
20
+
deno run --allow-net --allow-read --allow-write --allow-run gmail.ts [number of emails to import]
0 commit comments