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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Set condition on sende...
Power Automate
Unanswered

Set condition on sender name with Outlook.com connector

(0) ShareShare
ReportReport
Posted on by 21

Hi,

 

I am using Power Automate to filter my SPAM folder of my hotmail email address (Outlook.com connector).

 

What I would like to do is the following: move an email to another folder (e.g. Deleted items) when the senders name contains a certain value. E.g. with the email comming from "Saatva Affiliate <office@marticultural.com>" I would like to trigger on the value "Saatva" and not on the actual email address (which is constantly changing 😉 ).

 

I have tried this:

jrecasens_0-1667639271999.png

 

and I have tried this:

jrecasens_1-1667639323869.png

, but they both do not trigger when an email arrives from anything containing "Saatva" in the senders name.

 

I know that with the Office 365 Outlook connector you can use the Export email (V2) to got the full sender info. I could not find such an action for the Outlook.com connector. 

 

Is it possible to this? 

 

Thanks for any help!

 

Jordi

Categories:
I have the same question (0)
  • schwibach Profile Picture
    2 Moderator on at
    Re: Set condition on sender name with Outlook.com connector

    When you click on a past flow run, you can take a look at the outputs (json) of your flow trigger. There you can check if there is something inside that object that you can use to filter.

    Once you have found that element, we can show you how to reference it in the condition.

    It will be well worth learning how to access information inside a json object.

  • jrecasens Profile Picture
    21 on at
    Re: Set condition on sender name with Outlook.com connector

    Thanks, I have already taken a quick look at that, but will look at it in more detail asap. I’ll get back to you. 

  • jrecasens Profile Picture
    21 on at
    Re: Set condition on sender name with Outlook.com connector

    Ok, so I checked the output, which you find below. This was from an e-mail send by “LumeDeodorant.com Associate <newsletter@xidesgolf.com>”. The strange thing (at least to me 🙂 ) is that I can’t find any reference to this sender name “LumeDeodorant.com Associate”. 

    So, now what? 🙂


    {
    "headers": {
    "Pragma": "no-cache",
    "Transfer-Encoding": "chunked",
    "Retry-After": "3600",
    "Vary": "Accept-Encoding",
    "Cache-Control": "no-store, no-cache",
    "Location": "https://flow-apim-europe-002-northeurope-01.azure-apim.net/apim/outlook/shared-outlook-2a51410a-8289-4460-9628-551d24ff7ef7/v2/Mail/OnNewEmail?folderPath=Id%3a%3aAQMkADAwATEyMzU3LTRjMmUtZGU2MC0wMAItMDAKAC4AAAOOtshxQTxuSYGYZeQ7AOElAQD22jadbzjfSKPZNUWuIWQNAAACASIAAAA%3d&importance=Any&fetchOnlyWithAttachment=false&includeAttachments=false&LastPollInformation=eyJMYXN0UmVjZWl2ZWRNYWlsVGltZSI6IjIwMjItMTEtMDVUMTI6Mzc6MDkrMDA6MDAiLCJMYXN0Q3JlYXRlZE1haWxUaW1lIjoiMjAyMi0xMS0wNVQxMjozNzowOSswMDowMCIsIkxhc3RNZXNzYWdlSWQiOiJBUU1rQURBd0FURXlNelUzTFRSak1tVXRaR1UyTUMwd01BSXRNREFLQUVZQUFBT090c2h4UVR4dVNZR1laZVE3QU9FbEJ3RDIyamFkYnpqZlNLUFpOVVd1SVdRTkFBQUNBU0lBQUFEMjJqYWRiempmU0tQWk5VV3VJV1FOQUFYTjFWWUZBQUFBIiwiTGFzdEludGVybmV0TWVzc2FnZUlkIjoiPGliOTkzLjg4NzU0OTQ3MC4wNzE0NjExNzg1NzA1NTkzMDYzLmd5dHZucXRxLnNzY2dteEB3ZWItd3pmeTEtMzU2PiJ9",
    "Set-Cookie": "ARRAffinity=c9362347299ae913aff62952bcdb42570ebd7b49cee6eb8e83c4fe07b8f50d32;Path=/;HttpOnly;Secure;Domain=outlook-we.azconn-we-003.p.azurewebsites.net,ARRAffinitySameSite=c9362347299ae913aff62952bcdb42570ebd7b49cee6eb8e83c4fe07b8f50d32;Path=/;HttpOnly;SameSite=None;Secure;Domain=outlook-we.azconn-we-003.p.azurewebsites.net",
    "x-ms-request-id": "a4250ce6-4cc9-a00f-93c9-2ee6b15c6ee7;b71636b8-bc03-3abc-cfbd-9942a052b24f",
    "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
    "X-Content-Type-Options": "nosniff",
    "X-Frame-Options": "DENY",
    "Timing-Allow-Origin": "*",
    "x-ms-apihub-cached-response": "true",
    "x-ms-apihub-obo": "false",
    "Date": "Sat, 05 Nov 2022 12:37:26 GMT",
    "Content-Type": "application/json; charset=utf-8",
    "Expires": "-1",
    "Content-Length": "1718"
    },
    "body": {
    "Id": "AQMkADAwATEyMzU3LTRjMmUtZGU2MC0wMAItMDAKAEYAAAOOtshxQTxuSYGYZeQ7AOElBwD22jadbzjfSKPZNUWuIWQNAAACASIAAAD22jadbzjfSKPZNUWuIWQNAAXN1VYFAAAA",
    "DateTimeReceived": "2022-11-05T12:37:09+00:00",
    "HasAttachment": false,
    "InternetMessageId": "<ib993.887549470.0714611785705593063.gytvnqtq.sscgmx@web-wzfy1-356>",
    "Subject": "Smell Better Naked. Get over 30% off, 2 Free Products, & Free Shipping",
    "BodyPreview": "",
    "Importance": 1,
    "ConversationId": "AQQkADAwATEyMzU3LTRjMmUtZGU2MC0wMAItMDAKABAAn2vx2fcqAk6afSgoAKFeugk=",
    "IsRead": false,
    "IsHtml": true,
    "Body": "<html><head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"></head><body><center><div style=\"width:600px\"><a href=\"http://www.xidesgolf.com/6q7X57_VkOLDWra2QlnrUC8fdwUaxrdSH0FE8SQ0vnOfdFqrNd6ElZzxe7Y4rC1rNU-hHS27ghmLQgh48WeoSyTSZ1uP5Z6twklhFfz-dS1eyyb5pT2CTWlcWn0Kv9sbyEcp5EUsv5fU56wx41Oizw==\"><img src=\"http://www.xidesgolf.com/LCRqtungFfro4HRyujUhOHf4H57sv_RKpE4Y8mMMuvq743Mxw5e_2qySpf31_mEGkPeXRD6hz0fnLlTlWmK9nncAvYgLsJS5w25WoZRI336RD7LSLRPaM7A-uoCEdy4ubmt2nUQD2ms5B_sfPtuCh329mnNAOteddJDnI1qp1mYJoQMalf3iRSC2ohO_vPpzrRc3tLEykv_7bNwEW6TQjw==\" width=\"650\" height=\"1000\" alt=\"\"></a> <a href=\"http://www.xidesgolf.com/Chrhnfrl2D-VTKpkOIT4Bi_ImojaMyAXuyDf_fGKvpCfdFqrNd6ElZzxe7Y4rC1rNU-hHS27ghmLQgh48WeoSyTSZ1uP5Z6twklhFfz-dS1eyyb5pT2CTWlcWn0Kv9sbyEcp5EUsv5fU56wx41Oizw==\"><img alt=\"\" border=\"0\" class=\"img-max\" src=\"http://www.xidesgolf.com/CvmIGausJg_EDRcLRwUMlJbQwBL00_kHbTGPG9z33A6abBwDQ6IewCbUq4Ct8CNKoKc5QQXf8clk_bzZJPWCy3QVdTa33IA0dV7aQo-NCl0=\" width=\"649\" height=\"70\"></a> </div></center></body></html>",
    "From": "newsletter@xidesgolf.com",
    "Attachments": []
    }
    }

  • schwibach Profile Picture
    2 Moderator on at
    Re: Set condition on sender name with Outlook.com connector

    Can you try getting the email with this action using the id from your trigger?

    Let's see what the outputs of that flow step will give us.

     

    schwibach_0-1667656371569.png

     

  • jrecasens Profile Picture
    21 on at
    Re: Set condition on sender name with Outlook.com connector

    Like this, right:

    jrecasens_0-1667659377829.png

     

    I wonder why that would give different output. But lets see...

  • jrecasens Profile Picture
    21 on at
    Re: Set condition on sender name with Outlook.com connector

    The output of the Get email step (the v2 you reffered to is only availabel for the Office 365 Outlook connector, not the Outlook.com connector) is:

    jrecasens_1-1667659770497.png

     

    The raw output is:

    {
    "statusCode": 200,
    "headers": {
    "Pragma": "no-cache",
    "Transfer-Encoding": "chunked",
    "Vary": "Accept-Encoding",
    "Cache-Control": "no-store, no-cache",
    "Set-Cookie": "ARRAffinity=4506fed21ae7329212e22736c2f80898a13d9fb6173622080112cc34ac5998d2;Path=/;HttpOnly;Secure;Domain=outlook-we.azconn-we-003.p.azurewebsites.net,ARRAffinitySameSite=4506fed21ae7329212e22736c2f80898a13d9fb6173622080112cc34ac5998d2;Path=/;HttpOnly;SameSite=None;Secure;Domain=outlook-we.azconn-we-003.p.azurewebsites.net",
    "x-ms-request-id": "164110e9-87a1-6864-c4f3-16c7f755bf82;4821f60f-75e4-e4a2-924a-2b9f13004766",
    "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
    "X-Content-Type-Options": "nosniff",
    "X-Frame-Options": "DENY",
    "Timing-Allow-Origin": "*",
    "x-ms-apihub-cached-response": "true",
    "x-ms-apihub-obo": "false",
    "Date": "Sat, 05 Nov 2022 14:43:55 GMT",
    "Content-Type": "application/json; charset=utf-8",
    "Expires": "-1",
    "Content-Length": "1013"
    },
    "body": {
    "Id": "AQMkADAwATEyMzU3LTRjMmUtZGU2MC0wMAItMDAKAEYAAAOOtshxQTxuSYGYZeQ7AOElBwD22jadbzjfSKPZNUWuIWQNAAACAQkAAAD22jadbzjfSKPZNUWuIWQNAAXN1YECAAAA",
    "DateTimeReceived": "2022-11-05T14:43:37+00:00",
    "HasAttachment": false,
    "InternetMessageId": "<VI1PR06MB6399F8B8924E2DEC7D243A37BB3A9@VI1PR06MB6399.eurprd06.prod.outlook.com>",
    "Subject": "test",
    "BodyPreview": "",
    "Importance": 1,
    "ConversationId": "AQQkADAwATEyMzU3LTRjMmUtZGU2MC0wMAItMDAKABAATX7DzHPgYE_YEqvbrkqrGw==",
    "IsRead": true,
    "IsHtml": true,
    "Body": "<html><head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"><style type=\"text/css\" style=\"display:none\">\r\n<!--\r\np\r\n\t{margin-top:0;\r\n\tmargin-bottom:0}\r\n-->\r\n</style></head><body dir=\"ltr\"><div class=\"elementToProof\" style=\"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)\"><br></div></body></html>",
    "From": "jrecasens@hotmail.com",
    "To": "jrecasens@hotmail.com",
    "Attachments": []
    }
    }

  • schwibach Profile Picture
    2 Moderator on at
    Re: Set condition on sender name with Outlook.com connector

    It seems that it gets lost in that action, too. Pity!

     

    I did some more research: here they seem to have found a solution using the export email action.

    If you post the outputs of that action, we can take a look if it works.

     

    https://powerusers.microsoft.com/t5/Using-Flows/Outlook-365-Get-emails-displayed-name-of-the-sender/td-p/59115

     

     

  • jrecasens Profile Picture
    21 on at
    Re: Set condition on sender name with Outlook.com connector

    Thanks for all your help! Do you think that this will also work for my Hotmail address? My experience is that I can only add actions for the Outlook.com connector and not for the Office 365 connector. Or does this workaround take that into account as well?

  • jrecasens Profile Picture
    21 on at
    Re: Set condition on sender name with Outlook.com connector

    Hi @schwibach, thanks again for your suggestion. I read the post you mentioned and as I thought, I don’t think this will help in my situation.

    • The first suggestion only works for senders within the same organization (and I also think is only available for Office 365 connector). 
    • The seconds suggestion with the export email also only works with the Office 365 connector. 

    I beginning to think that it is simply not possible with the Outlook connector. 

  • Verified answer
    VictorIvanidze Profile Picture
    13,060 on at
    Re: Set condition on sender name with Outlook.com connector

    Hi @jrecasens,

    the only possible way I know to get the sender name for  outlook.com connector is forwarding a message to yourself.

    The forwarded message will contain the initial message sender name in the body.

    Very ugly method, I know.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard