Built-in Actions

View as Markdown

Using Built-in Actions

Moveworks provides built-in actions for common platform operations — user lookups, notifications, approvals, and LLM generation. These are ready to use without creating connectors or HTTP actions.

When you want to use a built-in action in your Compound Action, use mw.{{action_name}} as your action_name. For example:

- action:
action_name: mw.get_user_by_email
output_key: user_result
input_args:
user_email: meta_info.user.email_addr

Action Reference

get_user_by_email

Retrieve a single user record by email address. Returns all user attributes including custom attributes.

Action Name: mw.get_user_by_email

Input Parameters:

ParameterTypeRequiredDescription
user_emailstringYesThe email address of the user to retrieve

Example:

- action:
output_key: user_result
action_name: mw.get_user_by_email
input_args:
user_email: meta_info.user.email_addr

Response Schema:

{
"user": {
"full_name": "John Doe",
"email_addr": "john.doe@moveworks.ai",
"record_id": "10769610738892443",
"department": "Engineering",
...
}
}

Reference: data.user_result.user.email_addr, data.user_result.user.full_name, etc.

You can find the full list of user fields in our User Attribute Reference.


batch_get_users_by_email

Retrieve multiple users by email in a single call. Use this when you need to resolve several users (e.g., an approver and a requester).

Action Name: mw.batch_get_users_by_email

Input Parameters:

ParameterTypeRequiredDescription
user_emailsList[string]YesThe email addresses of the users to retrieve

Results are returned in the same order as the input email list. If you pass ["manager@example.com", "employee@example.com"], then user_records[0] is the manager and user_records[1] (or user_records[-1]) is the employee.

Example:

- action:
output_key: target_users
action_name: mw.batch_get_users_by_email
input_args:
user_emails:
- data.manager_email
- data.employee_email

Response Schema:

{
"user_records": [
{
"lookup_id": "12345",
"user": {
"full_name": "John Doe",
"email_addr": "john.doe@moveworks.ai",
"record_id": "10769610738892443",
...
}
},
{
"lookup_id": "67890",
"user": {
"full_name": "Jane Smith",
"email_addr": "jane.smith@moveworks.ai",
"record_id": "10769610738892444",
...
}
}
]
}

Reference: data.target_users.user_records[0].user for the first user, data.target_users.user_records[-1].user for the last.

You can find the full list of user fields in our User Attribute Reference.


create_generic_approval_request

Create a Moveworks in-bot approval request. The compound action pauses execution until the approval is answered (up to 30 days).

Action Name: mw.create_generic_approval_request

Input Parameters:

ParameterTypeRequiredDescription
approval_detailsstringYesThe details that need approval
users_requested_forList[User]YesUsers who the approval is being requested for
approversList[User]NoUsers from whom to get approval. Reaches out to all; only one approval needed. Overrides approval_key if provided.
approval_keystringNoThe approval key describing the workflow. If omitted, must provide approvers. Supported Keys
titlestringNoTitle of the approval request
Pass User objects, not emails.

approvers and users_requested_for require User objects, not email strings. Retrieve user objects first using mw.get_user_by_email or mw.batch_get_users_by_email.

Example:

- action:
output_key: approval_result
action_name: mw.create_generic_approval_request
input_args:
title: '''Access to Coupa Request'''
approval_details: '''Need access to Coupa for procurement workflow'''
approvers:
- data.manager_user.user
users_requested_for:
- data.requesting_user.user
progress_updates:
on_pending: Sending approval request...
on_complete: Approval received.

Response Schema (Approved):

{
"status": "APPROVED",
"approved_by": [
{
"full_name": "John Doe",
"record_id": "10769610738892443",
"email_addr": "john@moveworks.ai",
"comment": "Looks good, approved."
}
],
"state": {
"initial_status": "PROCESSING",
"status": {
"john@moveworks.ai": "APPROVED"
}
}
}

Response Schema (Denied):

{
"status": "DENIED",
"denied_by": [
{
"full_name": "John Doe",
"record_id": "10769610738892443",
"email_addr": "john@moveworks.ai",
"comment": "Budget not available for Q2."
}
],
"state": {
"initial_status": "PROCESSING",
"status": {
"john@moveworks.ai": "DENIED"
}
}
}

Reference: data.approval_result.status returns "APPROVED" or "DENIED" (uppercase).

To access the approver/denier’s comment (e.g., a denial justification):

