web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / A COMPLETE READING OF ...
Power Apps
Unanswered

A COMPLETE READING OF EMAILS WITHIN POWER APPS

(2) ShareShare
ReportReport
Posted on by 7
Hello, community, how are you? I hope you're well! I'm a bit worried!

A rather complex demand has arisen here in my scenario:
 
I have a request from the client to have the reading of emails within Power Apps the same as within Outlook, with the possibility of reading emails, attachments, files, replies to each email and if possible in the same design.
 
That said, there's another problem: he has a main e-mail containing incoming e-mails, for example:
 
 
And in it, they have several people who can access the emails that are arriving in that email and reply normally, but with the static reply of “comercial@company.com”.

Here's a better example:
 
Imagine we have 3 users online:
 
  1.     user_leonard@company.com
  2.     user_abigail@company.com
  3.     user_chloe@company.com

Therefore, all the e-mails that arrive for “comercial@company.com” will be distributed to each of these users, i.e. if I receive 10 e-mails, there would be 3 for “user_leonard@company.com”, 3 for “user_abigail@company.com” and 4 for “user_chloe@company.com”.
 
However, each user would have to have access to the emails that have already been answered as well, and the possibility of categorizing them as well, or something like that.
 
What I've managed to do so far, I use a SharePoint list to register the users who are online, that is, those who have opened the app and automatically register the exit, and I would also like to register the exit from the app, some form of mouse tracking, or something like that.
 
And I've managed to split the emails between users as well, but I haven't managed to do the rest so far.One question: Is it possible to block the “to” of outlook, for example:

user_chloe@company.com” will open his e-mail online or local and whenever he receives an e-mail from ‘comercial@company.com’ he will forcefully reply with the user ‘comercial@company.com’ even though he is logged in to his user?
 

As I see it, I think this solution would be better done directly in outlook, or am I wrong?
 

Here's my code for dividing e-mails among online users in SharePoint
 
 
Set(
    vAnnexes,
    false
);
//View attachments becomes false when screen is visible
Set(
    vEmails,
    Concat(
        Distinct(
            Filter(
                App_LogHistory,
                Status = “ONLINE”
            ),
            EmailUser
        ),
        Value,
        ”;”
    )
);
// Step 1: Collect the emails in the EmailCollection collection
ClearCollect(
    EmailCollection,
    Office365Outlook.GetEmailsV3(
        {
            folderPath: “Inbox”,
            // inbox home folder
fetchOnlyUnread: true,
            // unread only
includeAttachments: true,
            //include attachments
top: 25//top 25 is Max, to change it is another story
        }
    ).value
);
// Step 2: Clear the Gallery3Items collection
Clear(Galeria3Items);
// Step 3: Iterate over EmailCollection to fill Gallery3Items
ForAll(
    EmailCollection,
    Collect(
        Gallery3Items,
        {
            FromEmail: from,
            SplitName: Last(
                FirstN(
                    Gallery3.AllItems,
                    Mod(
                        CountRows(Gallery3Items) + 1,
                        CountRows(Gallery3.AllItems)
                    ) + 1
                )
            ).Value,
            bccRecipients: bccRecipients,
            bodyPreview: bodyPreview,
            ccRecipients: ccRecipients,
            from: from,
            id: id,            
            replyTo: replyTo,
            importância: importância,
            internetMessageId: internetMessageId,
            subject: assunto,
            toRecipients: toRecipients,
            attachments: attachments,
            hasAttachments: hasAttachments,
            isHtml: isHtml,
            receivedDateTime: receivedDateTime,
            isRead: isRead,
            Anexos: attachments// Utilizando o campo de anexos diretamente da EmailCollection
        }
    )
);
 
And then I show the emails in a simple gallery called: Galeria3Items


Any help, suggestions or ideas are welcome! Thank you!
 
Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 337 Most Valuable Professional

#2
11manish Profile Picture

11manish 173

#3
Valantis Profile Picture

Valantis 86

Last 30 days Overall leaderboard