cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sn12C
Frequent Visitor

Update SharePoint List Item based upon Email Conversation ID

I have a flow that uses data from a Sharepoint List to send out an email from a shared mailbox when there is a change in the Status column of the list.  When the recipient of the email responds, I simply want to update that specific Sharepoint list item. 

 

So I've built a second flow for incoming emails that uses the Condition of checking the Outlook Conversation ID against the "Conversation ID" captured in the original Sharepoint list item to determine whether or not to update.  Unfortunately when it finds the condition to be true it does an Update Item to all items in the list.

 

I am pretty sure it is because I am using "Get Items" to check for the matching Conversation ID instead of Get Item (which is not possible initially) and so the system is then doing an "Apply to Each" across all items.  Attached is a screenshot of my flow set up. 

 

I have also tried numerous variations including initializing and setting variables, filter arrays, and more.  I also have had a sneaking suspicion a few times that the email sent out from the flow, may have a different Conversation ID, but thus far - when I include the ConvID in the email body, I am seeing it is the same as what comes back in with the email reply.  I'd be very keen and grateful to get some guidance on the best method to achieve this.  

10 REPLIES 10
Caspar_Rubin
Solution Sage
Solution Sage

Hey

 

I suggest you simply use a filter query the Get items action to only get the items back you want. Then you can use the Dynamic content ID from that action to update the item. You don't need the "Get item" action.

 

Basically like this:

Caspar_Rubin_0-1701313220072.png

 

Filter Query in the Get items action should look something like this:

ConversionId eq '@{triggerOutputs()?['body/conversationId']}'

You have to use the internal name of the SharePoint column... so if your SharePoint column is called "Conversation Id", it might be "ConversionationId" or "Conversation%20Id" or something like that... Here's a guide on how to find the internal name of your column: https://sharepointstuff.com/2022/02/09/find-internal-column-name/

 

 

Cheers

sn12C
Frequent Visitor

Thanks for the response - I have tried this in the past without much success.  Just tried it again and continue to get "The expression "......" is not valid.  Creating query failed.  Attached is a screen cap.  

If you had a space in your column then you would use _x0020_ instead of %20.

 

Conversation_x0020_ID eq '@{triggerOutputs()?['body/conversationId']}'

 

grantjenkins_0-1701672392749.png


----------------------------------------------------------------------
If I've answered your question, please mark the post as Solved.
If you like my response, please consider giving it a Thumbs Up.
sn12C
Frequent Visitor

Thanks for the reply but I still get the same error.  Meanwhile I have handled all this with a filter array and think I am making some progress - only remaining problem is if I use the Item ID from Get Items - it goes and updates every item in the SharePoint list, rather than the actual Item I want to update.  Not sure if this is a consequence of my Filter or the fact I am choosing the ID from "Get Items".  Attached are some screen captures

The reason it's not working correctly is that you filter the results using the Filter array, but then just use the output from the Get items action which includes all items. You would need to use the output from the Filter array in your Apply to each.

 

This is how I would build your flow. I think you just need to confirm what the internal name is for your Conversation ID column and the Submission Status choice column.

 

See full flow below. I'll go into each of the actions.

grantjenkins_0-1701758600817.png

 

I've used When a new email arrives, but would be the same for When a new email arrives in a shared mailbox.

grantjenkins_1-1701758643277.png

 

Get items has two conditions. One for the Conversation ID and one for the Submission Status which you had within your Apply to each before. This should return only the item you need to update.

 

ConversationID = '@{triggerOutputs()?['body/conversationId']}' and SubmissionStatus ne 'NEW'

grantjenkins_2-1701758762805.png

 

Apply to each will iterate over the items returned from Get items. In our case it should only be one item, so the Apply to each will only run once.

grantjenkins_3-1701758815444.png

 

Update item would use the ID from Get items and whatever other fields you need, including setting your Submission Status to UPDATE.

grantjenkins_4-1701758870926.png

 

To check the internal names of your columns, go into the List settings, then click on your column. It will show the internal name at the end of the URL as shown below.

grantjenkins_6-1701759068255.png


----------------------------------------------------------------------
If I've answered your question, please mark the post as Solved.
If you like my response, please consider giving it a Thumbs Up.
sn12C
Frequent Visitor

