cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tsyrell
Helper II
Helper II

SharePoint When File is Created trigger not triggered

I am building a flow that triggers when an new file is added to a SharePoint library.  I did not want to impact the current work library, so I build my own test version.  All worked well, so I repointed the flow to the work library.  At that point, the flow is no longer triggered when a new file gets added.  I am assuming that there is some difference between the test library that I created, and the active work version.   I reviewed all of the settings and adjust my test version to match. I then created a simple flow that triggers on a new file creation and sends me an email with the file name.  The flow works perfectly against my test library, but again, when I repointed to the work version, the flow never triggered.

 

Any thoughts?

 

 

 

 

17 REPLIES 17
v-yuazh-msft
Community Support
Community Support

Hi @tsyrell ,

 

Have you take a try to create a flow with your current work library directly?

 

Best regards,

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Alice, 

 

Yes, I tried the simple trigger flow directly against the work library, and it doesn't execute when a new file is added.  When I repoint it to my test library and add a new file, the flow is executed.

martinav
Community Champion
Community Champion

THis is just an idea, since the reason isnt obvious... but, have you tried to delete to trigger action, and re-create it?  I have had that fix many unknown issues.  Even when re-created with the exact same things!

 

 

I just tried the following:

  1. started fresh pointing to the work library triggering on new file creation
  2. added a file to the work library
  3. trigger did not execute
  4. repointed the trigger step to the test library
  5. added a file to the test library
  6. trigger executed and sent email
  7. repointed the trigger step back to the work library
  8. added a file to the work library
  9. trigger failed to execute again

Any other thoughts?

 

martinav
Community Champion
Community Champion

@tsyrell ,

 

Please check this...  I dont have time at the moment or I would, but SQL table triggers require a column to be indexed.  I would not expect that to be true for sharepoint, but perhaps that is an issue.  See if you sample has an indexed column and that indexing is enabled, as well as your active list you wish to trigger from.

Thanks for the suggestion.  That was actually one thing I had checked yesterday when I was reviewing both libraries for any differences in their attributes.  The work document library had two indexes created (Created and Created By) that were flagged as automatically created.  I went ahead and created those for my test library to see if it caused it to fail, and that had no affect.  I deleted them just now on my test library and the trigger still executed when I added a document. 

martinav
Community Champion
Community Champion

Wow, at this point, it seems like we need to backup a bit and do some other basic checking.  You might replace your trigger with a "button" (Manually Trigger a Flow)  so you can start this manually.  Do a simple Get Item from the sharepoint list to at least verify your connector.  Use any ID number from an existing item, just to see if it loads.  Then we can go from there.

 

I'm sorry if this is too fundamental, I dont want to insult your intelligence... but this is very strange.  I have seen many strange things in this system.  Something that "should" work but does not.  

No concerns at all.  I am relatively new to flow, so I am all ears.  I will say though, that this flow issue is on a library not a list.  I have a similar flow which triggers on a new item in a list, and that works correctly.  Is there a way to manually trigger a flow on a document?  I'm not seeing anything related to SP triggers that would seem to allow for a manual trigger.

 

The only set-up diferences that I can see between the work documents library and my test library are that I had to reindex the work documents library because of its size (was close to 4000 documents before we archived ~2000) causing search issues.  I am assuming that the reindex created the two indexes (Created and Created By) I mentioned earlier.  My test library didn't have those indexes.  I also checked a Governance Documents Library within the same site.  That was never manually reindexed, so it didn't have any indexes.  I repointed my test flow to that library and it worked correctly.

 

I've gone ahead and requested a reindex on both the Governance Documents library and my test library to see if that causes the problem.  

 

 

martinav
Community Champion
Community Champion

Yes, you did state clearly that its a document library.  There is a trigger for both types, so its all good..

 

What I wanted to have you do is create a manual trigger for you to just run your flow with "test" and not require a document drop.  Then, do a Get File Properties (in your case) and see if you can at least pull in an item into flow.

 

You mentioned the library size.  This point has been one that is a bit troubling to me.  Size does mattter...  Exceeding 2,000 is a bogie in powerapps for the whole "delegation" thing.  I could see it possible that the size of the library may fall off the stack and miss triggering.  The question is... "why?" and that I just do not know.  

 

Do try this quick manual check to see if you can "Get" an record from the library.

 

image.png

Yes, that ran successfully.  I have been successfully reading docs from that library, as I wrote the archive flow which runs in the morning, and moves files greater than 6 months old to an archive library.  

