The scenario:
I have a set of SharePoint pages that we use as wiki pages for our department. These are regular SharePoint pages, not to be confused with SharePoint's wiki pages. Our Page library in SharePoint has a single "line of text" column for keywords to tag to the wiki page. It's just texts separated by a comma and space.
The goal:
When someone in my department uses trigger words in a group message in Microsoft Teams, it will start the flow. These trigger words imply a question was asked, like "who," "what," "when," and "where." The flow will then scan their message for keywords used in our wiki library. If one or more are found, it will send an adaptive card back to them in Teams with suggested wiki articles based on the keywords found. Thankfully, I've been able to create a flow that does all of these things. I just have one issue.
Problem:
When someone uses more than one keyword that belongs to the same wiki article, the adaptive card suggests the same wiki more than once. I want to figure out how to consolidate them. I have no idea how to piece that together.
I assume I would need to use the array of keywords that were found in the Teams message and somehow compare them against the Get List Items data, then explain that two of the words belong to the same title and link.
I've provided some screenshots to better understand. I hope this helps, and thank you to anyone who can help with this