Email Operations

Email Processing

This manual is divided into several sections, each focusing on a specific aspect of the Email Processing Library integration with Kognitos.

Introduction

The Email Processing Library integration with Kognitos offers a powerful and intuitive way to interact with email data and functionalities. This integration enables users to perform a wide range of operations on emails, including extracting the sender, recipients, date, subject, hyperlinks, attachments, and body content, all through the use of Kognitos’ natural language processing capabilities. This section provides an overview of the Email Processing Library integration and outlines the prerequisites for using it on Kognitos.

Prerequisites for Using Kognitos with the Email Processing Library

Before you can start using Kognitos to interact with emails, there are several prerequisites that need to be met:

  1. Email Account: You need to have an active email account configured to work with Kognitos. Ensure that your email service provider supports API access.
  2. API Access: Ensure that your email account has API access enabled. API access is required for Kognitos to communicate with your email service.

Supported Email Providers with API Access
• Gmail
• Outlook
• Yahoo Mail
• Any other provider supporting IMAP/SMTP with API access

  1. Security Credentials: Obtain the necessary security credentials (e.g., API keys, OAuth tokens) required to access your email account via the API securely. You can find this information in your email service provider's settings or developer documentation.
  2. Basic Understanding of Email Attributes: While Kognitos simplifies interactions, having a basic understanding of email attributes (e.g., sender, recipients, subject) will help you automate more effectively with Kognitos.

Once these prerequisites are met, you are ready to start leveraging the power of Kognitos to enhance your email processing experience, making it more accessible, efficient, and customizable.


Setting Up Email Connection

Connecting to Your Email Account

To interact with your email account using Kognitos, establishing a secure connection is the first critical step. This section outlines the credentials required for this connection and provides a detailed, step-by-step guide to connect successfully.

Required Credentials

To connect to your email account, you will need the following credentials:

  1. Email Service Provider URL: The base URL of your email service provider's API. This URL is unique to your provider and can be found in their developer documentation.
  2. Username: The email address or username associated with your email account.
  3. Password: The password for your email account or an app-specific password if required by your provider.
  4. API Key/OAuth Token: A security token or API key is an automatically generated key from your email service provider that adds an extra layer of security on top of your password. You can obtain this by navigating to your email service provider's settings and requesting a new token or API key.

Step-by-Step Connection Process

  1. Gather Credentials: Ensure you have all the required credentials: email service provider URL, username, password, and API key/OAuth token.

  2. Connect Email to Kognitos: To initiate a connection to your email account, you will use a specific procedure designed for connecting to external services.

    connect to email with
        the email service provider is "<Email_Service_Provider_URL>"
        the email username is "<Your_Username>"
        the email password is "<Your_Password>"
        the email token is "<Your_API_Key_or_OAuth_Token>"
    

    Replace <Email_Service_Provider_URL>, <Your_Username>, <Your_Password>, and <Your_API_Key_or_OAuth_Token> with your actual email service provider URL, username, password, and API key or OAuth token, respectively.

    connect to email with
        the email service provider is "https://api.emailprovider.com"
        the email username is "[email protected]"
        the email password is "password123"
        the email token is "XYZ123456789"
    

Quick tip: If you don’t provide the last 4 lines, the system will prompt you to provide the required credentials. Just write connect to email with and follow along.

  1. Verify Connection: After executing the above command, Kognitos will attempt to establish a connection to your email account using the provided credentials. If the connection is successful, you can proceed with further operations like fetching, creating, or modifying email data. If the connection fails, verify your credentials and ensure that your email service provider URL, username, password, and API key or OAuth token are correct.
  2. Connection Established: Once the connection is successfully established, you are ready to perform various operations on your email account. You can now fetch data, create new records, update existing ones, delete records, manage files, and more.

Working with Email Attributes

Interacting with email attributes is a core functionality when integrating the Email Processing Library with Kognitos. This section covers how to fetch data related to various email attributes.

Fetching Email Sender

To fetch the sender of an email, use the following KOG command:

get the email
get the email's sender

Fetching Email Recipients

To fetch the recipients of an email, use the following KOG command:

get the email
get the email's recipients

Fetching Email Date

To fetch the date of an email, use the following KOG command:

get the email
get the email's date

Fetching Email Subject

To fetch the subject of an email, use the following KOG command:

get the email
get the email's subject

Fetching Email Hyperlinks

To fetch the hyperlinks contained in an email, use the following KOG command:

get the email
get the email's hyperlinks

Fetching Email Attachments

To fetch the attachments of an email, use the following KOG command:

get the email
get the email's attachments

Fetching Email Body

To fetch the body of an email, you can specify the format (text or HTML):

  • For text body:

    get the email
    get the email's body as text
    
  • For HTML body:

    get the email
    get the email's body as html
    

By following these guidelines, you can effectively manage email attributes in Kognitos, from fetching sender and recipient information to extracting the email body in different formats.


Glossary of Terms

  • API (Application Programming Interface): A set of rules and protocols for building and interacting with software applications. Email service APIs allow external services like Kognitos to communicate with email providers to retrieve or modify data.
  • Email Attribute: Specific pieces of information contained within an email, such as the sender, recipients, date, subject, hyperlinks, attachments, and body content.
  • OAuth Token: A security token used for authentication and authorization in API access, providing secure access to user data without sharing passwords.
  • IMAP (Internet Message Access Protocol): A protocol used by email clients to retrieve messages from a mail server.
  • SMTP (Simple Mail Transfer Protocol): A protocol used for sending emails from a client to a server or between servers.

By leveraging the Email Processing Library with Kognitos, you can streamline your email data interactions, making them more efficient and customizable to your needs.


What’s Next