martinav
Community Champion
Community Champion

At this point... i'm thinking its something to do with the number of records.  Did you say you have more than 2,000 now?

 

I'm going to setup a trigger in my document library that has over 5,000 items, and see what happens.  It will send me e text when an item is created.

Yes, the work document library has 2071 files.  I repointed the test flow (when file is created then send notification email) to our Archive library which has 1924 files (archived from the work document library), and that worked as expcted when I added a file. 

 

That library had also not bee reindexed.  I set that up for as well for the next scheduled crawl, so we'll see if that has any impact.

martinav
Community Champion
Community Champion

Ok, I have recreated the exact scenario as you.  At least, it seems.

 

I created a trigger on new items to a library of over 5,000 items.... completely DEAD!  Nothing...

 

I moved the folder reference to a library with just a few items and BAM!  Worked right away.  

 

The number 2,000 is a bogie for many things powerapps/flow, etc.  Interesting that a "SQL Get Rows" is also limited to 2,000.  It seems to be a trait that is not well documented, except in Powerapps where you actually get feedback when you have a condition where you get "delegation" warnings.  It certainly does have an implact on scalability.  Its hard to know what you can and cannot do when your data sources get large.  It doesnt seem to be an issue for my app, since I have been able to write everything in PA that do not have delegation problems.  (Regarding my >5,000 issue).  However, I know I have an issue with one of my sources where I have to do many complex searches.  For that one, I have used a method that actually allows for 4,000 items.  I can get you to that info if you need it.

 

Regardless, I think we have the issue identified.  However, not solved.  I do not know how to get around this for this trigger action.  Perhaps a MSFT staff person can comment???

 

image.png

Thanks @martinav , I am extremely appreciative of your debugging efforts!  I'm going to modify the archive flow to move a few more weeks of older files to try to get under the 2000 file limit and see what that does.  Hopefully that will work in the interim until a better solution is presented.  I will let you know if I'm successful.

martinav
Community Champion
Community Champion

Sounds good.  Please do report back.  It would be nice to know if this 2,000 limit is a real thing for this trigger.  I havent found that this is published anywhere.  It should be.  It is not an accident, and people need to know about this sort of thing before they get a process ingrained in their processes, and then things suddenly stop when their databases get big.

 

In my case, I cannot move files around.  ALL of them are viable.  They are all active drawings.  Thus, I have to do things that circumvent these limits.  I know that I have a problem at 4,000 items in one of my databases.. I'm at about 2,400 and probably about 3 years from that point.  By then, I hope the system has evolved, or I will have to find alternatives.

 

Best of luck!

I modified my archive to get below the 2000 file limit, and the test still didn't work.  I then attempted to create a brand new test flow just to make sure that there wasn't any residual problem with the test flow, and noticed a different msg than I had see before. Because I have a notification step, I always see this msg and have completely ignored it:

Capture1.PNG

 

When I ran the new test, I noticed a different msg there:

Capture2.PNG

After clicking on the details, I saw the dreaded column threshold error. Once I fixed that, the test worked.  

 

I restored files to get back over the 2000 number, and ran a couple of tests with mixed results, so it still appears that that number can be an issue.  At this point, I think my flow is working, but will be testing more next week and will publish the results.

 

Thanks again @martinav for all of your help!

FranzRoss
Frequent Visitor

Did you guys figured how to free our poor souls of the deadly 5000 registers limit? Thanks in advance

Helpful resources

Announcements

Exclusive LIVE Community Event: Power Apps Copilot Coffee Chat with Copilot Studio Product Team

It's time for the SECOND Power Apps Copilot Coffee Chat featuring the Copilot Studio product team, which will be held LIVE on April 3, 2024 at 9:30 AM Pacific Daylight Time (PDT).     This is an incredible opportunity to connect with members of the Copilot Studio product team and ask them anything about Copilot Studio. We'll share our special guests with you shortly--but we want to encourage to mark your calendars now because you will not want to miss the conversation.   This live event will give you the unique opportunity to learn more about Copilot Studio plans, where we’ll focus, and get insight into upcoming features. We’re looking forward to hearing from the community, so bring your questions!   TO GET ACCESS TO THIS EXCLUSIVE AMA: Kudo this post to reserve your spot! Reserve your spot now by kudoing this post.  Reservations will be prioritized on when your kudo for the post comes through, so don't wait! Click that "kudo button" today.   Invitations will be sent on April 2nd.Users posting Kudos after April 2nd at 9AM PDT may not receive an invitation but will be able to view the session online after conclusion of the event. Give your "kudo" today and mark your calendars for April 3, 2024 at 9:30 AM PDT and join us for an engaging and informative session!

