Azure LogicApp runs webjob and send email - azure-webjobs

I want to create an Azure LogicApps that has to launch and verify the status of a webjob. This is because I want to take an action if the webjob finishes its activities with an error and, in this case, the LogicApps has to send an email with an alert and restart the webjob.
I have tried to find some documentation about it on LogicApps site and in the editor but I can't find any connectors.
Any ideas, documentation or samples? Thank you

I thought my way could meet your requirements.
You could use a HTTP trigger to get the latest_run property with GET method. The URI would look something like https://{webapp-name}.scm.azurewebsites.net/api/triggeredwebjobs/{webjob-name}/. Then click advanced options, choose Basic Authentication. You could get username and password from publish profile or go to Webjobs on the Kudu then click the Properties. The trigger would be like the pic shows.
Then add a compose action, use HTTP Body as Inputs. After this , you could judge the status property. The whole flow would be like the below pic.
Note:when you use condition to judge status, you need to switch Designer to Code view, then change the value. The value should be "#outputs('Compose')['latest_run']['status']". Or you could refer my code view page.
Hope this could help you , If you still have other questions, please let me know.

Related

is there a way to know my app actions review status in console?

in app actions deployment documentation i can see
"After you upload your app to the Play Console, we'll contact you at the email in Play Console with more information regarding the status of your App Actions review."
but i didn't receive any mail regarding this after uploading my AAB with actions.xml to open testing.
Use the support form to ask about review status. There is no way to check for yourself.

Dialogflow CX | How to let the bot initiate the conversation?

Dialogflow ES has an event called 'WELCOME' which makes it possible for the bot to initiate the conversation.
How can I do the same in Dialogflow CX?
There is no entry fulfillment option in the Start Page of Dialogflow CX.
Edit:
Delete the 'Default Welcome Intent' route.
I am unable to perform this. I get the following error.
In 'Default Welcome Intent' change the intent from 'WELCOME' to nothing.
I get the following error. I have set the condition to true. I have also set the page transition to 'onboarding' page.
Please let me know if more screenshots are required.
To accomplish what you're asking, the easiest way would be to:
Open the "Default Start Flow" and select its Start page.
Remove all routes and add a new one.
This new route takes a "custom condition" in the form of true (in the condition pane, click on customize expression and then just type true) and goes to a new page
called "Onboarding" (on the bottom of the route creation page, click on new page and name it Onboarding).
Go to the Onboarding page and add an entry fulfilment "Hello there, how are you doing today?"
in this way every time the default start flow is activated (window is opened) the bot will use that fulfilment.
EDIT:
ok, i tried creating a new agent and i think i solved the problem.
it seems as though we can't erase the default welcome intent, but it doesn't matter.
i created two pages: onboarding and first page. from start i added an always true route to the onboarding page, and i did the same with the onboarding and first page. As you can see from the testing console we only get the expected behaviour for the second transition, look at this:
start page:
onboarding page:
"first" page:
After looking for info on the documentation i think i understood this: from the testing console, google doesn't let you see the actual behaviour of the conversation. If you see the screenshots, when i say "hi" and go the the onboarding page, i get immediately brought to the next page by that "true" transition. Since the same exact sequence is on the start page, the same behaviour should apply there: you only can't see it in the console because "opening the window" in the console is not the same as opening the conversation "in real life".
So, what i suggest you to do is create a new integration or develop a testing environment for the bot, say a website with the messenger integration, a telephony integration or whatever else, and test this onboarding on there. Speaking from personal experience, try with the messenger one maybe: you get a link and you just embed the script in any webpage (works well and easy).
It should work, as in, as soon as you open the conversation, the bot should go the onboarding page and say "hello there!"
So, I'm not sure what your end use-case is, but DFCX (at it's core) isn't exactly designed to initiate an unsolicited message because it's really just a language model with a bunch of features built on top of it.
With that being said, if you want to create a pop-up window for your website chat-widget, you can actually configure this in the integration settings with your embed code. Here's an example:
//The DF Messenger element:
<df-messenger df-cx="true" chat-title="Agent Name" agent-id="<your agent ID>" language-code="en" expand="true"></df-messenger>
//The window load script :
<script src="https://www.gstatic.com/dialogflow-console/fast/messenger-cx/bootstrap.js?v=1"></script><script>
window.addEventListener('dfMessengerLoaded', function (event) {
const dfMessenger = document.querySelector('df-messenger');
const openText = ('<The Text You Want To Display On Page Load>');
dfMessenger.renderCustomText(openText);
});
</script>
Please note this will only work if you have the DF Messenger Integration enabled on your agent. See the docs for integrating DF Messenger here
1.Use the attribute intent inside the df-messenger tag in your UI/HTML page
2.Then create a Custom Event in Dialogflow CX (By clicking on Event handler '+' icon)
3.Check the 'use custom event' checkbox and provide event name and provide a text response in fulfillment section of this custom event.
4.Finally provide this custom event name as value to the attribute intent(mentioned in step 1)
please refer to this document for df-messenger HTML customizations https://cloud.google.com/dialogflow/cx/docs/concept/integration/dialogflow-messenger#html-customize
According to Dialogflow CX documentation, the WELCOME event (although not visible in the Start flow) is also available. As you can see in this link and the picture below.
To invoke this event, you have to use the detectIntent method of a Session client. You'll need to specify the event name in queryInput.event.event of the request used in detectIntent.
Hope this helps!

