I am trying to send an email alert when certain conditions are met by creating an alert rule in Azure monitor. For this, I also created an action group which tells what action to take when trigger conditions are met. In logic app I am using dynamic content which will come through POST http request, but in action group on azure portal I don't see any option to populate those parameters for POST request. Can anybody help me how to make a post request with request parameters to logic app in Azure portal?
There is no need to send parameters from Action group to logic app. When an action group is tested or the condition satisfied, automatically details will come in Http post request. Using expressions, you can retrieve details from Http post request to use in next action.
I have reproduced issue from my side. Below are steps I followed,
Created Action group in Azure monitor and added action type as Logic App.
Created logic app as shown below,
In Send Email action, I have used dynamic content from Http request trigger as shown below,
When I test action group, It triggered logic app and run details are shown below,
Output of Http trigger:
Send email Action:
5. As You can see in above picture, I am not getting values in Send email action.
So tried with writing expression instead of using dynamic content to get data from http trigger as shown below,
triggerbody()?['data']?['essentials']?['monitorCondition']
triggerbody()?['data']?['essentials']?['fireDateTime']
7. Tested logic app again and getting values as shown below,
Refer to this MS Doc for more information
Related
When a Logic App uses the Request trigger to receive inbound requests and the Response built-in action to send the response back to the caller, the Response action must include the Status Code - 200, 400, 401, etc.
Along with the Status Code, I'd like to be able to send the reason of the status code, in the same way it can be done in the API Management by using the set-status policy.
Is it possible at all to specify the status code reason in the Logic App Response action?
Is it possible at all to specify the status code reason in the Logic App Response action?
No it is not possible using Logic Apps.
But if its business need, as an alternative, You can define it in the response body at your client application and you need to pass the response body as a reason.
You can submit a feature request here in more detail.
I need some help with PayPal notification integration (react/laravel).
I need to receive notification to my backend every time a client checkout with PayPal successfully.
Is there any way to implement this?
IPN is very old and nearly deprecated, there is no reason to use it with the current PayPal Checkout.
To implement the current PayPal Checkout, follow that guide and make two routes (url paths) on your server, one for 'Create Order' and one for 'Capture Order'. You can use the Checkout-PHP-SDK for the routes' API calls to PayPal, or your own HTTPS implementation of first getting an access token and then doing the call. Both of these routes should return/output only JSON data (no HTML or text). Inside the 2nd route, when the capture API is successful you should verify the amount was correct and store its resulting payment details in your database (particularly purchase_units[0].payments.captures[0].id, which is the PayPal transaction ID) and perform any necessary business logic (such as sending confirmation emails or reserving product) immediately before forwarding your return JSON to the frontend caller. In the event of an error forward the JSON details of it as well, since the frontend must handle such cases.
Pair those 2 routes with this frontend approval flow: https://developer.paypal.com/demo/checkout/#/pattern/server . (If you need to send any additional data from the client to the server, such as an items array or selected options, add a body parameter to the fetch with a value that is a JSON string or object)
Do not use the deprecated PayPal-PHP-SDK, which is for the deprecated v1/payments API
I have a flow setup in logicapps that starts with a http response, the user enters data in an excel sheet and clicks a cell/hyperlink which kicks things off. They receive a response saying the flow has started and was wondering how I could update the response once the flow has completed (either successfully or if it has failed). I’ve only created basic flows before and when googling I’m not too sure what I should be searching for but cant find any examples of what I’m trying to achieve, any ideas?
Here is one of the workarounds that might work. You need to add the response at the end of the flow. Consider my logic app as a sample. If my "Var" is yes then in response it sends Success as a response to my postman and if it is other than yes it sends Failed. Here is my logic app for your reference:-
Result:
In postman
In your case, you can use some properties to define if they got classes or not and then use the same condition connector to send the response.
I have my ajax post calls from to create post by users under a custom post. I have used the action hook in all works fine for admins. But when a subscriber uses the same, it returns a html but not the response.
But the server-side is working fine on the ajax call. Meaning, the post has been created successfully and the mail also has been sent as expected (as per the code).
I have defined the ajax action hook for both prev and nonprev users.
add_action('wp_ajax_register_participant', 'register_participant_callback');
add_action('wp_ajax_nopriv_register_participant', 'register_participant_callback');
I have also defined the capability type and map_meta_cap while registering the custom post type and set the permission to edit, update and delete the 'registration' post type.
'capability_type'=> 'registration',
'map_meta_cap' => true,
It was actually working fine but suddenly stopped working on all my ajax calls.
Any suggestions to debug?
I am developing an app using AngularJS and NodeJS. Being new to both I am struggling a bit.
My app is communicating with payment gateway to facilitate payments. Flow goes like MyApp-->Payment Gateway --> MyApp. I am able to send the request to payment gateway. Problem is I am not able to figure out how I will handle response that is coming from payment gateway. Payment Gateway is sending some data in the post request. I need to process this data before showing results of transaction to user.
Technically speaking I know what needs to be done. Like Step 1) Giving a return URL to Payment Gateway to which Post request will be sent. Step2) This HTML URL of my application will send data received from payment gateway to server side for processing. Step3) Based on processed results I will show transaction result to user.
Where I am struggling is show to achieve this using AngularJS and Nodejs. Pls help
You can use Angular's $http service to easily send and get data from server.