Skip to content

Commit

Permalink
docs: Update cookbook
Browse files Browse the repository at this point in the history
  • Loading branch information
peasee committed Feb 14, 2025
1 parent 6a7049a commit 3d1579b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions imap/outlook.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Copy the `access_token` property to use in the Spicepod

### 3. Spicepod setup

Edit the `spicepod.yaml` file in this directory, and replace the `<IMAP_EMAIL>` with the Outlook email address. Delete the `imap_host` parameter, as it is set automatically.
Edit the `spicepod.outlook.yaml` file in this directory, and replace the `<IMAP_EMAIL>` with the Outlook email address.

The OAuth access token for the IMAP connection will be used as the password, supplied as a secret via an environment variable.

Expand All @@ -74,7 +74,7 @@ datasets:
- from: imap:[email protected]
name: outlook_mailbox
params:
imap_password: ${secrets:OAUTH_ACCESS_TOKEN}
imap_access_token: ${secrets:IMAP_ACCESS_TOKEN}
```
### 4. Start Spice
Expand All @@ -84,7 +84,7 @@ Start Spice, supplying the OAuth Access Token as an environment variable.
For example, in an `.env` file:

```bash
OAUTH_ACCESS_TOKEN="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik5HVEZ2ZEstZnl0aEV1Q..."
IMAP_ACCESS_TOKEN="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik5HVEZ2ZEstZnl0aEV1Q..."
```

Once started, the mailbox should be registered in the Spice Runtime logs:
Expand Down
8 changes: 8 additions & 0 deletions imap/spicepod.outlook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: v1
kind: Spicepod
name: imap_email
datasets:
- from: imap:<IMAP_EMAIL>
name: awesome_mailbox
params:
imap_access_token: ${secrets:IMAP_ACCESS_TOKEN}

0 comments on commit 3d1579b

Please sign in to comment.