Reputation: 123
I am trying to send nice email with table (content from CSV file), similar here: Email test page
The biggest issue is formatting the table in email. In Logic App in step "Send an Email" in Body is FILE CONTENT (here screenshot: Logic App Send an Email screenshot. Table is not formatted and looks like:
test
SEP=, "NAME","SKU","TYPE","KIND","PLAN","TAGS","ALIASES","LOCATION","PROPERTIES","RESOURCE GROUP","SUBSCRIPTION","MANAGEDBY","IDENTITY","ZONES","TENANTID","APIVERSION" "VirtualMachine","null","microsoft.security/securitystatusessummaries","","null","null","{}","","{""resourceHealthSummryPerCategory"":[{""category"":""Compute"",""healthy"":null,""medium"":null,""high"":1,""none"":null,""low"":null},{""category"":""Networking"",""healthy"":null,""medium"":null,""high"":1,""none"":null,""low"":null}],""policyAssessmentsSummaries"":[{""policyDefinitionId"":null,""assessmentKey"":""12018f4f-3d10-999b-e4c4-86ec25be08a1"",""category"":""Compute"",""policyName"":""Virtual machines should be migrated to new Azure Resource Manager resources"",""healthy"":1,""medium"":null,""high"":null,""none"":null,""low"":null},{""policyDefinitionId"":null,""assessmentKey"":""3bcd234d-c9csdcs7-c2a2-89e0-c01f41dfv9c1a8a"",""category"":""Compute"",""policyName"":""Endpoint protection health issues should be resolved on your machines"",""healthy"":1,""medium"":null,""high"":null,""none"":null,""low"":null},{""policyDefinitionId"":null,""assessmentKey"":""8e2b96ff-3dedfvfd2-289b-b5c1-3b9921a34dfv41e"",""category"":""Compute"",""policyName"":""Monitoring agent health issues should be resolved on your machines"",""healthy"":1,""medium"":null,""high"":null,""none"":null,""low"":null},{""policyDefinitionId"":null,""assessmentKey"":""83f577bd-adfv1b6-b7e1-0891-12ca19d1dfve6df"",""category"":""Compute"",""policyName"":""Install endpoint protection solution on virtual machines"",""healthy"":1,""medium"":null,""high"":null,""none"":null,""low"":null},{""
I would like to get table instead ugly string.
Do you have any idea how to achieve that ?
Upvotes: 1
Views: 1649
Reputation: 15734
For this requirement, I provide a sample below for your reference.
1. I upload a csv file to azure blob storage to simulate your situation.
2. Then search the action "Parse CSV" in you logic app.
3. It will ask you to input "API Key", you need to go to this page first --> click "Start free trial", register an account and create a new API Key.
Copy the secret and paste it to your logic, it will allow you to connect Plumsail.
4. Input the "File Content" and the headers into the box, we can also add a new parameter "Skip first line" and set it "Yes"(this parameter will skip the header line and avoid two lines header in the expect table).
5. Now we need to use "Create HTML table" action to create table by the data from "Parse CSV".
6. After that, we can send the email with the "Output" data from "Create HTML table" action.
7. The email I receive looks like below:
Upvotes: 0