Microsoft SharePoint · Arazzo Workflow

SharePoint Upload a Document and Verify It

Version 1.0.0

Survey a library folder, upload a file with overwrite, then read the bytes back.

1 workflow 1 source API 1 provider
View Spec View on GitHub CollaborationDocument-ManagementEnterprise Content ManagementIntranetMicrosoftArazzoWorkflows

Provider

sharepoint

Workflows

upload-document
Upload a file into a SharePoint document library and verify it downloads.
Lists the target folder to reveal any file that would be overwritten, uploads the document, and downloads it back to confirm the round trip.
3 steps inputs: fileContent, fileName, folderUrl outputs: length, majorVersion, serverRelativeUrl, uniqueId
1
surveyFolder
List the folder before writing. The upload path carries overwrite=true, so this is the caller's only chance to see what an existing file of the same name looks like before it is replaced.
2
uploadDocument
Upload the document as a raw octet-stream. The operation overwrites any file already at this name and returns the created file's metadata, including the server-relative URL used to read it back.
3
verifyDownload
Download the file back from the server-relative URL the upload returned. A 200 here is the proof that the document is stored and retrievable, not merely that the write was accepted.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: SharePoint Upload a Document and Verify It
  summary: Survey a library folder, upload a file with overwrite, then read the bytes back.
  description: >-
    The document management flow that matters most in practice. The upload
    endpoint hardcodes overwrite=true, so the workflow deliberately surveys the
    folder first — the caller sees exactly what is about to be replaced instead
    of discovering it afterwards. After the upload it downloads the file back
    from its server-relative URL, which is the only real proof the bytes are
    retrievable rather than merely accepted. Every step spells out its request
    inline so the flow can be read and executed without opening the underlying
    OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: filesApi
  url: ../openapi/sharepoint-files-api-openapi.yml
  type: openapi
workflows:
- workflowId: upload-document
  summary: Upload a file into a SharePoint document library and verify it downloads.
  description: >-
    Lists the target folder to reveal any file that would be overwritten,
    uploads the document, and downloads it back to confirm the round trip.
  inputs:
    type: object
    required:
    - folderUrl
    - fileName
    - fileContent
    properties:
      folderUrl:
        type: string
        description: >-
          Server-relative folder URL, e.g. "/sites/mysite/Shared Documents".
      fileName:
        type: string
        description: File name to write, e.g. "quarterly-report.docx".
      fileContent:
        type: string
        format: binary
        description: Raw bytes of the file to upload.
  steps:
  - stepId: surveyFolder
    description: >-
      List the folder before writing. The upload path carries overwrite=true, so
      this is the caller's only chance to see what an existing file of the same
      name looks like before it is replaced.
    operationId: getFilesInFolder
    parameters:
    - name: folder_url
      in: path
      value: $inputs.folderUrl
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      existingFiles: $response.body#/value
      firstExistingName: $response.body#/value/0/Name
  - stepId: uploadDocument
    description: >-
      Upload the document as a raw octet-stream. The operation overwrites any
      file already at this name and returns the created file's metadata,
      including the server-relative URL used to read it back.
    operationId: uploadFile
    parameters:
    - name: folder_url
      in: path
      value: $inputs.folderUrl
    - name: file_name
      in: path
      value: $inputs.fileName
    requestBody:
      contentType: application/octet-stream
      payload: $inputs.fileContent
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      serverRelativeUrl: $response.body#/ServerRelativeUrl
      uniqueId: $response.body#/UniqueId
      length: $response.body#/Length
      majorVersion: $response.body#/MajorVersion
      timeLastModified: $response.body#/TimeLastModified
  - stepId: verifyDownload
    description: >-
      Download the file back from the server-relative URL the upload returned.
      A 200 here is the proof that the document is stored and retrievable, not
      merely that the write was accepted.
    operationId: downloadFile
    parameters:
    - name: file_url
      in: path
      value: $steps.uploadDocument.outputs.serverRelativeUrl
    successCriteria:
    - condition: $statusCode == 200
  outputs:
    serverRelativeUrl: $steps.uploadDocument.outputs.serverRelativeUrl
    uniqueId: $steps.uploadDocument.outputs.uniqueId
    length: $steps.uploadDocument.outputs.length
    majorVersion: $steps.uploadDocument.outputs.majorVersion

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/sharepoint-upload-document-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.