web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Onedrive for Business: "When a file is created trigger

(0) ShareShare
ReportReport
Posted on by

Hello there, 

 

I was trying to use the trigger above to start the process but it keeps throwing up an error. The files in the folder are just excel files, titled as such: Employee Number- Non Sensitive YYYY-MM-dd mm_ss.

 

Any ideas?

 

Thanks!

 

Here's a screenshot of the flow:

Screenshot 2021-08-18 142010.png

And the screenshot of the output:

amist15_1-1629264820324.png

 

I have the same question (0)
  • v-LilyW-msft Profile Picture
    on at
    Re: Onedrive for Business: "When a file is created trigger

    Hi @Anonymous 

    Thank you for posting.

    From the screenshot you provided, the statusCode shows 200, indicating the trigger is running successfully.

    Are there any other errors?

    If there is an error, there will be a red exclamation mark in the upper right corner, and there will be an error message on the right ,like this:

    vLilyWmsft_0-1629272860841.png

    Best Regards.

  • Mitanshu Profile Picture
    1,650 Moderator on at
    Re: Onedrive for Business: "When a file is created trigger

    What is the error message that you are getting? 🤔 From the output that you are showing in screenshot, it looks your Trigger was successful.

  • Community Power Platform Member Profile Picture
    on at
    Re: Onedrive for Business: "When a file is created trigger

    Hi both, thanks for replying..

     

    Sorry I'm still new to this! So the trigger works, and I've used file name contains in my condition but it never seems to trigger if yes. In the screenshot below, I definitely have an excel file starting with Learning Completions, but it always flows through to NO and I can't seem to find out why. 

    amist15_0-1629278235032.png

    amist15_1-1629278379250.png

     

  • Mitanshu Profile Picture
    1,650 Moderator on at
    Re: Onedrive for Business: "When a file is created trigger

    Create a Compose action and add a Expression as below

    triggerOutputs()?['headers']?['x-ms-file-name']
     
    You can use this in the Condition also.
     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    on at
    Re: Onedrive for Business: "When a file is created trigger

    Hi there, thanks for replying so quickly!

     

    Do you mean like this? Also, what is the error this time and what does that expression do? I've use file identifier or name in other flows before with no issues so I'm trying to understand what the issue here is..

     

    Thanks!

    amist15_0-1629282691732.png

     

     

     

  • Mitanshu Profile Picture
    1,650 Moderator on at
    Re: Onedrive for Business: "When a file is created trigger
    triggerOutputs()?['headers']?['x-ms-file-name'] is a reliable way of getting File name from OneDrive -> When an item is Created trigger.
     
    See below on where you should be writing the expression.

     

    happyume_0-1629282893679.png

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    on at
    Re: Onedrive for Business: "When a file is created trigger

    Thanks!

     

    I've managed to get the feed into the next step: "condition"

     

    Here's the error I encounted. I've never encountered such errors before, I don't even know where to start troubleshooting

     

    amist15_0-1629283810305.png

     

     

    {
      "status"400,
      "message""The file id 'Learning Completions - 21 June 2021-08-18 08_03.xlsx' is not valid.",
      "source""api.connectorp.svc.ms"
    }
     
    {
      "Pragma""no-cache",
      "Transfer-Encoding""chunked",
      "x-ms-request-id""b59398d3-f160-4b33-9b8a-9b4bd2b21313",
      "Timing-Allow-Origin""*",
      "x-ms-apihub-cached-response""true",
      "Cache-Control""no-cache",
      "Date""Wed, 18 Aug 2021 10:46:42 GMT",
      "X-AspNet-Version""4.0.30319",
      "X-Powered-By""ASP.NET",
      "Content-Type""application/json",
      "Expires""-1",
      "Content-Length""161"
    }
  • Verified answer
    Mitanshu Profile Picture
    1,650 Moderator on at
    Re: Onedrive for Business: "When a file is created trigger

    I believe your original query regarding trigger is now resolved - please can you accept the solution as it would help other users (who may have same problem) in finding an answer.

     

    For your new issue, you should ideally create a new thread. Under the Move or Rename a File action, are you using File Identifier for the File, or something else?

     

    happyume_0-1629284089882.png

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 532 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 461 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 256

Last 30 days Overall leaderboard