Thank you very much - I do think this makes sense and does get me closer to the solution but the query itself is still failing to function (see attached).  Even when I simply run the query against only one field (say ConversationID) it fails.  One the matter of my "Submission Status" column, that is a choice column which may be the reason that needs a filter array vs a query.  I have simplified its name to merely "Status" to avoid any naming convention issues which may have been related to a two word column name  

sn12C
Frequent Visitor

After further research, I am seeing that because my ConversationID field is a Multi-line text field and because my Status field is a choice field, the Filter Query in "Get Items" is expected to fail.  It seems the best route is using Filter Array to ensure I get the appropriate item, but I welcome any recommendations anyone may have.

sn12C
Frequent Visitor

Still in need of some assistance here - in the event anyone has any guidance.  Thanks.

The Status Choice field would work as expected in the Filter Query of Get items. However, you would then need to use a Filter array to further filter on the ConversationID since it's a multi line of text column.

 

See full flow below. I'll go into each of the actions.

grantjenkins_0-1702178186121.png

 

Get items only contains the filter on the Submission Status column. Just confirming this is the condition you want - won't bring any items back that are set to NEW.

SubmissionStatus ne 'NEW'

grantjenkins_1-1702178242137.png

 

Filter array check to see if the ConversationID column contains the Conversation Id from the email.

grantjenkins_2-1702178309515.png

 

Apply to each iterates over each of the items returned from the Filter array.

grantjenkins_3-1702178353902.png

 

Update item uses the following expression to get the ID of the current item we are iterating over.

item()['ID']

grantjenkins_4-1702178410287.png


----------------------------------------------------------------------
If I've answered your question, please mark the post as Solved.
If you like my response, please consider giving it a Thumbs Up.

Hello,

Sorry for going MIA on this, but got pulled into other initiatives and this fell to the back burner.  I have implemented the above solution yet it still fails - below is the error message I get.  Is it potentially due to the ConversationID column being a multi-line column? 

Error Message:
"The field 'ConversationID' of type 'Note' cannot be used in the query filter expression."

Helpful resources

Announcements

Check Out the February 2024 Dynamics 365 Newsletter

Some of our most active Power Platform Community members are also active in our D365 Community. This month, we are excited to share the latest news from the D365 Community with you.   Our Dynamics365 Community has updated yet again! Since launching in June of 2023, the new Community has seen consistent updates and exciting new ways to feature and celebrate its members. In the latest edition of the Dynamics365 Community newsletter, you can see the new Leaderboard feature! This feature showcases which Community members have earned the most points over the previous month, enabling them to see how they are doing with their engagement--and their progress toward Super User status. Visit the leaderboard for yourself: https://aka.ms/d365clb     Read the whole newsletter featuring the new leaderboard as well as the D365 Monthly Community Member spotlight, FastTrack Tech Talks, upcoming events, and more. February 2024 Dynamics 365 Community Newsletter

Celebrating a New Season of Super Users with Charles Lamanna, CVP Microsoft Business Applications

February 8 was the kickoff to the 2024 Season One Super User program for Power Platform Communities, and we are thrilled to welcome back so many returning Super Users--as well as so many brand new Super Users who started their journey last fall. Our Community Super Users are the true heroes, answering questions, providing solutions, filtering spam, and so much more. The impact they make on the Communities each day is significant, and we wanted to do something special to welcome them at our first kickoff meeting of the year.   Charles Lamanna, Microsoft CVP of Business Applications, has stressed frequently how valuable our Community is to the growth and potential of Power Platform, and we are honored to share this message from him to our 2024 Season One Super Users--as well as anyone who might be interested in joining this elite group of Community members.     If you want to know more about Super Users, check out these posts for more information today:    Power Apps: What is A Super User? - Power Platform CommunityPower Automate: What is A Super User? - Power Platform Community Copilot Studio: What is A Super User? - Power Platform Community Power Pages: What is A Super User? - Power Platform Community

February 2024 User Group Update: Welcoming New Groups and Highlighting Upcoming Events

