cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Create new items in SharePoint list from Excel table doesn't work anymore

Hello everyone, 

 

I need your help! I have a flow that worked for some time and now is not for no apparent reasons, and with no errors...

 

I have a simple flow that pull data from an Excel file to update a SharePoint list. If the item is already on the SharePoint list, it updates the data, if not it create the new entry. Worked perfectly fined. I'm putting sreenshot of the flow in attachement for the details.

 

For some time now I realized it did not create the new items anymore. The update is working fine, so I can just create quickly manually the new entry with just the value I'm using for the lookup, and it will update. But I have no error message, nothing.

 

When looking at the Flow execution steps, it goes correctely to the conditions : if the ID field is Blank, then create, otherwise update. Test : 

 

empty(body('Get_items')?['value'])

 

The issue is that it goes through the Create item conditions, execute with no errors (but 0 secondes spent) and continue. It worked before and I'm pretty sure I haven't touched anything since then. Any idea what can be the issue? I tried to delete the condition and recreate it, with no avail. 

 

Any help is welcome, let me know if you need more information. Thank you!

 

Flow-MAserlist2.png

 

Flow-MAserlist1.png

 

 

 
 
1 ACCEPTED SOLUTION

Accepted Solutions

Wait, wait, wait... you need to move 'Create item' out of 'Apply to each 3' and remove 'Apply to each 3'. I mean, if 'Get items' output is empty (true branch), 'Apply to each 3' iterates over... 0 elements, so action blocks inside it are never executed.
Hope this helps

Did I make your day? If so, mark my response as 'Solution' !!!

También escribo sobre Power Automate en este Blog y en Twitter

View solution in original post

12 REPLIES 12
efialttes
Community Champion
Community Champion

Hi!
Let me see I understood the problem... the condition evaluation still works fine? I mean, if there is already an item in sharepoint, it takes the false branch, and if there is not item yet in sharepoint, it takes the true branch?

Some more questions... how many rows in your excel? If more than 256 you need to activate pagination. And... how many items in your sSP list? If more than 100, you need to increase Top Count, if more than 5,000 you need to activate pagination
Hope this helps

Did I make your day? If so, mark my response as 'Solution' !!!

También escribo sobre Power Automate en este Blog y en Twitter

Anonymous
Not applicable

Hi @efialttes thanks for the reply!

 

- You understood correctly. The condition is working fine, it goes to the correct branch. IF blank (item not existing yet) it goes to the "true" branch. It goes without an error but don't create the item anymore.

 

- There is 157 rows in the Excel file as of now. I'm planning to clean up data regularely to keep it less than 160 rows. 100 should be a max at terms, but thanks for the hint, I'll check this pagination concept I'm not familliar with.

 

