cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

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.

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?

 

@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. 

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.  

 

 

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.  

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.

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.

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

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages