Using the SharePoint “Create item in a list” node, I can easily add a new record to my SharePoint list. But I also want to attach a file to that item so it shows up in the Attachments column for that record. The tricky part is that the Attachments column is hidden in the SharePoint list, so it doesn’t show up in the n8n creation interface. Do you know how I can get around this and add attachments when creating the item? There are some discussion on using HTTP request and it will be too much for citizen developers.
Thank you.
What is the error message (if any)?
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
You’re right that the Attachments column is hidden in SharePoint’s UI, but you can add attachments using the HTTP Request node with SharePoint’s REST API.
Here’s the setup:
First, create your list item using the regular SharePoint node
Get the item ID from that response
Add an HTTP Request node with these settings:
Method: POST URL: {{$json["YourSiteURL"]}}/_api/web/lists/getbytitle('YourListName')/items({{$json["id"]}})/AttachmentFiles/add(FileName='yourfile.pdf') Authentication: Use your SharePoint OAuth2 credentials Body: Send the file content as binary data Headers:
Accept: application/json;odata=verbose
Content-Type: application/json;odata=verbose
The file content can come from a previous node (like Read Binary File or Download from URL).
I’ve used this approach for client projects where we needed to attach generated reports to SharePoint items. Works reliably once you get the authentication sorted.
Thank you for your reply. It’s the authentication part which makes it more complicated. We’d like to introduce this to the citizen developers who have no IT background. Therefore adding the POST API call would frighten them out