Microsoft Word

App · 16 actions

Create Word documents, and find, organize, share and restore the documents in a OneDrive for Business. It can't change the text of a document that already exists.

Actions

ActionWhat it does
Convert document to PDFMake a PDF of a document that later steps can use: an email can attach it, or OneDrive's Upload file can save it.
Create documentCreate a new Word document, with some starting text if you like.
Create sharing linkCreate a link that lets people view or edit a document: anyone in your organization, or anyone who has the link.
Delete documentDelete a document.
Duplicate documentMake a copy of a document under a new name, in the same folder or another one.
Get documentGet a document's details: its name, size and link.
Get document textRead the words in a .docx document, one paragraph to a line, for later steps such as an AI step or an email.
Get document versionGet the details of one saved version of a document: when it was saved and by whom.
List document permissionsList who can open a document, and its sharing links.
List document versionsList the saved versions of a document, newest first.
List documentsList the documents and folders at the top level of the OneDrive.
Move documentMove a document to another folder, renaming it on the way if you like.
Remove document permissionTake away a person's access to a document, or turn off one of its sharing links.
Rename documentGive a document a new name.
Restore document versionBring a document back to one of its earlier saved versions.
Search documentsFind documents whose name or text matches your search words.

Convert document to PDF

Make a PDF of a document that later steps can use: an email can attach it, or OneDrive's Upload file can save it. The document is left as it is. Documents of up to 2 MB, Microsoft's limit for converting.

Inputs

Documentdocument_idtextRequired
The document's ID, from an earlier step such as List documents, Search documents or Create document.

Outputs

dataobject
Microsoft Word response data.
Example output
{
  "data": {
    "document_ref": "example",
    "file_name": "example"
  }
}

Create document

Create a new Word document, with some starting text if you like. It won't replace a document that already has the same name.

Inputs

File namefilenametextRequired
The new document's name, ending in .docx, for example Minutes.docx.
Starting texttexttext
Text to put in the new document. Each line becomes a paragraph. Leave blank for an empty document.

Outputs

dataobject
Microsoft Word response data.
Example output
{
  "data": {
    "eTag": "example",
    "file": {},
    "folder": {},
    "id": "example",
    "name": "example",
    "size": 1,
    "webUrl": "example"
  }
}

Create a link that lets people view or edit a document: anyone in your organization, or anyone who has the link.

Inputs

Documentdocument_idtextRequired
The document's ID, from an earlier step such as List documents, Search documents or Create document.
Lets peopletypetextRequired
Whether people with the link can only read the document, or change it too.One of: view (View only), edit (Can edit).
Who can use itscopetextRequired
Who the link works for: people signed in to your organization, or anyone who has it.One of: organization (Anyone in your organization), anonymous (Anyone with the link).
Expiresexpiration_date_timedate and time
When the link stops working. Leave blank for a link that doesn't expire.

Outputs

dataobject
Microsoft Word response data.
Example output
{
  "data": {}
}

Delete document

Delete a document. It goes to the OneDrive's recycle bin, where it can be restored for a while.

Inputs

Documentdocument_idtextRequired
The document's ID, from an earlier step such as List documents, Search documents or Create document.

Outputs

dataobject
Microsoft Word response data.
Example output
{
  "data": {}
}

Duplicate document

Make a copy of a document under a new name, in the same folder or another one. The copy is made in the background, so it can take a moment to appear.

Inputs

Documentdocument_idtextRequired
The document's ID, from an earlier step such as List documents, Search documents or Create document.
Name of the copynametextRequired
The copy's name, ending in .docx.
Destination folderparent_referenceobject
The folder to put the copy in, as its id (and driveId for another drive). Leave blank to keep it beside the original.

Outputs

dataobject
Microsoft Word response data.
Example output
{
  "data": {
    "accepted": false,
    "monitor_url": "example"
  }
}

Get document

Get a document's details: its name, size and link.

Inputs

Documentdocument_idtextRequired
The document's ID, from an earlier step such as List documents, Search documents or Create document.

