Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
AshSmartInfo
New Member

Fabric OneLake file-created trigger not starting pipeline + trouble passing file path parameter

Hi all,

I'm new to Fabrci Pipeline with basic Python scripting skills.

I’m trying to build an event-driven Fabric pipeline: when a JSON file is uploaded to Lakehouse Files/inbox/, a trigger rule should run my pipeline and pass the uploaded file path to a notebook.

I created the pipeline with a Notebook activity and added a trigger via “Add rule” (Details/Monitor/Action). I set Source=OneLake, Event type=File created, filter contains /Files/inbox/.

Problem: uploading a json file kicks off the pipeline but passing the Parameter from Trigger/Rule to Pipeline does not work. I studied the links below from MS guides on Event-Driven Fabric pipeline but I see a UI disconnect from those guides to what I see in Rule details

 

https://learn.microsoft.com/en-us/fabric/real-time-hub/tutorial-build-event-driven-data-pipelines?ut...

https://learn.microsoft.com/en-us/fabric/data-factory/pipeline-runs

 

Has anyone got a working example of OneLake file-created triggers passing the file path into a pipeline/notebook? Which TriggerEvent field should be used and how do you correctly map it in the rule UI?

1 ACCEPTED SOLUTION
Vinodh247
Super User
Super User

I discussed this with some of my team, I could say that fabric onelake file created triggers do start the pipeline, but they do not reliably pass the file path into pipeline parameters. The UI suggests it is possible, the docs imply it is possible, but the feature is partially implemented.

When you create a OneLake “file created” rule, the trigger payload does contain metadata (like path, workspace, item) but Fabric Pipelines do not currently expose those event fields cleanly in the Rule > Action > Pipeline parameter mapping UI. I think that is the disconnect you are seeing between the documentation and the product.

 

Practical solution that you can try is:

  1. Let the trigger only start the pipeline

  2. Inside the notebook, discover the file yourself

    1. List files under /Files/inbox/
    2. Filter by lastModified or filename pattern
    3. Pick the latest file and process it
from mssparkutils import fs

files = fs.ls("Files/inbox/")
latest_file = sorted(files, key=lambda f: f.modificationTime, reverse=True)[0].path

print(latest_file)

 

Please 'Kudos' and 'Accept as Solution' if this answered your query.

Regards,
Vinodh
Microsoft MVP [Fabric]
LI: https://www.linkedin.com/in/vinodh-kumar-173582132
Blog: vinsdata.in/blog

View solution in original post

4 REPLIES 4
Vinodh247
Super User
Super User

I discussed this with some of my team, I could say that fabric onelake file created triggers do start the pipeline, but they do not reliably pass the file path into pipeline parameters. The UI suggests it is possible, the docs imply it is possible, but the feature is partially implemented.

When you create a OneLake “file created” rule, the trigger payload does contain metadata (like path, workspace, item) but Fabric Pipelines do not currently expose those event fields cleanly in the Rule > Action > Pipeline parameter mapping UI. I think that is the disconnect you are seeing between the documentation and the product.

 

Practical solution that you can try is:

  1. Let the trigger only start the pipeline

  2. Inside the notebook, discover the file yourself

    1. List files under /Files/inbox/
    2. Filter by lastModified or filename pattern
    3. Pick the latest file and process it
from mssparkutils import fs

files = fs.ls("Files/inbox/")
latest_file = sorted(files, key=lambda f: f.modificationTime, reverse=True)[0].path

print(latest_file)

 

Please 'Kudos' and 'Accept as Solution' if this answered your query.

Regards,
Vinodh
Microsoft MVP [Fabric]
LI: https://www.linkedin.com/in/vinodh-kumar-173582132
Blog: vinsdata.in/blog
Andreas_Laeubli
Frequent Visitor

Hi @AshSmartInfo 

 

Welcome to the Fabric Community! I hope I can help you with your issue.

You can find your trigger parameters under the 'Add dynamic content' section. In that panel, there is a 'Trigger parameters' tab containing all parameters from the Activator.

 

Andreas_Laeubli_0-1769248118857.png

 

If you want to add more, you can edit the action and include them at the Activator. If you need the file path, you should choose 'Subject'."

Use the parameters, you can find here: Solved: notebook parameter - Microsoft Fabric Community

 

Here is my configuration: 

Andreas_Laeubli_1-1769248609986.png

 

 

BR, Andreas

 

 

 

 

 

thanks Andreas for your reply.

I read the thread you suggested and I did try parameter as Subject for file path but could not pass the parameter from trigger to pipeline where notebook is created and waiting for the parameter value to execute the script.

I think answer from @vinodh makes more sense to me.

regards,

Ash

Hi, i was able to pass file URL from Pipeline, triggered via Activator to a notebook parameter. 

1. Define a variable as Parameter in your notebook and mark the cell as "Paramters" 

Andreas_Laeubli_0-1769272649072.png

 

2. Define your trigger in the Pipeline:

  • Source "OneLake events"
  • Eventtype: FileCreated
  • Add Onelake source: Lakehouse/Files/{Subfolder} (your case select inbox)

Andreas_Laeubli_1-1769272787711.png

3. Add Activity "Notebook" to Pipeline and use @pipeline()?.TriggerEvent?.Subject for the file information. Be sure that the name match the name in the Notebook parameters.

Andreas_Laeubli_2-1769272836930.png

 

my final Test result:

 

Andreas_Laeubli_3-1769272955036.png

Hope that helps, if not you, maybe someone else 😉 

BR Andreas

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

June Fabric Update Carousel

Fabric Monthly Update - June 2026

Check out the June 2026 Fabric update to learn about new features.