It's a new month and a brand-new year, which means another opportunity to celebrate our amazing User Groups!Each month, we highlight the new User Groups that have joined the community. It's been a busy season for new groups, because we are thrilled to welcome 15 New User Groups! Take a look at the list below, shared by the different community categories. If your group is listed here, give this post a kudo so we can celebrate with you!   We love our User Groups and the difference they make in the lives of our Community! Thank you to all the new User Groups, new User Group leaders--we look forward to hearing about your successes and the impact you will leave!   In addition to our monthly User Group spotlight, it's a great time to share some of the latest events happening in our User Group community! Take a look at the list below to find one that fits your schedule and need! There's a great combination of in-person and virtual events to choose from. Also, don't forget to review the many events happening near you or virtually! It's a great time of year to connect and engage with User Groups both locally and online. Please Welcome Our NEW User Groups   Power Platform: Heathcare Power Platform User Group Power Platform Connect Hub Power Platform Usergroup Denmark Mexico Norte- Power Platform User Group Pune Power User Group Sudbury Power Platform User GroupMicrosoft User Group GhanaMPPBLR - Microsoft Power Platform Bengaluru User Group Power Apps:   Myrtle Beach Power Platform User GroupAnanseTechWB PowerApps Copilot Studio: Pathfinders Power Platform Community Dynamics365: Cairo, Egypt MSD 365 Business Central/NAV/F&O User GruopMS Dynamics 365 Business Central LatamCincinnati OH D365 F&O User Group February User Group Events February 2024 Cleveland Power Platform User GroupPortallunsj - Februar 2024Indiana D365/AX February User Group MeetingQ1 2024 KC Power Platform and Dynamics 365 CRM Users Group 

January 2024 Community Newsletter

Welcome to our January Newsletter, where we highlight the latest news, product releases, upcoming events, and the amazing work of our outstanding Community members. If you're new to the Community, please make sure to follow the latest News & Announcements in each Community and check out the Community on LinkedIn as well! It's the best way to stay up-to-date in 2024 with all the news from across Microsoft Power Platform and beyond.      COMMUNITY HIGHLIGHTS Check out the most active community members of the last month! These hardworking members are posting regularly, answering questions, giving (and receiving!) kudos, and consistently providing top solutions in their communities. We are so thankful for each of you--keep up the great work! If you hope to see your name here next month, make it your New Year's Resolution to be more active in the community in 2024.   Power AppsPower AutomateCopilot StudioPower PagesWarrenBelzWarrenBelzPstork1saudali_25LaurensMPstork1stephenrobertLucas001AARON_ClbendincpaytonSurendran_RANBNived_NambiarMariamPaulachanNikhil2JmanriqueriosANBJupyter123rodger-stmmbr1606Agniusstevesmith27mandelaPhineastrice602AnnaMoyalanOOlashynBCLS776grantjenkinsExpiscornovusJcookSpongYeAARON_CManishSolankiapangelesPstork1ManishSolankiSanju1Fubar   LATEST NEWS Power Platform 2024 Release Wave Highlights This month saw the 2024 Release Wave 1 plans for Microsoft Power Platform and Microsoft Dynamics 365- a compilation of new capabilities planned for release between April and September 2024. Click here to read Corporate Vice President Maureen (Mo) Osborne's detailed breakdown of the upcoming capabilities, and click the image below to check out some of the Power Platform 2024 Release Wave 1 highlights.     "What's New" Power Platform Shorts Series This month we also launched our brand-new 'Power Shorts' series on YouTube - a selection of super sweet snapshots to keep you in the loop with all the latest trends from across the Power Platform and beyond. Click the image below to check out the entire playlist so far, and don't forget to subscribe to our YouTube channel for all the latest updates.   Super User In Training (S.U.I.T) It was great to see the Power Platform Community officially kick off Season One of their Super User in Training (SUIT) program this month! Their first meeting saw an amazing turnout of over 300 enthusiastic participants who started their dynamic journey toward becoming Super Users. Huge thanks to Manas Maheshwari, Eric Archer, Heather Hernandez, and Duane Montague for a fantastic kick-off. The first meeting also saw seasoned Super User, Drew Poggemann, share invaluable insights on navigating the #MicrosoftCommunity with finesse. Many thanks to Drew for setting the stage and emphasizing the importance of active engagement and the art of providing thoughtful community solutions. If you want to learn more about the features and benefits of gaining Super User status, click the image below to find out more, and watch this space for more info about Season Two and how you can SUIT UP in the community!     UPCOMING EVENTS Microsoft 365 Community Day - Miami - February 1-2, 2024 It's not long now until the Microsoft 365 Community Day Miami, which will be taking place at the Wolfson Campus at Miami Dade College on 1-2 Feb. 2024. This free event is all about unlocking the full potential of Power Platform, Microsoft 365, and AI, so whether you’re a tech enthusiast, a business owner, or just curious about the latest Microsoft advancements, #M365Miami is for you.   The event is completely free and there will sessions in both English and Spanish to celebrate the vibrant and diverse make-up of our amazing community. Click the image below to join this amazing Community Day in Miami and become a part of our incredible network of learners and innovators!     Microsoft Fabric - Las Vegas - March 26-28, 2024 Exciting times ahead for the inaugural #MicrosoftFabric Community Conference on March 26-28 at the MGM Grand in Las Vegas. And if you book now, you can save $100 off registration! The Microsoft Fabric Conference will cover all the latest in analytics, AI, databases, and governance across 150+ sessions.   There will be a special Community Lounge onsite, interactive learning labs, plus you'll be able to 'Ask the Experts' all your questions to get help from data, analytics, and AI specialists, including community members and the Fabric Customer Advisory Team. Just add the code MSCUST when registering for a $100 discount today. Click the image below to find out more about the ultimate learning event for Microsoft Fabric!     Microsoft 365 Conference - Orlando - April 30 - May 2, 2024 Have you added The Microsoft 365 Conference to your community calendar yet? It happens this April 30th - May 2nd in Orlando, Florida. The 2024 Microsoft 365 Conference is one of the world’s largest gatherings of Microsoft engineers and community, with a strong focus on Power Platform, SharePoint, Azure, and the transition to an AI-powered modern workplace.   Click the image link below to find out more and be prepared to be enlightened, educated, and inspired at #M365Conf24!   LATEST COMMUNITY BLOG ARTICLES Power Apps Community Blog Power Automate Community Blog Copilot Studio Community Blog Power Pages Community Blog Check out 'Using the Community' for more helpful tips and information: Power Apps, Power Automate, Copilot Studio, Power Pages  

