Hello,
Has anyone got experience with the Get attchments from a list item action? I am trying to use this action before doing a copy of these files in to a document library.
In general this item works very well, but if a list item has more than 3 attachments, only 3 are provided in the array body for that item. There are no errors, it just seems to truncate and move on to next steps.
any help or suggestions appreciated for how to solve this issue.
thanks
Andrew
Solved! Go to Solution.
Hi everyone,
so I think I have found a reason and potential solution/consideration.
Using the "Item Created" trigger, upon my saving of an item, the list item is created there and then. The attachments are then uploaded and added to this item simultaneously.
However, as Flow is running persistently, this often picks up from the fact that the item is indeed created. It will not care if attachments have not finished uploading yet, therefore only pulling in to the array the number of attachments currently present.
So the more attachments there are, and the larger they are, the less likely your flow array for "Get attachments" will be to contain all the list item attachments.
I guess this is also partly dependent on the upload link of your location!
In any case, for the purpose of checking this, I have added a "Schedule Delay" action of 2 minutes before the flow enters the "Get attachments" action. This worked and all item attachments are included.
Andrew
Hi andrew_blubase,
According to your description, it seems that you are trying to save SharePoint list attachments to SharePoint library.
To test this issue, I created a flow likes below. There are four attachments in the list item and all of them are copied to the library successfully.
I am not able to reproduce the issue you mentioned that “only 3 are provided in the array body for that item”. Please try again with it.
If you are still having the issue, please feel free post back with a screenshot of your flow configuration to help reproduce this issue.
Best regards,
Mabel Mao
Hi Mabel,
thanks for testing this.
I have just tried again by creating a new list item with 10 attachments. This time I got 5 items in the array and copied to the library.
See attachments for list item, flow configuration and success screen for the flow run.
This is in my default Flow environment.
any further advice?
thanks
Andrew
Hi everyone,
so I think I have found a reason and potential solution/consideration.
Using the "Item Created" trigger, upon my saving of an item, the list item is created there and then. The attachments are then uploaded and added to this item simultaneously.
However, as Flow is running persistently, this often picks up from the fact that the item is indeed created. It will not care if attachments have not finished uploading yet, therefore only pulling in to the array the number of attachments currently present.
So the more attachments there are, and the larger they are, the less likely your flow array for "Get attachments" will be to contain all the list item attachments.
I guess this is also partly dependent on the upload link of your location!
In any case, for the purpose of checking this, I have added a "Schedule Delay" action of 2 minutes before the flow enters the "Get attachments" action. This worked and all item attachments are included.
Andrew
I have a related problem: I use the trigger on create or modify. When a list item with attachments triggers the flow that sends an email containing the list item and attachments, the flow is triggered multiple times. Once for the creation of the initial item, and the once for each attachment. I assume the modify trigger is kicking off for each attachment as the attachment upload completes. I'll try the delay function, but suspect the attachment triggers will just stack up in the queue.
Thanks Andrew - this was definitely the answer. After only one of my three attachments came across, I deleted that one and resubmitted the instance, and got all three (as all three were in place by then.) A two-minute delay should be sufficient for all but very large docs.
WooW!
Thanks for solution!
User | Count |
---|---|
6 | |
6 | |
4 | |
4 | |
2 |
User | Count |
---|---|
8 | |
8 | |
4 | |
4 | |
4 |