Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPA.Outlook.Application update/fix Move Emails keyword #1127

Merged
merged 3 commits into from
Nov 10, 2023

Conversation

mikahanninen
Copy link
Member

@mikahanninen mikahanninen commented Nov 10, 2023

Parameter email_filter's type has been changed so that it can be given

  1. a string email filter (existing functionality)
  2. single email (of type MailItem or dictionary representing email)
  3. list of MailItems/dictionaries.

Also added parameter mark_as_read which when set True will mark all emails which has been moved as Read (default).

usage example after this PR has been released

*** Tasks ***
All and filter
    Open Application
    ${emails}=    Get Emails
    @{move_these}=    Create List
    FOR    ${email}    IN    @{emails}
        Log To Console    SUBJECT: ${email}[Subject]
        IF    "Azure" in "${email}[Subject]"
            Log To Console    ... TO BE MOVED
            Append to List    ${move_these}    ${email}
        END
    END
    Log To Console    ... Moving ${{len($move_these)}} emails
    # Pass list of email dictionaries to move
    Move Emails    email_filter=${move_these}    target_folder=Azure    mark_as_read=True
    Log    Done.

Filter and move
    Open Application
    ${emails}=    Get Emails    email_filter=[Subject]='Azure AD Identity Protection Weekly Digest'
    IF    len($emails) > 0
         # Pass list of email dictionaries to move
        Move Emails    email_filter=${emails}    target_folder=Azure
    END

Move with filter
    Open Application
    # Pass email filter string (existing functionality)
    Move Emails    email_filter=[Subject]='Azure AD Identity Protection Weekly Digest'    target_folder=Azure

@mikahanninen mikahanninen added the bug Bad or unexpected behaviour label Nov 10, 2023
@mikahanninen mikahanninen self-assigned this Nov 10, 2023
@mikahanninen mikahanninen added the enhancement Improve an existing feature label Nov 10, 2023
@mikahanninen mikahanninen changed the title RPA.Outlook.Application Update/fix Move Emails keyword RPA.Outlook.Application update/fix Move Emails keyword Nov 10, 2023
@mikahanninen mikahanninen merged commit 37e5a23 into master Nov 10, 2023
1 check passed
@mikahanninen mikahanninen deleted the fix/outlook-application branch November 10, 2023 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bad or unexpected behaviour enhancement Improve an existing feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

RPA.Outlook.Application's Move Emails does not always move all emails
1 participant