FlowmageDocs

Upload file

BetaChanges data

Stores a file in a OneDrive or SharePoint folder.

Settings

SettingWhat it is
ConnectionRequiredThe Microsoft Graph connection the step signs in with.
Drive of"user" or "group" or "site" or "drive"
OwnerRequiredThe person's id or sign-in address, the group's id, the site's id or the drive's id — whichever Drive of names.
FolderThe folder's id, or its path from the drive's root starting with /. Leave empty for the root.
File nameRequiredThe file's name, extension included. Pick the file, then paste its base64 below.
File contentsRequiredBase64 of the file — {{ file("name").base64 }}. One call carries it whole, so the run's parse limit bounds it; Upload large file sends a bigger Storage file in parts.
Media typetext
If the name is taken"replace" or "rename" or "fail"
Technical details
KeyValue
connectiontexta connection id from `requires.connections` (provider `microsoft-graph`)
driveOf"user" or "group" or "site" or "drive", by default "user"
ownertext
foldertext
nametexta file name, listed in `requires.files`
contentBase64textits `{{ }}` must give a string
contentTypetext, by default "application/octet-stream"
conflictBehavior"replace" or "rename" or "fail", by default "replace"

Output

FieldType
idFile idstring
webUrlLink in Microsoft 365string
itemFileobject
Sample output, and the expression for each field
  • id"01NEW"
  • item
    • id"01NEW"
  • webUrl"https://contoso.sharepoint.com/q1"

Errors

When a step of this node stops a run, the run page shows a code. Look it up:

Example step

The step as a flow file holds it. Replace each value in <…>.

{
  "config": {
    "conflictBehavior": "replace",
    "connection": "<connection id>",
    "contentBase64": "<file contents>",
    "contentType": "application/octet-stream",
    "driveOf": "user",
    "folder": "",
    "name": "<file name>",
    "owner": "<owner>"
  },
  "label": "Upload file",
  "type": "graph.uploadFile",
  "version": 1
}