Sulfikkar B S
Sulfikkar B S

Reputation: 51

Send job status from a table in azure as email

I have a table in Azure called Job Status which is a small table, row size of 15. I would like to send entire row as email to users from this table.

I tried logic app in azure but each email corresponds to one row only. I want a single email with all the rows formatted as a table.

Upvotes: 0

Views: 718

Answers (3)

Sulfikkar B S
Sulfikkar B S

Reputation: 51

enter image description here

I could resolve the issue using recurrence,execute a sql query,create html table,and send an email.Recurrence is basically schedule,execute a sql would fetch rows from a table,create html table would do creating excel table in html format,and then send the email

Upvotes: 0

George Chen
George Chen

Reputation: 14334

I tried logic app in azure but each email corresponds to one row only.

If you create "Get entities" action and just send email you can find it will create a foreach action, that's because Dynamic content only can get entity one by one.

enter image description here

So you could create a csv table after Get Entities like the pic shows. enter image description here

In my situation I got an error:

InvalidTemplate. The execution of template action 'Create_CSV_table' failed. The column values could not be evaluated: 'The template language expression 'item()['additionalProperties']' cannot be evaluated because property 'additionalProperties' doesn't exist, available properties are 'odata.etag, PartitionKey, RowKey, Timestamp, Email, PhoneNumber'. Please see https://aka.ms/logicexpressions for usage details.'.

If you occur same problem, you could click Code view, the delete the additionalProperties part or you could change the keyword to other properties name you want to show in the mail. enter image description here enter image description here

After these the mail would like the pic content.

enter image description here

Hope this could help you. If you still have other questions, please let me know.

Upvotes: 1

NativeKepler11
NativeKepler11

Reputation: 111

  1. Create a logic app
  2. Add a trigger based on records count or by time
  3. Add an action that calls Azure function for email. You can use NuGet package Microsoft.Azure.Webjobs.Extensions.SendGrid.

Upvotes: 1

Related Questions