Email Integration

Email integration lets you connect your email accounts and import messages as data for your Knowledge Base. KnowStack supports Gmail (via OAuth) and any IMAP-compatible email provider.

Connecting an Email Account

Go to Data Collection, select the Emails tab, and you will see the Accounts sub-tab with two options:

  1. Connect Gmail -- Click this button to authenticate with Google. You will be redirected to Google's OAuth consent screen. Grant the requested permissions and you will be redirected back to KnowStack with your account connected.
  2. Add IMAP Account -- Click this button to open a form where you enter your IMAP server details (host, port, username, password). This works with Outlook, Yahoo, and any other IMAP-compatible email provider.

Your email credentials are encrypted at rest using AES-256 encryption. KnowStack never stores your password in plain text.

Fetching Emails

  1. Switch to the 'Fetch & Sync' sub-tab.
  2. Select the email account you want to fetch from.
  3. Choose a date range: Last month, Last 3 months, Last 6 months, or Last year.
  4. For Gmail accounts, you can filter by labels (include specific labels) and exclude categories (like Promotions or Social).
  5. Click 'Fetch Emails' to start the import. This runs in the background.
  6. The activity banner at the top of the page shows real-time progress.

Browsing Fetched Emails

Switch to the 'Browse' sub-tab to see all fetched emails. You can click on any email to view its full content in a preview modal. The browse view shows sender, subject, date, and a snippet of the body text.

Email Management

  • View connected accounts -- The Accounts sub-tab shows all connected email accounts with their status and email count
  • Disconnect an account -- Remove an email account and all its fetched data
  • Re-fetch -- Run another fetch job to import newer emails that arrived since the last fetch
  • Delete emails -- Remove individual emails or all emails from an account

Fetching large mailboxes (thousands of emails) may take several minutes. You can safely navigate away -- the fetch continues in the background and you will receive a notification when it completes.