A rather complex demand has arisen here in my scenario:
Here's a better example:
- user_leonard@company.com
- user_abigail@company.com
- 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”.
“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
}
)
);
Any help, suggestions or ideas are welcome! Thank you!

Report
All responses (
Answers (