Amazon lex Runtime Operations - amazon-lex

when I was using Amazon Runtime service as an API for PostText/PostContent operations, I observed that you can enter only the user input that the lex matches with the utterances, I need to know whether we can fill the slot values using the lex API PostText/PostContent operations?
The reason i was using Lex runtime service is that Lex doesn't support filling slot types of user location(latitude and longitude) and i was using another webhook(nodejs server, i will get coordinates when a user sends location) to connect to the facebook messenger bot, then i will call Lex Rutime service!

You can not fill the slots using the PostText/PostContent operations. You will have to use AWS.LexModelBuildingService.
The way this works, create an intent on the console, select a lambda for for initialization and validation. This will get called when the intent gets activated and then inside your Lambda you can fill out slots depending on user's input.
You can also use a Lambda in Fulfillment, but this will only get called when all required slots and filled. If you have several slots but they are not required, the Fulfillment will be called automatically in the first try.

Related

Microsoft purview API call

I'm looking to integrate Microsoft's Purview DLP in my web application. My application sends email so I want to block any sensible information from being sent.
Basically a user is going to be under a Microsoft Purview policy to prevent data losses. I want to integrate his DLP policy within my web application.
My two main question were: Is there an Api call that can retrieve then sensitivity label of a certain document of a user? And is there an Api call that can scan a document or string with the regex expression of Microsoft Purview?
Example: Let's say I want to send an email with a document, I want to see through an Graph Api call if we can retrieve the sensitivity label of Microsoft Purview of a certain document linked to a specific user. Then I want to scan the email content and the document content with Microsoft's Purview regex expression to see if there's any sensible information within the email. Ideally scanning the data would be an Graph Api call with a string containing the document and email content and then getting the response from the Api if the email can be sent or not.
Is there a way to do this? All the documentation I found was pretty basic and wasn't answering my questions.
To get the sensitive label through the API:
GET /users/{usersId}/security/informationProtection/sensitivityLabels/{sensitivityLabelId}
or
GET /me/security/informationProtection/sensitivityLabels/{sensitivityLabelId}
For more info:https://learn.microsoft.com/en-us/graph/api/security-sensitivitylabel-get?view=graph-rest-beta#http-request

How do I programmatically create a video meeting on teams.microsoft.com?

This might seem rather basic, it seems like it should be the simplest possible API call to make with any video call provider.
I need to:
Get an API key for my web application.
Create a meeting link with the video call provider using the key.
Share that link with an external user via e-mail (or SMS, or whatever, my app does that bit).
Redirect then internal user to the link (possibly in an <iframe>).
Optionally end the meeting afterwards so the link can't be re-used.
Optionally report on who attended and for how long.
It seems like that should be fairly simple (or at least straightforward), and for every other provider I've looked at it is, but for Teams I have struggled to get started.
For instance, in Skype this is (or used to be) simply a POST to https://api.join.skype.com/v1/meetnow/createjoinlinkguest.
I think the API key needs to be generated in Azure, and then the meeting request needs to be made via Microsoft Graph but it also appears like it is not possible to use this API unless a delegated user - i.e. users would have to sign in via their "work or school account".
I think that would mean switching our entire user model over to Microsoft's, a prohibitively large amount of work just to generate video call links.
Is there a way to generate these links without requiring the user to sign in via Microsoft?
Is this only possible via an Azure application instance and Graph API? It seems a very long way round compared to any other provider?

I need some kind of decission module in flowground

I'm trying to send different message cards to multiple teams channels.
I have already created a webhook (telekom/webhook) for this which gives me the right variables via json.
There are four department receiver channels (telekom/rest-api-component) which are also configured to send pre-formatted teams message cards with the variables they have submitted.
Currently this happens to all channels at the same time. In between I would need an "action" in which I can decide which of the channels is served based on the input values. Unfortunately I don't find anything suitable due to the variety of the apis. Do you know how I could realize this ? So something like if value department = Backoffice then (Teams "Account Management") action.
In order to be able to talk with the different applications from Office 365 I wanted to use the Microsoft Graph api which is now available for some time. I couldn't find them in Flowground. Are you planning to include this module ?
For the implementation with Office365 flows this would be absolutely necessary for me.
I want to come back to this question: The CBR is a good choice for executing decisions indeed. But is is this the best solution in every situation? I do not think so.
Assume the following task:
Depending on an input parameter test you want to fire a request to different web services (WS1:google.de and WS2:bing.de)
Solution 1: You realize the requests with dedicated connectors for WS1 and WS2.
In this case you need the CBR in front of WS1 connector and WS2 connector to decide, what connector has to been used next.
Solution 2: You are able to realize both requests with REST-API connector. In this case you can use a JSONATA expression as URL mapping, e.g.
(test="google") ? "http://google.de" : http://bing.de
By using JSONATA expressions every connector has (limited) capability for executing decisions.
Solution 2 has a big advantage when you are using realtime flows. In this case you are able to reduce the number of connectors they are needed for running the flow and (very important from a cost perspective ) the number of permanently claimed token by this flow.
For reducing the complexity of JSONATA expressions (e.g. when you add further search engines) and for separation of individual configuration items you can use the configuration connector (we can discuss this in a separate thread if needed).
Solution 1 is the choice without alternative when you have to decide between different structures/connectors they need to be executed within a flow.
Please try the Content-Based-Router: https://doc.flowground.net/guides/content-based-router.html, it is available on the Connector Catalog.

Setting Lex Time Zone Request Attribute from Connect

I am creating a lex bot that uses an AMAZON.DATE slot. The documentation says I can use x-amz-lex:time-zone and I am trying to work out how to set that from the Contact Flow.
The Get Customer Input block allows you to specify session attributes. I have tried the following keys to no avail: x-amz-lex:time-zone and $.Lex.SessionAttributes.x-amz-lex:time-zone.
I feel this must be possible but I can't seem to find the right way to specify this request attribute via the session attributes.
Unfortunately, today is still yesterday.
This is because the time zone is not set from the sessionAttributes but must actually be passed in the requestAttributes and that is where Lex will look for and set the time zone accordingly.
Hopefully the Connect team will allow us to actually pass requestAttributes to Lex in the future.
If you must have it working now, then the workaround becomes pretty silly.
You could create another Lex bot just for doing speech-to-text and capture anything the user says, then pass the user input to a Lambda function which uses the PostText API to send to your real Lex bot. You can set requestAttributes in the PostText API and update the time zone that way.
There are some other benefits by using a Lambda function in between Connect and Lex such as catching Lex errors or logging Lex responses or logging more analytics data before and after Lex processes the inputs. So the extra work might actually be worth it.

Parse cloud code on iOS

from what I understood Cloud Code is like a server, we can declare functions (only javascript?) to make app running lighter. Should I put every query on Cloud Code instead of iOS app?
You don't have to put every query on Cloud Code but you can use it to host functions that should rest in a sever or you would like to change without requiring a app update.
As a quick example, you can create a function in cloud code to send a mail to a user friend, calculate some number with a variable that you don't know and want to change from time to time, or make some safety check with other servers before a payment.

Resources