- The number of items in SharePoint should be the same (I'll add later a condition to delete the item if not present anymore in the Excel file). So the issue may be the Top Count? I'll have a look at that as well, not know exactly what is it. There is no way the list is going over 5k rows.

 

Thanks, I'll keep you posted if it works!

Hi again!

 



So if more than 100 items in your sharepoint list, please apply the steps explained in this great post:
https://alextofan.com/2019/08/22/how-to-get-more-than-5000-item-from-sharepoint-online-in-flow/

You can easily verify if you are reaching the default limit, just add a dummy Compose action block after 'Get items', and assign it the following expression

 

length(body('Get_items')?['value'])

 

If you are not yet familiar with adding expressions please follow the steps detailed here:

https://flow.microsoft.com/es-es/blog/use-expressions-in-actions/

 

Now, everytime you execute your flow the dummy Compose will print the nr of items present in the output

Actually, you can apply a very simple trick to verify if 'Create item' is working, but for some reason your Sharepoint view is not showing it in the browser, that is...

Just after 'create item', add a new 'Get items', then add another dummy compose action block. I assume Flow editor will rename new 'Get items' as 'Get items 2', if so the expressionfor this second dummy Compose should be

 

 

length(body('Get_items_2')?['value'])

 

 

Hope this helps

Did I make your day? If so, mark my response as 'Solution' !!!

También escribo sobre Power Automate en este Blog y en Twitter

MissDom
Advocate I
Advocate I

Did you try simply to reselect the Excel file and table in "list rows present in a table" ?

The table reference is hard coded and I have noticed in the past that if I create an identical file with identical table name, than I am not able to query it

hope this helps

Hi!

Forgot to explain how to activate pagination guen using 'List rows present in a table', please check solution here:

https://powerusers.microsoft.com/t5/Connecting-To-Data/Excel-Business-List-rows-present-in-a-table-2...

Hope this helps

Did I make your day? If so, mark my response as 'Solution' !!!

También escribo sobre Power Automate en este Blog y en Twitter

Anonymous
Not applicable

Thank you both for your ideas (this time I have hit the Like button!)

 

Unfortunately those solutions didn't work. I upped the Top Count limit, activated the pagination, but the same results.

 

I'm not sure it is related to the Get Items or the List table, because it collect the data in Excel correctely, and get the info from SharePoint correctly as well, because the update is working well. I don't understand why the creation part was working and not anymore.

 

Here is the code for the whole "Create Item", maybe it helped (I tried to anonymize some part of the code, please let me know if I let something in it that I shouldn't have!)

 

{"id":"bd57a9d1-8e95-xxxxxxx","brandColor":"#036C70","connectionReferences":{"shared_excelonlinebusiness_1":{"connection":{"id":"/providers/Microsoft.PowerApps/apis/shared_excelonlinebusiness/connections/shared-excelonlinebu-043bae83-xxxxxxx"}},"shared_sharepointonline_1":{"connection":{"id":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-4409ad72-2a57-xxxxxxxxxxx"}},"shared_sharepointonline":{"connection":{"id":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-d71e3022-71f4-xxxxxxxxxxxxxx"}}},"connectorDisplayName":"SharePoint","icon":"https://connectoricons-prod.azureedge.net/sharepointonline/icon_1.0.1329.1953.png","isTrigger":false,"operationName":"Create_item","operationDefinition":{"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters('$connections')['shared_sharepointonline_1']['connectionId']"}},"method":"post","body":{"Title":"@items('Apply_to_each')?['Project ID']","Project_x0020_Name":"@items('Apply_to_each')?['Project Name']","Project_x0020_Description":"@items('Apply_to_each')?['Project Description']","Programme":"@items('Apply_to_each')?['Programme']","Project_x0020_Status":"@items('Apply_to_each')?['Project Status']","Start":"@items('Apply_to_each')?['Start']","Technical_x0020_Go_x0020_Live":"@items('Apply_to_each')?['Technical Go Live']","Business_x0020_Go_x0020_Live":"@items('Apply_to_each')?['Business Go Live']","Planned_x0020_Closure":"@items('Apply_to_each')?['Planned Closure']","Progress":"@items('Apply_to_each')?['Progress']","Phase":"@items('Apply_to_each')?['Phase']","PM":"@items('Apply_to_each')?['PM']","Lead_x0020_Architect":"@items('Apply_to_each')?['Lead Architect']","OTP_x0020_Number":"@items('Apply_to_each')?['OTP Number']","Budget_x0020_Cost":"@items('Apply_to_each')?['Budget Cost']","Supplier":"@items('Apply_to_each')?['Service Provider']","SharepointSite":"@items('Apply_to_each')?['Sharepoint Project Site']","BRM":"@items('Apply_to_each')?['BRM']","PeerReviewer":"@items('Apply_to_each')?['Peer Reviewer']","ServiceManager":"@items('Apply_to_each')?['Service Manager']","ProjCreatedDate":"@items('Apply_to_each')?['Created']","IAM":"@items('Apply_to_each')?['IAM?']","Dynamics":"@items('Apply_to_each')?['Dynamics?']","OData__x004f_365":"@items('Apply_to_each')?['O365?']","Service_x0020_Now":"@items('Apply_to_each')?['ServiceNow?']","SAP":"@items('Apply_to_each')?['SAP?']","Other":"@items('Apply_to_each')?['Other?']","ProjectDepartment":"@items('Apply_to_each')?['Department']","BudgetOwner":"@items('Apply_to_each')?['Budget owner']","LastSteerCo":"@items('Apply_to_each')?['Last SteerCo']","NextSteerCo":"@items('Apply_to_each')?['Next SteerCo']"},"path":"/datasets/@{encodeURIComponent(encodeURIComponent('https://xxxxxxx'))}/tables/@{encodeURIComponent(encodeURIComponent('2f7b98dc-da35-4f55-9cdc-2c62fbbeba07'))}/items","authentication":"@parameters('$authentication')"},"runAfter":{},"metadata":{"flowSystemMetadata":{"swaggerOperationId":"PostItem"}}}}

Hi again

Can you share a screenshot from your 'Create item' design? I think it's gonna be easier to inspect it, and the first screenshot you share seems not to show the whole action block.

Also, since you inspected flow execution, did you verify nr of times inner 'Apply to each' iterates? Can you share a screenshot from this also?

 

One final suggestion: why don't you add an additional 'Get items' at the bottom of your flow, and then count current nr of items? So maybe you are using some sort of filter view on Sharepoint and you do not see new items anymore on your browser

THanx!

Did I make your day? If so, mark my response as 'Solution' !!!

También escribo sobre Power Automate en este Blog y en Twitter

Anonymous
Not applicable

Soooo, more details. Thanks for the Compose tip, it's a great help for debugging.

 

Here is the detail of the Create Item bloc. It's much longer but after that it's just more field to populate. As it doesn't even go to that step I doubt it's relevant.

 

Create Item blocCreate Item bloc

 

Running the flow with the compose, here is the output with a "false" results condition (going to Update Item branch) and the a "true" results condition going to the Create Item branch.

 

False : updating OKFalse : updating OK

 

True : stop after the apply to eachTrue : stop after the apply to each

 

As you can see, this is an "Apply to each 3" as I already tried to remove the branch and create it again, to no avail.

 

Any way to see more in detail what is happening in this apply to each? Related to the "input 0" out of the first Compose? 

Anonymous
Not applicable

In addition, to confirm the filters or the view on the sharepoint list, I'm just doing a query in Excel to control the data (and to compare with my source Excel file).

 

Something just come to mind... I don't have a delete function yet, so I have entries in my list that are not anymore in my source Excel file. Would that create an issue in the current scenario? I don't see why, but exploring all options...

Wait, wait, wait... you need to move 'Create item' out of 'Apply to each 3' and remove 'Apply to each 3'. I mean, if 'Get items' output is empty (true branch), 'Apply to each 3' iterates over... 0 elements, so action blocks inside it are never executed.
Hope this helps

Did I make your day? If so, mark my response as 'Solution' !!!

También escribo sobre Power Automate en este Blog y en Twitter

Anonymous
Not applicable

It make total sense! It's more clear thanks to the compose. I'll try it.

But did I need to indicate the create item to use the "Value" from the original Get Items? What is the best way to do it? I think it is why I put the Apply to each originally.

Anonymous
Not applicable

It worked, thanks a lot! I marked it as solved.

 

The debugging trick with Compose is something that will help me a lot down the line, thousand thanks. Now I'll start working on the delete function to keep the list clean... more fun ahead!

 

Greetings @efialttes 

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

Users online (1,221)