I know this question is bit ambiguous. Let me clear that up. First thing is, this question is about integrating two services using an integration service(Zapier, Flow or IFTTT.. But um focusing on ms flows in here). I need to connect one of my services via a wehbook URL given by ms flows so that i can send my request to flow.
So in Zapier we have something called Webhooks by Zapier which gives us a public URL catch hook to trigger a particular zap. But in flows we dont have such thing. I was wondering whether we have an alternative in ms flows to fire a trigger.
Problem Solved!
The thing is, i did not find a way to setup exact catch hook from ms flows. But there is an alternative. In ms flows they provides us a connector called request which generates a post url. This url is continuously listening just like catch hooks in zapier.
.One drawback of this alternative is, we have to manually setup the payload of the incoming request in order to use data in actions in JSon schema format which is a headache.
Related
Background
I am integrating stripe API into my site to take one off payments. My site will be API first on server side with a separate web and mobile front end. I am working on the API server side code. I will eventually use stripe payment pages to take credit card payments. I am trying to automate the testing of my APIs and am bamboozled by the documentation (which are thorough) as I just can't see what steps to take next.
My server side initiates a call with stripe using stripe sdk to create a stripe Session object - this contains a URL to redirect to checkout.stripe.com/pay/..., a success URL when payment is successful and a cancel URL (these I set to handle the callback).
Problem
I can automate in Postman all my API calls from Browse Products, Select Product, Place Order but the next step I am stuck. After Placing Order I get back the stripe session but how can I mimick making the payment with stripe for the session and then call my Success URL ?
When the site is complete I will redirect the UI to stripe to take payments but I am testing and completing the back end flow first.
I have copied and pasted the session URL which is returned by the stripe Session object to bring up the page in a browser and used Dev tools on Chrome to inspect Network to see which APIs are being called by stripe in an attempt to reproduce and I can see a POST to stripe.com/api/payment_methods and I can see the posted values but I can't reproduce this in Postman. Also, the documentation (https://stripe.com/docs/api/payment_methods/create) says
"Instead of creating a PaymentMethod directly, we recommend using the
PaymentsIntents API to accept a payment immediately"
Question
Which stripe APIs do I need to call to automate the flow from a stripe Session object to make a payment and then check that it was successful? Payment Methods? Make a Charge? Payments Intents? ...and how. Happy to be pointed to the documentation if you can help me understand the flow.
TIA
Checkout is a Stripe product that looks like a "box" and you can't know (and shouldn't need to know) what happens inside. It is created for the purpose that merchants won't have to think about what's being done under the hood.
Speaking from an automation perspective, you can try to reproduce the whole process but there's no guarantee it won't change in the future, and it could leave you with more problems later.
For options to reproduce:
The closest way is simulating browser filling and submission, using automated browser tools (ie Selenium). But it's not as straightforward as PostMan. Generally you would want to simulate every browser action that a human could do.
Or you can try to accomplish the same with the logs and events you receive on Stripe's Dashboard, when you test a Checkout Session by yourself. From now there are 3 requests.
And your goal is to receive the same 5 events in Webhook:
TBH I recommend to reconsider the need of this test, to see if it worth your efforts.
We are implementing our customized chatbot using dialog flow. When user enters any text, our javascript code sends this text to our python server and the server interacts with google dialog flow and server gets complete response. I just have couple of questions as below.
When server gets the response from dialog flow, it will process the
response and sends some response to UI. Do we still need to have
fulfillment enabled as our server is getting response? Basically if
server is interacting with dialog flow and getting response, what is
the use of webhook?
Is there anyway to enforce the dialog flow intents require at least
one of entities? I went through Can I make Dialogflow intents require atleast one of the trained entities? which says to enable webhook fulfillment for that intent and if no entities were provided, re prompt the user for at least one of a list of entities. So in my case, if webhook is not needed, do I need to do it in the server once server receives response or is there anyway dialog flow will automatically enforce the condition with out server taking the responsibility?
In your case, no, you don't need to use webhook fulfillment.
You may still wish to use it, however, if you want to separate business logic (which would be in the webhook) from UI/UX logic (which would be in your python server and in the javascript client). But there is no requirement that you separate things this way.
Similarly, you can use your python code to enforce "at least one of" the parameters matching - you're moving that logic from the webhook into your existing server.
Either way, this is a bit kludgy. One alternative if you have different entity types is to have multiple Intents, one for each possible type, and to mark the parameter as required. This way the Intent will only match if the parameter is provided. If you then need to report each of these Intents as the "same" Intent, you can add that logic to your python code.
Is there a way we can trigger AWS Lambda function from Microsoft Teams. what I wanted to achieve is that stakeholders be able to approve merge requests from MS teams or maybe give an approval on Production rollout.
Is this connection possible at all?
Please help
Yes, this is definitely possible, but there are a bunch of things you need to do to get a full working solution, so it's hard to give it all in one answer here. Here are some guidelines to get started though:
You need a something for the user to actually "Approve", and way to do this. A common approach is to send a "Card" to Teams, which can have an "Approve" button. There are a few different kinds of cards, and different ways to send them to Teams, including a Bot, Flow/PowerAutomate (which uses it's own Bot behind the scenes) and incoming Webhooks.
When the user clicks the "Approve" (or "Reject") buttons, you need a way to handle the action (to link the button click to AWS).
If you've built Bots before, this might be the easiest option. If you want to use Flow/Power Automate, that's another option (see here for more information about important changes due "this quarter" - I'm not sure if they're released yet). If you've not used any of these, your best bet might be:
Configure an Incoming Webhook
Send a Connector Card with a "Post" button
Set the POST url to be your AWS Lambda
Is it possible to create a Logic Apps custom action similar to the Request Response action? If so, can you please guide me how I would do this? The Request Response action is different from other actions as it doesn't call an API, but instead responds to the trigger.
I'd like to create a specific version of the Request Response action that forces a certain status code and response structure, so that people using the connector understand how to use it. The action is to be used in conjunction with a custom trigger, which is basically a webhook. The API that call the webhook requires the response to be in a specific format. Right now I can make it work with the Request Response action, but I need to make sure I return the correct JSON structure.
Update, try Azure Api-Management. Otherwise, I would validate that all values are present and if not I would reply which values are missing.
I'm using Web Activity to make a POST request to a slack webhook.
The problem is that the slack webhook responds with a 200 and an "ok" string as the body of the response and the web activity doesn't seems to like that because I'm getting the error:
{
"errorCode": "2108",
"message": "Response Content is not a valid JObject",
"failureType": "UserError",
"target": "activityName"
}
So my question is if there is a workaround for this or is there is an alternative to use web activity. For the time being I know I can use a custom activity and even I'm thinking of setting up an azure function that acts as a proxy and thus returns a proper Json.
Note: I'm using this slack integration to alert when something goes wrong. Of course I'm also open to suggestions on how to alert my team when something is not working in ADF (sending an email wouldn't work because our inboxes are completely cluttered, so slack seemed like a good alternative for a change).
You can use a lookup activity with an HTTP dataset. You can define the dataset to be a REST call, and I don't think the lookup activity is picky about the response format.
Another option might be to use an Azure Logic App to update Slack. You can either use it as a 'proxy' to be called by ADF, or see if it can be set up to perform the monitoring you want as well.
According to the official doc, REST endpoints that the web activity invokes must return a response of type JSON. The activity will timeout at 1 minute with an error if it does not receive a response from the endpoint.
So currently I think your workaround should be the right way.
And besides of email, I think ADF also provides other approaches to monitor your data factory. Please find this doc for more details.