Forum Discussion
How to send an email with a csv attachment
- 8 months ago
Hi dyordanov,
If I were you, I would do the following.
If you created the files using Notebook, they are initially stored in the storage account. Then, in the pipeline (after Notebook), create a lookup activity that lists the files. Transfer this to a variable, which in turn transfers it to a web activity that controls the Logic APP.I hope that was reasonably clear 🙂
Here an simple Guide.
1. Lookup Activity
- Source: your Blob Storage container.
- Configuration:- First row only = false (so that all files are listed).
- Query or path filter: e.g., only files with a specific prefix or extension (.xlsx).
- Result: JSON array with all files found.2. Set Variable Activity
- Transfers the list from the Lookup Activity to a pipeline variable (e.g., fileList).
- Optional: You can transform the list (e.g., extract names only).3. Web Activity
-Target: your Logic App HTTP Trigger.
- Method: POST.I haven't tested this in this configuration yet, but I use something similar at our place.
Best regards
Feel free to leave kudos or accept it as a solution. This will also help other community members.
- 8 months ago
I understand :),
another option is to switch to Event Grid in the Logic APP. I've done that before, too.
You simply replace the trigger that triggers the action with When a resource event occurs (Azure Event Grid). I think that's what it should be called.The advantage is that you only get one event instead of multiple events.
Here is the procedure.
Go to the Storage Account and click Events.
1. Create and configure the event grid accordingly. Important: the event type is Microsoft.Storage.BlobCreated.
2. Change Logic APP.
- Remove the old trigger “When a blob is added or modified”.
- Add a new trigger:
- When a resource event occurs (Azure Event Grid) -
Configure:Subscription: your Azure subscription.
Resource Type: Storage Account.
Event Type: Microsoft.Storage.BlobCreated.I hope that helps.
Best regards
Hi dyordanov ,
sending attachments with Outlook activities is not currently possible.
The Fabric Roadmap shows you what is planned next.
Here the site.
https://roadmap.fabric.microsoft.com/?product=datafactory
Regarding your problem.
This is how I solve the problem at our company.
1. Notebook creates the CSV file.
2. In Azure, there is a Logic App that then sends it. The Logic App has a connector for this and is easy to configure.
3. I then trigger this via Data Pipeline in Fabric. Of course, you can also use a schedule in the Logic App.
For me, this is a valid approach, but there are certainly other ways.
If you have any questions, just let me know.
Feel free to leave kudos or accept it as a solution. This will also help other community members.
Best Regards