Super Users 2024 Season One is Here!

   We are excited to announce the first season of our 2024 Super Users is here! Our kickoff to the new year welcomes many returning Super Users and several new faces, and it's always exciting to see the impact these incredible individuals will have on the Community in 2024! We are so grateful for the daily difference they make in the Community already and know they will keep staying engaged and excited for all that will happen this year.   How to Spot a Super User in the Community:Have you ever written a post or asked for help in the Community and had it answered by a user with the Super User icon next to their name? It means you have found the actual, real-life superheroes of the Power Platform Community! Super Users are our heroes because of the way they consistently make a difference in the Community. Our amazing Super Users help keep the Community a safe place by flagging spam and letting the Community Managers know about issues. They also make the Community a great place to find answers, because they are often the first to offer solutions and get clarity on questions. Finally, Super Users share valuable insights on ways to keep the Community growing, engaging, and looking ahead!We are honored to reveal the new badges for this season of Super Users! Congratulations to all the new and returning Super Users!     To better answer the question "What is a Super User?" please check out this article: Power Apps: What is A Super User? - Power Platform CommunityPower Automate: What is A Super User? - Power Platform Community Copilot Studio: What is A Super User? - Power Platform Community Power Pages: What is A Super User? - Power Platform Community

Did You Attend the Microsoft Power Platform Conference in 2022 or 2023? Claim Your Badge Today!

If you were one of the thousands of people who joined us at the first #MPPC Microsoft Power Platform Conference in 2022 in Orlando--or attended the second-annual conference in Las Vegas in 2023--we are excited to honor you with a special community badge! Show your support for #MPPC Microsoft Power Platform Conference this year by claiming your badge!           Just follow this link to claim your badge for attending #MPPC in 2022 and/or 2023: MPPCBadgeRequest    Want to earn your badge for 2024? Just keep watching our News & Announcements for the latest updates on #MPPC24.

Users online (2,718)