Email Operations

Operations for working with Microsoft Outlook emails.

📘

Note: These operations are part of the Microsoft Outlook Book. A newer version of this Book is avaliable via BDK.

Overview

Managing emails effectively is a crucial aspect of using Outlook with Kognitos. This section covers various operations you can perform on emails, such as sending, receiving, forwarding, replying to, and deleting emails. Each operation is illustrated with examples.

👍

Actions Performed Under Your Credentials

Any actions taken will use the credentials you connect with. For example, if you send an email through Outlook, the sender will be the account linked to your connection credentials.

Operations

1. Sending Emails

Sending emails through Kognitos allows for the customization of recipients, subject lines, message bodies, and even attachments.

  • Example: Sending an Email

    send an email with
        the recipients are "jane.doe@example.com"
        the subject is "Meeting Reminder"
        the message body is "Don't forget our meeting at 10 AM tomorrow."
    
  • Example: Sending an Email with CC and Attachments

    send an email with
        the recipients are ["jane.doe@example.com", "mark.smith@example.com"]
        the cc addresses are "manager@example.com"
        the subject is "Project Update"
        the message body is "Please find attached the latest project update."
        the attachments are "/path/to/project_update.pdf"
    

2. Receiving Emails

These operations retrieve emails based on specific criteria, such as the last few emails received or unread emails.

  • Example: Getting the Last 5 Emails

    get outlook's last 5 emails
  • Example: Getting Unread Emails

    get outlook's unread emails

3. Forwarding Emails

Forwarding emails to other recipients or groups can be easily automated using Kognitos.

  • Example 1: Forwarding an Email to a Team

    get the email whose subject is "Monthly Report"
    forward the email to the team with
        the recipients are "team@example.com"
        the subject is "Forwarded: Monthly Report"
  • Example 2: Forwarding an Email to the Manager with CC

    get the email whose subject contains "Project Update"
    forward the email to the manager with
        the recipients are "manager@example.com"
        the cc addresses are "assistant@example.com"
        the subject is "FYI: Project Update"

4. Replying to Emails

These operations can automate email replies.

  • Example: Replying to an Email with Feedback

    get the email whose subject is "Project Update"
    reply the email with
        the subject is "Re: Project Update - Feedback"
        the comment is "Thanks for the update, please see my feedback below."
        the cc addresses are "team@company.com"
        the attachments are "feedback.docx"

5. Deleting Emails

These operations automate email deletion.

  • Example: Deleting Emails by Subject

    delete the outlook emails with
        the subject is "Weekly Report"
    
  • Example: Deleting Emails by Sender and Folder

    delete the outlook emails with
        the sender is "noreply@example.com"
        the folder is "Inbox"
    

6. Marking Emails as Read or Important

Marking emails as read or flagging them as important can help prioritize your tasks and manage your inbox more efficiently.

  • Example: Marking an Email as Read

    get the email whose subject is "Urgent: Meeting Rescheduled"
    mark the email as read
    
  • Example: Marking an Email as Important

    get the email where
        the sender is "john.doe@example.com"
    mark the email as important
    

7. Extracting Email Sender

Understanding who sent an email is crucial for many automated processes, such as filtering or responding to messages.

  • Example: Getting the Email's Sender

    get the email
    get the email's sender # <----
    

8. Extracting Email Recipients

Knowing to whom an email was sent can help in understanding the communication flow and is useful in scenarios like auditing email communications.

  • Example 1: Getting the Email's Recipients

    get the email
    get the email's recipients # <----
    
  • Example 2: Getting the Recipients for a Specific Email

    the email's subject is "Meeting Schedule"
    get the email's recipients # <----
    

9. Extracting Email Date

The date and time when an email was sent or received can be critical for organizing, sorting, or archiving emails.

  • Example: Getting the Email's Date

    get the email
    get the email's date # <----
    

10. Extracting Email Subject

The subject of an email often contains key information summarizing the content or purpose of the email.

  • Example: Getting the Email's Subject

    get the email
    get the email's subject # <----
    

11. Extracting Email Attachments

Attachments are commonly used to share documents, images, and other files via email. Extracting these attachments is crucial for processing or storing these files outside the email system.

  • Example 1: Getting the Email's Attachments

    get the email whose subject is "Project Proposal"
    get the email's attachments # <----
    
  • Example 2: Getting Attachments from an Email by Sender

    get the email where
        the sender is "john.doe@example.com"
    get the email's attachments # <----
    

12. Extracting Email Body

The body of an email contains the main message. Extracting this content is essential for reading, processing, or analyzing the information conveyed in the email.

  • Example 1: Getting the Email's Body

    get the email
    get the email's body # <----
  • Example 2: Getting the Body of an Email with a Specific Subject

    the email's subject is "Meeting Schedule"
    get the email's body # <----