Outputs

dataobject
Microsoft Word response data.
Example output
{
  "data": {
    "eTag": "example",
    "file": {},
    "folder": {},
    "id": "example",
    "name": "example",
    "size": 1,
    "webUrl": "example"
  }
}

Get document text

Read the words in a .docx document, one paragraph to a line, for later steps such as an AI step or an email. The document isn't changed.

Inputs

Documentdocument_idtextRequired
The document's ID, from an earlier step such as List documents, Search documents or Create document.

Outputs

dataobject
Microsoft Word response data.
Example output
{
  "data": {
    "id": "example",
    "name": "example",
    "text": "example",
    "truncated": false
  }
}

Get document version

Get the details of one saved version of a document: when it was saved and by whom.

Inputs

Documentdocument_idtextRequired
The document's ID, from an earlier step such as List documents, Search documents or Create document.
Version IDversion_idtextRequired
The version's ID, from an earlier List document versions step.

Outputs

dataobject
Microsoft Word response data.
Example output
{
  "data": {}
}

List document permissions

List who can open a document, and its sharing links.

Inputs

Documentdocument_idtextRequired
The document's ID, from an earlier step such as List documents, Search documents or Create document.

Outputs

dataobject
Microsoft Word response data.
Example output
{
  "data": {
    "value": []
  }
}

List document versions

List the saved versions of a document, newest first.

Inputs

Documentdocument_idtextRequired
The document's ID, from an earlier step such as List documents, Search documents or Create document.

Outputs

dataobject
Microsoft Word response data.
Example output
{
  "data": {
    "value": []
  }
}

List documents

List the documents and folders at the top level of the OneDrive.

Inputs

Number of resultstopnumber
How many to return at most, up to 200.From 1 to 200.
Next pageskiptokentext
Leave blank for the first page. To get the next one, use the page token from an earlier List documents step.

Outputs

dataobject
Microsoft Word response data.
Example output
{
  "data": {
    "value": []
  }
}

Move document

Move a document to another folder, renaming it on the way if you like.

Inputs

Documentdocument_idtextRequired
The document's ID, from an earlier step such as List documents, Search documents or Create document.
Destination folder IDparent_reference_idtextRequired
The ID of the folder to move the document into.
New namenametext
A new name for the document once it's moved. Leave blank to keep its name.

Outputs

dataobject
Microsoft Word response data.
Example output
{
  "data": {
    "eTag": "example",
    "file": {},
    "folder": {},
    "id": "example",
    "name": "example",
    "size": 1,
    "webUrl": "example"
  }
}

Remove document permission

Take away a person's access to a document, or turn off one of its sharing links.

Inputs

Documentdocument_idtextRequired
The document's ID, from an earlier step such as List documents, Search documents or Create document.
Permission IDpermission_idtextRequired
The permission's ID, from an earlier List document permissions step.

Outputs

dataobject
Microsoft Word response data.
Example output
{
  "data": {}
}

Rename document

Give a document a new name.

Inputs

Documentdocument_idtextRequired
The document's ID, from an earlier step such as List documents, Search documents or Create document.
New namenametextRequired
The document's new name, ending in .docx.

Outputs

dataobject
Microsoft Word response data.
Example output
{
  "data": {
    "eTag": "example",
    "file": {},
    "folder": {},
    "id": "example",
    "name": "example",
    "size": 1,
    "webUrl": "example"
  }
}

Restore document version

Bring a document back to one of its earlier saved versions.

Inputs

Documentdocument_idtextRequired
The document's ID, from an earlier step such as List documents, Search documents or Create document.
Version IDversion_idtextRequired
The version's ID, from an earlier List document versions step.

Outputs

dataobject
Microsoft Word response data.
Example output
{
  "data": {}
}

Search documents

Find documents whose name or text matches your search words.

Inputs

Search forquerytextRequired
Words to look for in documents' names and text.

Outputs

dataobject
Microsoft Word response data.
Example output
{
  "data": {
    "value": []
  }
}

On this page