Is there a way to trigger alerts on Purview via attachment count? - security

Looking for a solution to trigger alerts within Purview based on the attachment count of a test email.
Is there a way to trigger an alert where 5 or more xlsx files are on an email, but not if there are under 5 xlsx attachments?
Tried using regular expressions but this does not seem to work on file attachments.

Related

Is it possible to use Logic App or Pipeline to check the Excel data attached to an incoming email?

Is it possible to use Logic App or Pipeline to check the Excel data attached to an incoming email?
As shown in the image, the Excel data has OK and NG in a fixed place. There are 4 sheets of this Excel data and I want to check all of them.
enter image description here
enter image description here/i.stack.imgur.com/EGaRq.png
Yes you can do this in a number of ways.
Office 365
You can use the trigger When an Email is received in outlook. This will poll the mailbox at a time set by you. See docs
Non Office 365 Emails
If you need a trigger based on a received email that is not via office 365 then you can use SendGrid to set up a webhook when an email is received. You can then use a logic app to receive this with an HTTP trigger and read the files.
I have a blog post on reading and parsing inbound emails with sendgrid and azure logic apps
Once you have the file you can use the logic app to read the excel sheet using the Excel actions of the office 365 connector.

How to send a .txt file in blob as an attachment in an email in azure logic apps

I have a file that gets generated everyday with the format abc_20210901.txt(the ending of the file name is the date when the file was created which is dynamic and changes everyday) in my blob path /storageacct/ABCcontainer/abc_20210901.txt. I need to create a logic app that sends this file as an attachment in an email. I have created the 'send email' action in logic apps, but could not find how I can send this blob file as an attachment in the email.
Thank you for the help :)
At a minimum, you will need a get blob content v2 step followed by the send email step.
Your workflow will look like this.
Your can use Gmail or outlook. In my case, I signed into outlook to send the email. You will need to click on 'Add new parameters' and tick the attachments box to add the attachment field. .
You can then add your file in the Attachments Contents field.

How to read email as an attachment in Azure Logic App

Currently, I am trying to fetch the attachments using the Azure logic app whenever any new mail arrives in the outlook, but any mail that has attachment as a mail, it is not able to fetch those attachments.
I test with email attachment and will get this same problem, then I check the connector reference and I suppose I find the reason.
There is a description about outlook connector:
Support for certain attachment types (EML, MSG, ICS) is currently
limited. These attachments will be skipped when processing emails.
More details you could refer to the reference page.

send email with attachment in Azure Data factory

I need to send an email with attachment according to a condition from table. For e.g I have a table XYZ which has column "Flag" and if the column flag value is "N" then it has to pick the values with value as "N from the table and write into a file. This file has to be sent as attachment in an email in Azure data factory. f you can help with the process for this in Azure data factory it should be great.
Per my researching, there is no such activity could send email with attachment,you could vote up this feedback to improve this feature.
As workaround, you could adopt #Raunak Jhawar's suggestion that using SQL Connector Trigger.
Then you could get the value you want into Azure File Storage or Azure Blob Storage.
After that,send email with attachments following this tutorial. Here is s similar case for your reference:Azure Logic app : How to Send an Email with one or more attachments after getting the content from Blob storage?

Filtering Email Attachments based on Email Id in Logic Apps

I am trying to use the Logic App 'List Records' connector for CRM Online to move attachments to SharePoint Online, For example- when an email is created with an attachment in CRM, I am trying to move the attachment to SharePoint Online. I am successful in moving all the attachments from all the emails in the system in one go but I want to filter the attachments based on single email as similar to how we do in C# plugin/workflow by querying the entity "activitymimeattachment". But I couldn't achieve it through filtering in Logic Apps(I have tried entering filter as "_objectid_value eq EMAILMESSAGE") AND also from the given list of entities, or by entering a custom value of the entity as "activitymimeattachment" which is not exposed. My Logic App is Failing . If this entity is not exposed, how can we can get the attachment list for an email?
Please give some suggestions on it...Many Thanks.
Trigger on the creation of attachment event. I am doing this way because using a function I can get the GUID of email.
Microsoft has only exposed attachmentid field.
I was trying to trigger LA on create of Attachment, However logic App was not triggering, even when I was testing it after adding a file on email entity. I think this a bug.

Resources