How i save and show existing progress status using flask socketio if browser is closed(session)

Requirement :-
working on a project with flask.
flask socketIo ...and i have almost completed the project.
Now i want to implement something which is very common on web development.
Right now i can show the status of background tasks in the UI, and events are getting send to specfic (request.sid ). Now if the user accidentally close his browser and and returns to the same page, for obvious reason he won't see anything ( which was happening in the existing session) but the initial page
I want to a way if the user again comes to the page, it should be redirected to the current status page.
Am trying to achieve something exactly like any cloud based solutions For example if i create an Ec2 instance from console and close it. Upon reopening it will still show the existing operations with current status ( running,pending ) etc..
How can achieve that ?
if the user accidentally close his browser and and returns to the same page, for obvious reason he won't see anything
This isn't really obvious. If your user is logged in to your application then you know them, and presumably you also know what background task each user has pending. When the user returns to the page and logs in again, you should be able to find the state of any background tasks associated with the user.
The only situation in which you would not be able to do this is if you don't require your users to authenticate, in which case when the user comes to your page the second time you have no way to know it is the same user that closed the page before. The fix for this problem is to use authentication, so that your users are always known to the server.

How to create a facebook event on users behalf using javascript sdk

I'm trying to piece together information and different chunks of code scattered throughout the documentation on how to make this happen, since there aren't good examples.
I know I have to first get the create_event extended permission which I get with this code:
FB.login(function(response) {
// handle the response
}, {scope: 'create_event'})
;
I know that I also have to issue a HTTP POST request to 'PROFILE_ID/events' with the create_event permissions and the necessary parameters.
My problems are: 1. I don't know how to collect the create_event permission once it is given. If I run the code above, a dialog box will open asking for the permission but once I accept, only a blank page follows.
2. If everything works the way it supposed to with the permissions request and the post request, will my app see a create event page like I would if I were to create an event on my own from my profile? What interface gets seen from the app? Can I take a user from my app directly to the facebook create event page?
I don't know how to collect the create_event permission once it is given. If I run the code above, a dialog box will open asking for the permission but once I accept, only a blank page follows.
That’s how it works. Everything you want to show to the user after successful login, you have to implement yourself.
If everything works the way it supposed to with the permissions request and the post request, will my app see a create event page like I would if I were to create an event on my own from my profile? What interface gets seen from the app?
No “interface” at all – it’s up to you to build that.
Can I take a user from my app directly to the facebook create event page?
The user can go their by themselves. Why would the need your app for that?

How do I send an Enterprise Activation email? Using EnableBlackBerryUserDispatcherAttributes?

This is regarding a Blackberry that is connected to a BES Server, and the Administration Web Service.
I need to enable and send an Enterprise Activation email, however I need to also set an ActivationPassword.
I looked at the help document and after tracing the abstract classes, I think I need to do "something" with EnableBlackBerryUserDispatcherAttributes.
How do I send an enterprise activation email with a password to an Exchange user? I can't find anything, anywhere. (Sure I can add a user to the server, but what good is that if I can't activate the account !?)
I've found the following objects in the webservice that indicate it is possible, but I can't figure out how to use them...
ActivationPassword;
ActivationContext;
ActivationPasswordType;
ActivationPasswordOperationTypeEnumType;
clearActivationPassword;
EnterpriseActivationEvent;
setActivationPassword;
Just to be clear the online samples only address the creation of a user, not enabling them.
My alternative is to shell out $250 bucks for this missing documentation.
If you are an ISV partner or T3 subscriber, the answer to this question is free for you at devsupport#rim.com so I'll appreciate any strings you can pull as well. While you're at it I'd appreciate if you can tell me how to update the email component as described on this part of the admin website
The user list from the company
directory is automatically updated on
a timely basis. The update process can
be manually started using the email
component.
you should have a look at the dispatcher webservice. This means you have to generate a stub for the dispatcher webservice as shown in the tutorial. The stub is a instance of com.rim.bes.bas.baa.BAADispatcher which holds methods for setting and generating EA-passwords.
Regards