Add an new Item in a Sharepoint list with Attachments

Hi Guys!

I need to add a new item to a List and then with other process update that item and attach a file…

Somebody have any solution or idea how I can do it?

I already tried:

I can create a new Item in the list without attachment ok

I can create manually an Item in the List and attach a File without issues , then I can automatically with Uipath attach files to this item, I checked with a query and the property Attachments is true.

I discovered If I create an Item automatically without attachment of course the property Attachments is false. Knowing that I tried to set up the Attachment to true when I add an Item to the list so I could Upload then the file but Doesnt work

show me this error.

image

@radu_bucur @Diana_Mincu Could you give me a hint please?

thanks

I found this link …could somebody give a hint how to use code in Uipath?

Hi Carmen,

The way this would work is you should create the items using the Create List Item activity and save the IDs and then do a subsequent query that uses the Upload Attachment activity to upload the attachments

Hi @radu_bucur, thanks for answer.

I tried that and doesn’t work. when I did, I got the error 409.

The way that you say just work for me when after I created the item, I attached manually a file, then with the Id I can attached another file with Uipath.

But if the item is created and never had an attachment before doesnt work. that escenario give me the 409 error.

Hi Carmen,
I am not sure what Sharepoint package you currently have, so I will show you my implementation in the pictures bellow. I am using the Add List Item and the Add List Item Attachments activities.
1.I create the dictionary for adding a new list item


2.The setup of the Add List Item activity:

3. The setup of the Add List Item Attachments

Using this sample, I am able to create a new item and add an attachment to it. Let me know if this works for you! If not, could you please provide us with a sample of your code in which you are implementing this logic? Also let us know what Sharepoint package version you are using.

Thank you,
Diana

2 Likes

Hi @Diana_Mincu, thanks for your answer, could you tell me please where I can find that version that you are using, I am using 1.3 the same that is in Uipath Go and this version doesn’t have Add List Item Attachments.

I got the 1.4 that you shared with me here … Sharepoint Activities - #13 by carmen

I didnt tried before because finally I got updated the Studio, but I tried now and I got that actitivies that you said and works perfect.

This is the last one? I would like to have the last version.

Thanks again!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.