# Access the denial comment
message: data.approval_result.denied_by[0].comment
# Access an approval comment
message: data.approval_result.approved_by[0].comment

To enable a Deny with Comment button on the approval card, configure the approval buttons in Moveworks Setup > Approval Settings. This can be set at the integration level or global level.


batch_send_plaintext_chat_notification

Send a chat notification to one or more users. Use with batch_get_users_by_email to resolve user record IDs first.

Action Name: mw.batch_send_plaintext_chat_notification

Input Parameters:

ParameterTypeRequiredDescription
notificationsList[object]YesArray of notification objects, each containing user_record_id (string) and message (string)

Example:

- action:
output_key: target_users
action_name: mw.batch_get_users_by_email
input_args:
user_emails:
- '''alice@example.com'''
- '''bob@example.com'''
- action:
action_name: mw.batch_send_plaintext_chat_notification
output_key: notification_result
input_args:
notifications:
MAP():
items: data.target_users.user_records
converter:
user_record_id: item.user.record_id
message: '''Please complete your quarterly review.'''

Response Schema:

{
"user_notification_tracker_details": [
{
"notification_tracker_uuid": "abc-123-def"
}
]
}

For sending interactive notifications with action buttons, use the notify compound action expression instead.


generate_text_action

Generate free-form text output using an LLM. Use for summarization, classification, formatting, and other text generation tasks.

Action Name: mw.generate_text_action

Input Parameters:

ParameterTypeRequiredDescription
user_inputstringYesThe input text for the LLM to process
system_promptstringNoInstructions for how the LLM should behave
modelstringNoModel to use (default: gpt-5.4-mini)
temperaturenumberNoSampling temperature (0-2)
imageList[File] or FileNoOptional image input(s) for multimodal processing. We recommend gpt-5 or newer
fileList[File] or FileNoOptional document input(s) — PDF, spreadsheets, rich documents, presentations, and text/code. We recommend gpt-5 or newer
reasoning_effortstringNo"minimal" (gpt-5 only), "low", "medium", or "high" (reasoning models only)
enable_web_searchbooleanNoEnable the live web search tool to include current web information in the model’s context
web_search_allowed_domainsList[str]NoRestrict web search to these domains (up to 100). Enables web search automatically
web_search_blocked_domainsList[str]NoExclude these domains from web search (up to 100). Enables web search automatically

Example:

- action:
action_name: mw.generate_text_action
output_key: summary_result
input_args:
system_prompt: '''Summarize the following text in 2-3 sentences.'''
user_input: data.article_content
model: '''gpt-5.4-mini'''

Response: data.summary_result.generated_output (string)

For full reference including supported models, see LLM Actions.


generate_structured_value_action

Generate structured JSON output matching a defined schema. Use for classification, entity extraction, and any task where you need typed output.

Action Name: mw.generate_structured_value_action

Input Parameters:

ParameterTypeRequiredDescription
payloadobjectYesThe input data for the LLM to process
output_schemastringYesJSON Schema defining the expected output structure. Must include additionalProperties: false on all objects.
system_promptstringNoInstructions for how the LLM should behave
modelstringNoModel to use (default: gpt-5.4-mini)
strictstringNoEnforce strict schema adherence. Defaults to false
imageList[File] or FileNoOptional image input(s) for multimodal processing. We recommend gpt-5 or newer
fileList[File] or FileNoOptional document input(s) — PDF, spreadsheets, rich documents, presentations, and text/code. We recommend gpt-5 or newer
reasoning_effortstringNo"minimal" (gpt-5 only), "low", "medium", or "high" (reasoning models only)
enable_web_searchbooleanNoEnable the live web search tool to include current web information in the model’s context
web_search_allowed_domainsList[str]NoRestrict web search to these domains (up to 100). Enables web search automatically
web_search_blocked_domainsList[str]NoExclude these domains from web search (up to 100). Enables web search automatically

Example:

- action:
action_name: mw.generate_structured_value_action
output_key: classification_result
input_args:
payload: data.customer_review
system_prompt: '''Analyze the sentiment of this review.'''
output_schema: >-
{
"type": "object",
"properties": {
"sentiment": {"type": "string", "enum": ["positive", "negative", "neutral"]},
"confidence": {"type": "number"}
},
"required": ["sentiment", "confidence"],
"additionalProperties": false
}

Response: data.classification_result.generated_output (object matching your schema)

For full reference including supported models, see LLM Actions.