English
Upload to OneDrive
Uploads the attachments (from the email or added by a step) — or some text — into a folder of your OneDrive.
This node puts files into the OneDrive of the member running the workflow: the attachments of the run (those of the triggering email and the files added by earlier steps), or a text you write (a report, a summary, a CSV).
It needs the OneDrive access of a Microsoft account, shown as the Files capability in Connections (button Connect OneDrive). See Microsoft. The access covers the member's own OneDrive only; a SharePoint team site needs the SharePoint node.
Create the destination first with Create a OneDrive folder, and find existing files with Search OneDrive. For Google Drive, use Drive — upload a file.
At a glance
- Type:
onedrive.upload· version 1 - Category: Actions
- Kind: Step — one stage of a run
- Effect: Writes outside (
external_write) — writes outside Mankomail; described instead of performed during a test run - Needs a carrier email: No
- Connection: Microsoft (capability
files) - Inputs:
main - Outputs:
main
Connection
This node needs a Microsoft connection with the files capability granted.
Parameters
credential
Microsoft account — The account whose OneDrive is used. Connect it from Connections; the token is resolved by the server and appears nowhere.
- Type: Connection (
credential) - Required: No
- Default:
""(empty)
source
What to upload
- Type: One choice (
options) - Required: Yes
- Default:
attachment - Options:
attachment— The attachments: Those of the email and the files added by an earlier step, uploaded as-is — the "file the invoice" case.text— Some text: Content you write (accepts{{ }}expressions): a report, a summary, a CSV.
selection
Attachments to use
- Type: One choice (
options) - Required: Yes
- Default:
all - Options:
all— All attachments: Those of the triggering email, then the files added by earlier steps (a fetched deed, a signed PDF), in that order.first— The first one only: The first attachment, when only one matters.byMime— By file type: By MIME type:application/pdf, or a whole family withimage/*.byName— By file name: By name pattern:*.pdf,invoice-*.
- Shown when:
sourceisattachment
mime
File type — Exact MIME type (application/pdf) or a whole family (image/*). Left empty, no attachment is kept.
- Type: Text (
string) - Required: No
- Default:
""(empty) - 200 characters at most
- Example:
application/pdf - Shown when:
sourceisattachmentandselectionisbyMime - Expressions:
{{ }}accepted
namePattern
File name — Simple pattern: * matches anything, ? one character (*.pdf, invoice-*). Case is ignored.
- Type: Text (
string) - Required: No
- Default:
""(empty) - 200 characters at most
- Example:
*.pdf - Shown when:
sourceisattachmentandselectionisbyName - Expressions:
{{ }}accepted
text
Content — The file content. Accepts {{ }} expressions: {{ data.summarize_1.summary }}, {{ email.subject }}.
- Type: Long text (
text) - Required: No
- Default:
""(empty) - 200000 characters at most
- Shown when:
sourceistext - Expressions:
{{ }}accepted
fileName
File name — Extension included. Left empty with attachments, each keeps its own name; filled in, it only applies when a single attachment matches.
- Type: Text (
string) - Required: No
- Default:
""(empty) - 255 characters at most
- Example:
invoice-{{ email.from.email }}.pdf - Expressions:
{{ }}accepted
folder
Destination folder — Left empty: the root of your OneDrive. Pick from the list, paste an id or a OneDrive URL.
- Type: Remote resource (
resourceLocator) - Required: No
- Default:
{"mode":"id","value":""} - Ways to choose: pick from a list, type an ID, paste a URL (
onedrive.folder) - Listed with the connection in:
credential
onConflict
If the name already exists
- Type: One choice (
options) - Required: Yes
- Default:
rename - Options:
rename— Keep both: OneDrive numbers the new one (invoice 1.pdf). Nothing is lost.skip— Do nothing: The file already there is returned as-is, never overwritten.replace— Replace: The content overwrites the existing file (OneDrive keeps its version history).
Outputs
main
Data produced
What this node adds to the run data, and how to read it in an expression. <step> stands for the step key: the node name turned into an identifier (see Data and expressions).
{{ data.<step>.files }}—array of { id, name, mime, size, webUrl, folderId }. One entry per file handled, in order: the file written, or the file already in place when it was reused or skipped.idis the OneDrive item id,webUrlthe link that opens it in OneDrive,folderIdthe id of its parent folder (empty for the root),sizeits size in bytes.{{ data.<step>.files.0.webUrl }}—string. The OneDrive link of the first file, ready to paste into an email. Empty in a test run.{{ data.<step>.count }}—number. The number of entries infiles.{{ data.<step>.reused }}—array of string. The names of the files a replay found already uploaded by an earlier attempt of the step: nothing was written again.{{ data.<step>.skipped }}—array of string. With If the name already exists set to Do nothing: the names that were already taken. The existing file was left untouched and is the one listed infiles.{{ data.<step>.attachments }}—array of { position, filename, mime, size, origin, addedByNodeId?, integration? }. With What to upload set to The attachments: where each uploaded attachment comes from.originisemail(the triggering email) oradded(a file added by an earlier step). Empty for text.{{ data.<step>.summary }}—string. A readable sentence listing the files uploaded, with the reused and skipped ones.{{ data.<step>.simulated }}—boolean.truewhen the step ran in a test run and the write was only described — the same field as on the Google and Outlook nodes. Alwaysfalsefor a read.
Example
Signed quotes come back by email as PDF and are filed into the folder of the client. A Create a OneDrive folder step named Client folder runs first. The node is named File quote:
source: attachment
selection: byName
namePattern: *.pdf
fileName: Signed quote {{ email.from.name }}.pdf
folder: (id mode) {{ data.client_folder.folder.id }}
onConflict: renameFor an email carrying a single PDF, the step data reads:
json
{
"files": [
{
"id": "01ABCDEF…",
"name": "Signed quote Jane Smith.pdf",
"mime": "application/pdf",
"size": 182044,
"webUrl": "https://contoso-my.sharepoint.com/personal/…/Signed%20quote%20Jane%20Smith.pdf",
"folderId": "01XYZ…"
}
],
"count": 1,
"reused": [],
"skipped": [],
"attachments": [
{ "position": 1, "filename": "quote-2026-031.pdf", "mime": "application/pdf", "size": 182044, "origin": "email" }
]
}Tips
- Name conflicts and replays. Keep both (
rename, the default) lets OneDrive number the new file (invoice 1.pdf). Do nothing (skip) returns the file already there without rewriting it and lists its name inskipped. Replace (replace) overwrites the content; OneDrive keeps the previous version in its history. A replay of the step never duplicates a file with Replace or Do nothing. With Keep both, the node marks each uploaded file so a replay finds it again (listed inreused); some business tenants refuse that mark, and on those a replay in Keep both mode can create a numbered copy. - File name. Extension included. Left empty with attachments, each file keeps its own name. Filled in, it only applies when exactly one attachment matches; with several, it is ignored and each keeps its name. With Some text, File name is required (
node_invalid_paramotherwise), and the file type follows its extension (.csv,.json,.md,.html,.xml,.txt; anything else is uploaded as plain text). - Limits. At most 20 attachments per step, and 100 MB per file. If no attachment matches the selection, the step fails with
node_nothing_to_do. - Destination folder. Left empty, the OneDrive root. Pick it from the list, type an item id, or paste a OneDrive URL: a
onedrive.live.comlink carrying?id=, or a OneDrive for Business folder URL (…-my.sharepoint.com/personal/…/Documents/Clients/Acmeor aonedrive.aspx?id=…page). A sharing link (…/:f:/…) cannot be resolved and fails withmicrosoft.rejected: use the list instead. - Test runs. In test runs nothing is uploaded: each entry of
filescarries the name it would have had, an id starting withsimulated:and an emptywebUrl. The run detail lists the upload under what would have happened. - Errors.
credential.capability_missing: OneDrive is not connected for the member running the workflow; connect it in Connections.microsoft.access_deniedormicrosoft.auth_failed: the access was revoked or refused; reconnect the account.microsoft.not_found: the folder no longer exists.microsoft.storage_full: the OneDrive is full (permanent).microsoft.locked(a file being edited by someone) andmicrosoft.unavailable(throttling, outage) are retried automatically. See Error handling.