Power Automate Flow Trigger - Microsoft Teams "When keywords are mentioned" - power-automate

is there a way to get the value of the keyword that is mentioned to trigger the flow?
For example: im using the keyword "Seven", when the keyword is mentioned inside the body of a chat in teams, when it triggered the flow i just wanted to get the keyword "seven" inside the body of chat message and remove other words.
Thank in advance for your help ;)
Here's what i have done so far on my flow:
Flow
Flow Continuation
this is the output i get from the HTML to text action:
Good Morning! The reports have been uploaded for Group7, thank you!  Below are
the homes that were processed: APPV ARBR BTNY BUEN CDHV CTBT EGER FRVW GNV2 JEWH
KMNJ NGLE OZAN PVAL REGL RRAL RURL SACR SAYR SFLD SHHS SNCH TCST VILL The
following had issues with passwords: APPV RRAL SNCH Please review. Group Seven
i want to be able to extract the keyword "Seven" and parse out everything else on the message body.
the purpose is, i will use the keyword seven to trigger another set of flow.
Please note, im using multiple keywords on the trigger action, i have another set of flow i would like to be able to run depending on the keyword

Related

Dialogflow CX $param not showing in agent text

I am getting into CX and have a simple agent going but I cannot get the agent to respond with my filled parameter.
I have a page that asks for #DrinkFrequency and #DrinkChoice, I see both get filled correctly when I test the agent and $page.params.status = FINAL takes me to my next page that says
So you drink $session.params.DrinkFrequency and prefer to drink $session.params.DrinkChoice
But the agent says exactly that, it does not replace $session.params.DrinkFrequency or $session.params.DrinkChoice with the values the user gave. I know it must be a simple issue but I have tried to write $session.params.DrinkFrequency in a few different ways and I looked at the existing tutorial bots and they also have it with just the $ sign. Am I not saving the user given value?
The page that gets the values has the two parameters and they ask for the value in their "Initial prompt fulfillment" field.
You're referring to the entity type, while the display name is the name of your parameter.
If you replace $session.params.DrinkFrequency with $session.params.frequency and $session.params.DrinkChoice with $session.params.preference it should work.

How to use IBM Watson Context variables without entities?

Hi all Watson Developers!
I have a question, exposing that I need to know a bit more about context variables!
A user enters "Who owns the boat DUO ?" and my Dialog then uses the Intent "#owner_of_boatname" That works!
I then want to store the boatname in a variable $boatname, to pass it on to my webhook, as the value "$boatname".
If I create an entity with a list containing all possible boatnames, then it works, but what if I do not have all boatnames, and just want to pick up the $boatname from the user, and pass in on to the weebhook ? How do I fill out the handler then ?
I've tried to just put in "DUO" as value to my webhook, and that works fine, so the webhook itself works - I just need to be able to transfer variables to it!
How ?
Thanks a lot
Lars ;-) enter image description here
The ideal solution for this question should use A.I model created in Watson Knowledge Studio to identify names in user's text and deploy it to Natural Language Understanding instance which you would use the extract the name.
However, we can make a simpler solution, we must assume that the name of the boat will always be at the end of user's input and we can use a regular expression on Watson Assistant to extrat the name. You have to create a node before you pass to the webhook just to identify that user will pass the name of the boat, for example:
Assistant: What is the name of your boat?
User: The name of my boat is boatname
The node that return "What is the name of your boat?" should jump to a node and wait to user request and the condition of this node should always be true. When the user says "The name of my boat is boatname" the node with the condition always true should have context variable with the following regex expression in value context area:
"<? input.text.extract('\s\"?(\w+)\"?$',0) ?>"
This regex rule identify the last word of a phrase with double quotes or not.
Once you have extracted the boat's name you can make the node request you webhook.
Here we are using the SpeL language to access the assistant payload to extrat the last word of a phrase. You can find more information about functions on context variables here here.