Tuesday Tip: Unlocking Community Achievements and Earning Badges

TUESDAY TIPS are our way of communicating helpful things we've learned or shared that have helped members of the Community. Whether you're just getting started or you're a seasoned pro, Tuesday Tips will help you know where to go, what to look for, and navigate your way through the ever-growing--and ever-changing--world of the Power Platform Community! We cover basics about the Community, provide a few "insider tips" to make your experience even better, and share best practices gleaned from our most active community members and Super Users.   With so many new Community members joining us each week, we'll also review a few of our "best practices" so you know just "how" the Community works, so make sure to watch the News & Announcements each week for the latest and greatest Tuesday Tips!     THIS WEEK'S TIP: Unlocking Achievements and Earning BadgesAcross the Communities, you'll see badges on users profile that recognize and reward their engagement and contributions. These badges each signify a different achievement--and all of those achievements are available to any Community member! If you're a seasoned pro or just getting started, you too can earn badges for the great work you do. Check out some details on Community badges below--and find out more in the detailed link at the end of the article!       A Diverse Range of Badges to Collect The badges you can earn in the Community cover a wide array of activities, including: Kudos Received: Acknowledges the number of times a user’s post has been appreciated with a “Kudo.”Kudos Given: Highlights the user’s generosity in recognizing others’ contributions.Topics Created: Tracks the number of discussions initiated by a user.Solutions Provided: Celebrates the instances where a user’s response is marked as the correct solution.Reply: Counts the number of times a user has engaged with community discussions.Blog Contributor: Honors those who contribute valuable content and are invited to write for the community blog.       A Community Evolving Together Badges are not only a great way to recognize outstanding contributions of our amazing Community members--they are also a way to continue fostering a collaborative and supportive environment. As you continue to share your knowledge and assist each other these badges serve as a visual representation of your valuable contributions.   Find out more about badges in these Community Support pages in each Community: All About Community Badges - Power Apps CommunityAll About Community Badges - Power Automate CommunityAll About Community Badges - Copilot Studio CommunityAll About Community Badges - Power Pages Community

Tuesday Tips: Powering Up Your Community Profile

TUESDAY TIPS are our way of communicating helpful things we've learned or shared that have helped members of the Community. Whether you're just getting started or you're a seasoned pro, Tuesday Tips will help you know where to go, what to look for, and navigate your way through the ever-growing--and ever-changing--world of the Power Platform Community! We cover basics about the Community, provide a few "insider tips" to make your experience even better, and share best practices gleaned from our most active community members and Super Users.   With so many new Community members joining us each week, we'll also review a few of our "best practices" so you know just "how" the Community works, so make sure to watch the News & Announcements each week for the latest and greatest Tuesday Tips!   This Week's Tip: Power Up Your Profile!  🚀 It's where every Community member gets their start, and it's essential that you keep it updated! Your Community User Profile is how you're able to get messages, post solutions, ask questions--and as you rank up, it's where your badges will appear and how you'll be known when you start blogging in the Community Blog. Your Community User Profile is how the Community knows you--so it's essential that it works the way you need it to! From changing your username to updating contact information, this Knowledge Base Article is your best resource for powering up your profile.     Password Puzzles? No Problem! Find out how to sync your Azure AD password with your community account, ensuring a seamless sign-in. No separate passwords to remember! Job Jumps & Email Swaps Changed jobs? Got a new email? Fear not! You'll find out how to link your shiny new email to your existing community account, keeping your contributions and connections intact. Username Uncertainties Unraveled Picking the perfect username is crucial--and sometimes the original choice you signed up with doesn't fit as well as you may have thought. There's a quick way to request an update here--but remember, your username is your community identity, so choose wisely. "Need Admin Approval" Warning Window? If you see this error message while using the community, don't worry. A simple process will help you get where you need to go. If you still need assistance, find out how to contact your Community Support team. Whatever you're looking for, when it comes to your profile, the Community Account Support Knowledge Base article is your treasure trove of tips as you navigate the nuances of your Community Profile. It’s the ultimate resource for keeping your digital identity in tip-top shape while engaging with the Power Platform Community. So, dive in and power up your profile today!  💪🚀   Community Account Support | Power Apps Community Account Support | Power AutomateCommunity Account Support | Copilot Studio  Community Account Support | Power Pages

