(Script tags will be stripped)


You can use the `monday.execute` software development kit (SDK) method to invoke an action on the parent monday client.

# Parameters

ParameterDescription
typeWhich action to perform.
paramsThe 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

ParameterTypeDescriptionRequired
typeStringThe block type: `normal text`, `large title`, `medium title`, `small title`, `bulleted list`, `numbered list`, `quote`, `check list`, or `code`.Yes
afterBlockIdStringUsed 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
contentObjectThe 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

ParameterTypeDescriptionRequired
afterBlockIdStringUsed 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
blocksBlock\[]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
parentBlockIdStringThe 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

ParameterTypeDescriptionRequired
htmlHTML stringified elementThe 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

ParameterTypeDescriptionRequiredDefault Value
messageStringThe message to display in the dialog.Yes
confirmButtonStringThe confirmation button's text.No"OK"
cancelButtonStringThe cancel button's text.No"Cancel"
excludeCancelButtonBooleanEither to exclude the cancel button.Nofalse

#### **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

ParameterTypeDescriptionRequiredDefault Value
messageStringThe message to display.Yes
typeStringThe type of message to display. Can be "success" (green), "error" (red) or "info" (blue).No"info"
timeoutIntegerThe number of milliseconds to show the message.No5000

#### 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

ParameterTypeDescriptionRequiredDefault Value
urlStringThe URL of the page displayed in the modal.No
urlPathStringSubdirectory or path of the URL to open. Please ensure you pass a relative URL, not an absolute URL.No
urlParamsObjectQuery parameters for the URL.No
widthStringThe modal's width.No"0px"
heightStringThe 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

ParameterTypeDescriptionRequiredDefault Value
boardIdIntegerThe ID of the board.Yes
itemIdIntegerThe ID of the item that contains an asset.Yes
columnIdStringThe ID of the column that contains an asset.Yes
assetIdIntegerThe 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

ParameterTypeDescriptionRequiredDefault Value
itemIdIntegerThe ID of the item to open.Yes
kindStringThe 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

ParameterTypeDescriptionRequired
urlStringThe 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

ParameterTypeDescriptionRequired
textStringThe 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

ParameterTypeDescriptionRequiredDefault Value
boardIdIntegerThe ID of the board.Yes
itemIdIntegerThe ID of the item that contains an asset.Yes
columnIdStringThe 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

ParameterTypeDescriptionRequired
idStringThe block's unique identifier.Yes
contentJSONThe 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

ParameterTypeDescriptionRequired
suggestedRephraseStringThe 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! 😎