How do I use capture groups in Regular Expressions in Bot Composer

I am attempting to build a Microsoft Teams bot using the Bot Framework Composer. What I would like to do is create an integration with ServiceNow. The goal would be that if anyone posts a record number (ex. REQ0123456, INC0123456, KB0123456) into the group or direct chat (with the bot), the bot would look up that record and provide a card or a short summary of the record to the chat.
To avoid creating a completely separate intent for each record type, I was hoping to use RegEx to gather the match into 2 capture groups; one for the tbl_code and one for the number.
Here is the entry for the user input:
> add some example phrases to trigger this intent:
- look up {conversation.sn_record.tbl_code=REQ}{conversation.sn_record.number=0123456}
- lookup {conversation.sn_record.tbl_code=REQ}{conversation.sn_record.number=0123456}
- {conversation.sn_record.tbl_code=REQ}{conversation.sn_record.number=0123456}
- lu {conversation.sn_record.tbl_code=REQ}{conversation.sn_record.number=0123456}
> entity definitions:
# regex sn_record tbl_code, number = /([a-z]{2,4})([0-9]{7})/mi
The Issue I'm Having
I don't know how to get the values back from the individual capture groups. I would like to have them separate so that I can determine which table needs to be queried. I could probably just use the entire match and the search API in ServiceNow for the whole record string, but I would still like to know how to use capture group values.
I'm currently using turn.recognized.text, but I don't think this is the best method for what I'm looking to do. This returns the entire regex match.
I'm very new to this framework, so please be gentle. :) Let me know if there is more information I can provide.
Thanks all.
Best Regards,
Josh
I was able to figure this one out using the examples in the ToDosSample bot.
The answer was to use named capture groups and then add them to a dialog property to use in the corresponding dialog.
For reference here are the changes I had to make:
New Regex
(?<sn_record>(?<tbl_code>[a-z]{2,4})(?<numbers>[0-9]{7}))
New Dialog Properties
dialog.sn_record = #sn_record
dialog.sn_tbl_code = #tbl_code
dialog.sn_numbers = #numbers
New response
- Okay, looking up ${dialog.sn_tbl_code}${dialog.sn_numbers}

how can i add a user to UCM workflows using IDOC script?

I'm trying to implement logic in the oracle UCM workflow, that when a document is rejected, it should add the original author to the workflow step.
I've tried the following idoc script on the entry point of the previous step but it didn't work
<$if wfAction like "REJECT"$>
<$trace(wfGet("originalAuthor") , "#console")$> // this code prints and work
<$trace("#all", "#console")$> // this code prints and work
<$wfAddUser(wfGet("originalAuthor"), "user")$> // this
<$endif$>
the originalAuthor is a variable that i set in the beginning of the workflow , so i can keep track of the original authoer , if other user checked out / checked in other document .
wfAddUser can only be used in a token.
If you haven't worked with workflow tokens before, have a look in the Options menu in Workflow Admin. I don't know what problem you are trying to solve, but by the looks of it, my guess is that tokens are what you are looking for.

Qnamaker API Replace Alteration

I have multiple QnA knowledgebases in our Qnamaker. I used QnaMaker API and successfully uploaded alterations data using PUT method
PUT https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/alterations
and I am able retrieve the same using the GET method
GET https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/alterations
But still my bot is not recognizing the alternate keywords. Any thoughts?
Is there any limit on the max number of alternations that we can add.I uploaded around 1000 alternate keyword combinations.
For example:
In my Knowledge Base, here is one example question
What is Variable API?
I want the bot to identify "What is VariableAPI ?" and "What is Variable API" as the same question and respond with the same answer. For this, I uploaded alternations using the Qnamaker API ( PUT) method.
{ "wordAlterations": [
{
"alterations": [
"Variable API",
"VariableAPI"
]
}
] }
Please, anyone, help me understand what I am doing wrong and why my QnAmaker can't identify them as different words

Resources