Super User of the Month | Chris Piasecki

In our 2nd installment of this new ongoing feature in the Community, we're thrilled to announce that Chris Piasecki is our Super User of the Month for March 2024. If you've been in the Community for a while, we're sure you've seen a comment or marked one of Chris' helpful tips as a solution--he's been a Super User for SEVEN consecutive seasons!   Since authoring his first reply in April 2020 to his most recent achievement organizing the Canadian Power Platform Summit this month, Chris has helped countless Community members with his insights and expertise. In addition to being a Super User, Chris is also a User Group leader, Microsoft MVP, and a featured speaker at the Microsoft Power Platform Conference. His contributions to the new SUIT program, along with his joyous personality and willingness to jump in and help so many members has made Chris a fixture in the Power Platform Community.   When Chris isn't authoring solutions or organizing events, he's actively leading Piasecki Consulting, specializing in solution architecture, integration, DevOps, and more--helping clients discover how to strategize and implement Microsoft's technology platforms. We are grateful for Chris' insightful help in the Community and look forward to even more amazing milestones as he continues to assist so many with his great tips, solutions--always with a smile and a great sense of humor.You can find Chris in the Community and on LinkedIn. Thanks for being such a SUPER user, Chris! 💪 🌠  

Tuesday Tips: Community Ranks and YOU

TUESDAY TIPS are our way of communicating helpful things we've learned or shared that have helped members of the Community. Whether you're just getting started or you're a seasoned pro, Tuesday Tips will help you know where to go, what to look for, and navigate your way through the ever-growing--and ever-changing--world of the Power Platform Community! We cover basics about the Community, provide a few "insider tips" to make your experience even better, and share best practices gleaned from our most active community members and Super Users.   With so many new Community members joining us each week, we'll also review a few of our "best practices" so you know just "how" the Community works, so make sure to watch the News & Announcements each week for the latest and greatest Tuesday Tips!This Week: Community Ranks--Moving from "Member" to "Community Champion"   Have you ever wondered how your fellow community members ascend the ranks within our community? What sets apart an Advocate from a Helper, or a Solution Sage from a Community Champion? In today’s #TuesdayTip, we’re unveiling the secrets and sharing tips to help YOU elevate your ranking—and why it matters to our vibrant communities. Community ranks serve as a window into a member’s role and activity. They celebrate your accomplishments and reveal whether someone has been actively contributing and assisting others. For instance, a Super User is someone who has been exceptionally helpful and engaged. Some ranks even come with special permissions, especially those related to community management. As you actively participate—whether by creating new topics, providing solutions, or earning kudos—your rank can climb. Each time you achieve a new rank, you’ll receive an email notification. Look out for the icon and rank name displayed next to your username—it’s a badge of honor! Fun fact: Your Community Engagement Team keeps an eye on these ranks, recognizing the most passionate and active community members. So shine brightly with valuable content, and you might just earn well-deserved recognition! Where can you see someone’s rank? When viewing a post, you’ll find a member’s rank to the left of their name.Click on a username to explore their profile, where their rank is prominently displayed. What about the ranks themselves? New members start as New Members, progressing to Regular Visitors, and then Frequent Visitors.Beyond that, we have a categorized system: Kudo Ranks: Earned through kudos (teal icons).Post Ranks: Based on your posts (purple icons).Solution Ranks: Reflecting your solutions (green icons).Combo Ranks: These orange icons combine kudos, solutions, and posts. The top ranks have unique names, making your journey even more exciting! So dive in, collect those kudos, share solutions, and let’s see how high you can rank!  🌟 🚀   Check out the Using the Community boards in each of the communities for more helpful information!  Power Apps, Power Automate, Copilot Studio & Power Pages

Find Out What Makes Super Users So Super

We know many of you visit the Power Platform Communities to ask questions and receive answers. But do you know that many of our best answers and solutions come from Community members who are super active, helping anyone who needs a little help getting unstuck with Business Applications products? We call these dedicated Community members Super Users because they are the real heroes in the Community, willing to jump in whenever they can to help! Maybe you've encountered them yourself and they've solved some of your biggest questions. Have you ever wondered, "Why?"We interviewed several of our Super Users to understand what drives them to help in the Community--and discover the difference it has made in their lives as well! Take a look in our gallery today: What Motivates a Super User? - Power Platform Community (microsoft.com)

Users online (4,664)