Skip to main content

Notifications

Community site session details

Community site session details

Session Id : NxECLkP3LOnt2mk5dZa0IU
Power Automate - Building Flows
Unanswered

Error of Flow for creating item in sharepoint when a file uploaded in document library

Like (0) ShareShare
ReportReport
Posted on 10 May 2018 10:50:04 by 8

i am creating Flow to create item in SharePoint list when a file uplloaded in SharePoint document library. However sometimes it doesn't work as expected. Could you give me some advice on this?

 

In the document library, there is some columns and a data is filled in each column.

 

Columns in SharePoint Documnet library

 

I creat the same columns in SharePoint list and in the Flow, I configure it to copy the data from documnet library column to the corresponded SharePoint list column.

However, as i run this test several times, it fails to copy the data from document library column to list column sometimes.

Here is the example. File "050801" is the failed file. File "DOO" is successful file.

 

Columns in SharePoint List

 

For the failed Flow, Flow "Run history" status shows "Succeeded". However, when i check the detailed log, it seems it failes to get the data because it says "null" where is supposed to have a data.

We perform test on the several PC using several user accounts, same file but it intermittently happen and it's difficult to get the reason of this failure.

Could somebody tell me what is the possible reason of this issue?

 

Here is the part of Flow log for action part(Create item)

 ================================================

item
{
  "Title""XXXX 050801",
  "h91r"null,
  "idmm"null,
  "i8t7"null,
  "twil"null,
  "sbbw"null,
  "j1h0""XXXX-201825",
  "mles""https://xxxxx.sharepoint.com/teams/xxxxxx/xxxxxx/Shared%20Documents/xx/xxxx%20050801.xlsm?d=w9a917099cd1b4f7bab38a6e608c0329b",
  "OData__Status": {
    "Value""Not Started",
    "@odata.type""#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
  }
}

 ==================================================

 

Thanks in advance.

  • miho-s Profile Picture
    8 on 21 May 2018 at 04:26:55
    Re: Error of Flow for creating item in sharepoint when a file uploaded in document library

    Hi Kris,

     

    I realized i can assign unique number in a document library column for each document using Flow.

    I use "SharePoint - Update file properties" as action in my Flow. Prepare column for unique number and assign unique ID using [ID] properties. So my problem can be resolved using alternative solution. Thank you very much for your advice!

     

    Support for SharePoint Document Library Properties | Flow Blog

    Support for SharePoint Document Library Properties

    https://flow.microsoft.com/en-us/blog/support-for-sharepoint-document-library-properties/

     

  • miho-s Profile Picture
    8 on 15 May 2018 at 04:20:14
    Re: Error of Flow for creating item in sharepoint when a file uploaded in document library

    Hi Kris,

     

    Thank you for your check my problem and reply.

    This is the Flow I created for the SharePoint.

     Flow_0515.png

     

    Flow is consisted of 1 trigger and 2 actions now.

    1. Trigger - "When a file is created or modified (properties only)"

    2. Action #1 - "Send an email"

    3. Action #2 - "Create item"

     

    About the trigger,

    I add a "When a file is created or modified (properties only)" trigger as the trigger of my Flow.

    And I create some custom columns within my SharePoint library for document parser.

    I want to set specific data within Excel file into a library column along with the document detaills.

     

    As I thought the transaction is too fast between Trigger and Action #2 to get data from document library columns, i add one more Action #1 between the trigger Trigger and Action #2 but situation is same. It failes intermittently.

     

    What I want to create using Flow is document management. We upload documnet into SharePoint and want to assign unique number for each document.

    I wanted to create column for unique number in document library but it seems Flow desn't support "Create item" action for document library so now I copy the data to list for document management. 

     

    Coudl you tell me what is the problem with my Flow....? Do you have another idea for this?

  • v-xida-msft Profile Picture
    on 14 May 2018 at 08:32:13
    Re: Error of Flow for creating item in sharepoint when a file uploaded in document library

    Hi @miho-s,

     

    Could you please share a screenshot of your flow's configuration?

    Do you add a "When a file is created or modified (properties only)" trigger as the trigger of your flow?

    Further, do you create some custom columns within your SharePoint library?

     

    I think this issue is related to the trigger that you specified within your flow. If you created some custom columns within your library and want to fill them, you could only fill these columns after the file is uploaded.

     

    When you uploaded a new file into your SharePoint library, the trigger that you specified within your flow would be fired, but these custom columns that you specified within your library have not been provided with a value, so the "Create item" action would create an item where these corresponding columns are empty. 

     

    I have made a test on my side and please take a try with the following workaround:22.JPG

    Within Condition box, left input box set to Created dynamic content of the trigger, right input box set to Modified dynamic content of the trigger.

     

    or you could click "Edit in advanced mode", type the following formula:

    @equals(triggerBody()?['Created'], triggerBody()?['Modified'])

    the flow works successfully as below:23.JPG

     

    Best regards,

    Kris

     

     

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 51

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 39 Super User 2025 Season 1

#3
CU30040420-0 Profile Picture

CU30040420-0 23

Overall leaderboard
Loading started