Reputation: 855
I have a requirement to read entries from azure table on daily basis. Based on date field on that table, I need to query to select some entries and send it as a mail to a person. And additionally there is a mail ID field, once entries are filtered based on that date field, individually also I need to send mail.
I was not suppose to use any third party tool like send grid or mail jet. So not able to go for azure function or hosting console application as web jobs. When I check logic apps, there is some options to send mail using outlook.
If possible, can anyone please tell me how to achieve my requirement using logic apps. If any other options available suggest me too.
Upvotes: 1
Views: 2547
Reputation: 15754
If your email account has O365 license, you can use "Send an email (V2)" action in "Office 365 Outlook" connector to send email.
If your email account doesn't have O365 license, it is a normal outlook email account. You can use "Send an email (V2)" action in "Outlook.com" connector to send email.
==============================Update==============================
Please refer to my logic app below:
1. I create a table in table storage, shown as below screenshot.
2. Use "Get entities" action to get the entries of the table. Input testDate gt datetime'2020-01-01T04:53:11.4584078Z'
into "Filter Query" box to filter the entries by field testDate
.
Please note: Do not input
TESTDATE
in filter query because it seems case sensitive according to my test.
3. Add "Create HTML table" action to convert the filter result of "Get entities" from json to HTML.
4. Then add "Send an email(V2)" action to send the email to one person which you want with entries in html.
5. After that, use "Parse JSON" action to parse the json result from "Get entities" action.
You can click "Use sample payload to generate schema" button and input the json result into the box to generate the schema automatically.
6. Then add "For each" loop to loop Body
from "Parse JSON" action, and send email to each mail address with the entries.
7. After running the logic app, I received the email. The email shows like:
Upvotes: 2