Azure Logic App - Simple Email Template for JSON Request Body - azure

I've got a simple Azure Logic App, which receives and emails out JSON data in a very basic HTML table format (created with a convertToTableAction).
Does anyone know of a way to instead send this out using an email template?
I've got a SendGrid account set up with my Azure subscription, but there doesn't seem to be any way to specify a template id with the Send email (v2) action in Logic apps.
I can't quite see how I'd edit the Logic App code to use the only SendGrid api that seems to support sending templates V3 either. (It is my first Logic app though, so I could well be missing a trick)
Really, any advice on how to send out a templated email would be appreciated.

As you mentioned that the logic app integrate the Sendgrid(V2) currently. You could give your feedback to Azure team.
If azure function is acceptable, you could add and run custom code for logic apps through Azure Functions

there is two way to do it ..
1) Using SendGrid Connector :
You need to create one azure function or web API pass request as your JSON outout string and replace with html content and get html in response
Pass html response in body of the send email action of SendGrid Connector
Details of SendGrid Connector
Please refer this link for Json data replaced to html
my explanation is very short but if you don't understand then i will help you in details

Related

Azure Data Factory V2 - Sending Custom Email (without Logic Apps)

I know that you can send email alerts for a Data Factory pipeline using Azure Monitoring AND that you can send custom emails using a Logic App and the http request trigger. Is there another simpler way to send an email to alert someone when a pipeline fails with the details of the error message included?
Yes you can, but this method would be complex than creating a logic app or configuring default email alerts
You can create a stored procedure in a SQL DB which would send an email
Add the stored procedure in Failure output section of your ADF activity
Any reason for skipping traditional method of sending email from Azure? Maybe I can help
Thanks!
There are multiple ways of sending emails but I would suggest to use logic apps as the easiest.
You can even run a C# code using custom activity in ADF but it has to be build and deployed to a container and then you have to point this util/exe file in Data Factory -> [https://learn.microsoft.com/en-us/azure/data-factory/transform-data-using-custom-activity][1]

Azure Logic app - Send the whole email to a rest call as a .eml attachment

I am trying to create a logic app with email received trigger.
When email has multiple attachments, I am able to loop and make a http call per attachment
However we have to send the whole email as http call by creating .eml file of the email with attachments.
Pls advise
While the built-in actions do not seem to support this out of the box, you can make a Microsoft Graph API call to get the MIME content of a message.
There is no official connector for all available Microsoft Graph APIs, so you would need to use the HTTP with Azure AD Connector instead.
The response body content could then be written to a file in blob storage using the Create Blob Action.

How do I create a notification url endpoint for microsoft graph api change notifications

I am trying to get change notifications for users using microsoft graph api. For testing purpose I have been using ngrok as suggested by many.
But now I want to use the real notification url to test my code.
How do I do it? The microsoft documentation says "This URL must make use of the HTTPS protocol".
Do I create an endpoint in azure or what are the other options?
Thanks in advance.
The notificationUrl is just your proxy URL. See the example here: https://github.com/OfficeDev/hands-on-labs/blob/master/O3653/O3653-19%20WebHooks/Lab.md
The one in the sample using ngrok looks like:
https://74c48253.ngrok.io/notification/listen
You could use a Power Automate Instant Cloud Flow with the trigger as "When an HTTP request is received" and the subsequent steps could include emails with the details of the notification.
When you save the flow a URI will be generated which you can copy and use as your Graph change notification URI.

custom input & output fields for azure function

I am not sure if this is an option. I require it badly, and cannot find any references of it.
When integrating between an HTTP Triggered Azure Function within your Logic App flow, you are requested to pass a body object for the function to digest:
I am hoping for a way to customize the Request Body inputs, to make it have a strict template structure, in and out.
In:
Out:
(The function returns an Object)
Is there any way I can achieve this?
You could create a Logic Apps Custom Connector.
You can create one of these from a Postman collection or using an OpenAPI definition. You can get hold of the OpenAPI definition from the Function App.
With a custom connector, you have a bit more control over the request and response. This will allow the users of your connector to provide inputs when used in a Logic App and also receive tokens from the response. These can then be used in further Logic App steps.
Just hard coded it to the fields I require it using the Logic App syntax and it responds to satisfaction
#{body('function-name')?['property']}
Haven't tried the Custom Connector

How to send Email using Logic App?

In one of my project I want to send email using Logic Apps, for that I followed below link.
https://azure.microsoft.com/en-in/documentation/templates/101-logic-app-sendgrid/
From the above link i created the Logic App in my Azure Subscription
and make designer in my logic app like this below figure. but i don't know which values can i gave in their text boxes.
My designer will be like this below figures.
but i don't know how to send email from newly created logic app in my azure portal.
Please tell me how can i achieve this.
-Pradeep
You can use the json body coming in http request using the
"#{triggerBody()['propertyname']}"
checkout this blog for the details
https://azure.microsoft.com/en-us/documentation/articles/app-service-logic-http-endpoint/
May you can see the following blog for step by step guidance.
https://sps-cloud-architect.blogspot.com/2019/12/azure-logic-apps-send-email-using-send.html

Resources