You can use the `monday.execute
` software development kit (SDK) method to invoke an action on the parent monday client.
# Parameters
Parameter | Description |
type | Which action to perform. |
params | The optional parameters for the action. |
# Actions
## `addDocBlock
`
The `addDocBlock
` method adds a new block to a workdoc. Check out our <a href="https://developer.monday.com/api-reference/docs/blocks" target="_blank">API documentation</a> to learn more about document blocks.
### Parameters
Parameter | Type | Description | Required |
type | String | The block type: `normal text `, `large title `, `medium title `, `small title `, `bulleted list `, `numbered list `, `quote `, `check list `, or `code `. | Yes |
afterBlockId | String | Used to specify where in the doc the new block should go. Provide the block's ID that will be above the new block. Without this parameter, the new block will appear at the top of the doc. | No |
content | Object | The block's content in <a href="https://quilljs.com/docs/delta/" target="_blank" rel="_nofollow">Delta format</a>. | Yes |
Each block's content is defined by a content JSON object containing multiple attributes, one of which is `deltaFormat
`. Creating new blocks requires familiarity with the Delta format. We recommend using Quill's <a href="https://github.com/quilljs/delta/" target="_blank" rel="_nofollow">Delta library</a> to format your content.
#### **Example**
## `addMultiBlocks
`
The `addMultiBlocks
` method adds multiple blocks to a workdoc. Check out our <a href="https://developer.monday.com/api-reference/docs/blocks" target="_blank">API documentation</a> to learn more about document blocks.
### Parameters
Parameter | Type | Description | Required |
afterBlockId | String | Used to specify where in the doc the new block should go. Provide the block's ID that will be above the new block. Without this parameter, the new block will appear at the top of the doc. | No |
blocks | Block\[] | The block's content in <a href="https://quilljs.com/docs/delta/" target="_blank" rel="_nofollow">Delta format</a>. We support the following block types: `normal text `, `large title `, `medium title `, `small title `, `bulleted list `, `numbered list `, `quote `, `check list `, or `code `. | Yes |
parentBlockId | String | The parent block's unique identifier. Please note that you currently can only use this to add a block to a table. | No |
Each block's content is defined by a content JSON object containing multiple attributes, one of which is `deltaFormat
`. Creating updating blocks requires familiarity with the Delta format. We recommend using Quill's <a href="https://github.com/quilljs/delta/" target="_blank" rel="_nofollow">Delta library</a> to format your content.
#### **Example**
## `addMultiBlocksFromHtml
`
The `addMultiBlocksFromHtml
` method adds multiple blocks to the beginning of a workdoc using HTML. It is only available for the <a href="https://developer.monday.com/apps/docs/ai-assistant#doc-quickstart-ai-assistant" target="_blank">doc quickstart AI feature</a>.
### Parameters
Parameter | Type | Description | Required |
html | HTML stringified element | The HTML elements to add to the blocks. | Yes |
#### **Example**
## `closeAppFeatureModal
`
The `closeAppFeatureModal
` method closes the modal window.
### Parameters
This method does not have any parameters.
#### **Example**
## `closeDialog
`
The `closeDialog
` method closes the AI assistant's dialog.
### Parameters
This method does not have any parameters.
#### **Example**
## `closeDocModal
`
The `closeDocModal
` method closes the document block modal. The modal will close when the user clicks outside of it if you don't call this method.
### Parameters
This method does not have any parameters.
#### **Example**
## `closeSettings
`
The `closeSettings
` method closes a view settings window.
### Parameters
This method does not have any parameters.
#### **Example**
## `confirm
`
The `confirm
` method opens a confirmation dialog for the user.
### Parameters
Parameter | Type | Description | Required | Default Value |
message | String | The message to display in the dialog. | Yes | |
confirmButton | String | The confirmation button's text. | No | "OK" |
cancelButton | String | The cancel button's text. | No | "Cancel" |
excludeCancelButton | Boolean | Either to exclude the cancel button. | No | false |
#### **Example**
Here's what the confirmation dialog will look like:

## `moveToNextSelectedTextualBlock
`
The `moveToNextSelectedTextualBlock
` method opens the app on the next block when multiple are selected. This is only available after calling the <a href="https://developer.monday.com/apps/docs/mondayexecute#open-app-on-the-selected-block" target="_blank">`openAppOnFirstTextualBlock
`</a> function and is only used on the <a href="https://developer.monday.com/apps/docs/ai-assistant#doc-command-ai-assistant" target="_blank">doc command AI feature</a>.
### Parameters
This method does not have any parameters.
#### **Example**
## `moveToPrevSelectedTextualBlock
`
The `moveToPrevSelectedTextualBlock
` method opens the app on the previous block when multiple are selected. This is only available after calling the <a href="https://developer.monday.com/apps/docs/mondayexecute#open-app-on-the-selected-block" target="_blank">`openAppOnFirstTextualBlock
`</a> function and is only used on the <a href="https://developer.monday.com/apps/docs/ai-assistant#doc-command-ai-assistant" target="_blank">doc command AI feature</a>.
### Parameters
This method does not have any parameters.
#### **Example**
## `notice
`
The `notice
` method displays a message at the top of the user's page. It is very useful for success, error, and general messages.
### Parameters
Parameter | Type | Description | Required | Default Value |
message | String | The message to display. | Yes | |
type | String | The type of message to display. Can be "success" (green), "error" (red) or "info" (blue). | No | "info" |
timeout | Integer | The number of milliseconds to show the message. | No | 5000 |
#### Example
This is what the success message will look like:

## `openAppFeatureModal
`
The `openAppFeatureModal
` method opens a modal window as an iFrame that points to a site of your choice. The modal can render a page in your app by passing a `urlPath
` or `urlParams
` argument. It can also show an external site with the `url
` argument (like a documentation page on your website).
### Parameters
Parameter | Type | Description | Required | Default Value |
url | String | The URL of the page displayed in the modal. | No | |
urlPath | String | Subdirectory or path of the URL to open. Please ensure you pass a relative URL, not an absolute URL. | No | |
urlParams | Object | Query parameters for the URL. | No | |
width | String | The modal's width. | No | "0px" |
height | String | The modal's height. | No | "0px" |
#### **Example**
Opening and closing a modal will look like this:

## `openAppOnFirstTextualSelectedBlock
`
The `openAppOnFirstTextualSelectedBlock
` method opens the app modal on the first selected block when multiple are open. It is only available on the <a href="https://developer.monday.com/apps/docs/ai-assistant#doc-toolbar-ai-assistant" target="_blank">doc toolbar AI feature</a>.
### Parameters
This method does not have any parameters.
#### **Example**
## `openFilesDialog
`
The `openFilesDialog
` method opens a modal with the preview of an asset.
### Parameters
Parameter | Type | Description | Required | Default Value |
boardId | Integer | The ID of the board. | Yes | |
itemId | Integer | The ID of the item that contains an asset. | Yes | |
columnId | String | The ID of the column that contains an asset. | Yes | |
assetId | Integer | The ID of the asset to open. | Yes | |
#### **Example**
Opening the file preview dialog will look like this:
## `openItemCard
`
The `openItemCard
` method opens a modal with information from the selected item.
### Parameters
Parameter | Type | Description | Required | Default Value |
itemId | Integer | The ID of the item to open. | Yes | |
kind | String | The view on which to open the item card - can be "updates" / "columns". | No | "columns" |
#### **Example**
Here's what the open item card will look like:

## `openLinkInTab
`
The `openLinkInTab
` method opens a link in a new tab for views (board views, item views, etc.).
### Parameters
Parameter | Type | Description | Required |
url | String | The URL you wish to open in a new tab. | Yes |
#### Example
## `openSettings
`
The `openSettings
` method opens a view settings window.
### Parameters
This method does not have any parameters.
#### **Example**
This is what opening and closing settings looks like:

## `replaceHighlightText
`
The `replaceHighlightText
` method replaces the highlighted text with text of your choosing at the beginning of the block. It is only available for the <a href="https://developer.monday.com/apps/docs/ai-assistant#doc-command-ai-assistant" target="_blank">doc command AI feature</a>.
### Parameters
Parameter | Type | Description | Required |
text | String | The text to insert in the block. | Yes |
#### **Example**
## `triggerFilesUpload
`
The `triggerFilesUpload
` method opens a modal to let the current user upload a file to a specific file column. It returns a promise, and the promise is rejected in case of an error.
**Required scope: `boards:write
`**
After the file is successfully uploaded, the `change_column_value
` event will be triggered. Check out how to subscribe to these events \<a href="<https://developer.monday.com/apps/docs/mondaylisten#subscribe-to-interaction-based-events-on-the-board>" target="\_blank>here</a>!
### Parameters
Parameter | Type | Description | Required | Default Value |
boardId | Integer | The ID of the board. | Yes | |
itemId | Integer | The ID of the item that contains an asset. | Yes | |
columnId | String | The ID of the file column to upload the file to. | Yes | |
#### **Example**
Triggering the file upload process will look like this:

## `updateDocBlock
`
The `updateDocBlock
` method updates a block's content. Check out our <a href="https://developer.monday.com/api-reference/docs/blocks" target="_blank">API documentation</a> to learn more about document blocks.
### Parameters
Parameter | Type | Description | Required |
id | String | The block's unique identifier. | Yes |
content | JSON | The block's content you want to update in <a href="https://quilljs.com/docs/delta/" target="_blank" rel="_nofollow">Delta format</a>. | Yes |
Each block's content is defined by a content JSON object containing multiple attributes, one of which is `deltaFormat
`. Creating updating blocks requires familiarity with the Delta format. We recommend using Quill's <a href="https://github.com/quilljs/delta/" target="_blank" rel="_nofollow">Delta library</a> to format your content.
#### **Example**
## `updatePostContentAction
`
The `updatePostContentAction
` method creates or changes the content of an item's update. It is only available for the <a href="https://developer.monday.com/apps/docs/ai-assistant#doc-header-ai-assistant" target="_blank">update AI feature</a>.
### Parameters
Parameter | Type | Description | Required |
suggestedRephrase | String | The content to add to the update. | Yes |
#### **Example**
## `valueCreatedForUser
`
The `valueCreatedForUser
` method notifies the monday platform that a user gained a first value in an app. You can find more information about this method in our <a href="https://developer.monday.com/apps/docs/value-created-event-best-practices" target="_blank">documentation</a>.
### Parameters
This method does not have any parameters.
#### **Example**
Join our developer community!
We've created a <a href="https://community.monday.com/c/developers/8" target="_blank"> community</a> specifically for our devs where you can search through previous topics to find solutions, ask new questions, hear about new features and updates, and learn tips and tricks from other devs. Come join in on the fun! 😎