How can I add attachment to SharePoint list item

Describe the problem/error/question

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.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

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:

  1. First, create your list item using the regular SharePoint node
  2. Get the item ID from that response
  3. 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).

Microsoft’s official docs on this: Working with lists and list items with REST | Microsoft Learn

More detailed example here: Attaching to list items with the Microsoft SharePoint REST API :: Stuart McColl

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.

Need help with the specific workflow setup?

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