Built-in Actions
Using Built-in Actions
Moveworks provides a wide range of built-in actions to help you built AI agents quickly.
When you want to use a built-in action in your Compound Action, you can use mw.{{action_name}}
as your action.action_name
. For example, if you want to use the create_generic_approval_request
native action, you would use mw.create_generic_approval_request
.
Action Reference
create_generic_approval_request
create_generic_approval_request
Create a Moveworks in-bot approval request.
Action Name: mw.create_generic_approval_request
Input Parameters:
- approval_key (string): The approval key which describes the approval workflow. Currently Supported Keys (Required)
- approval_details (string): The details that need approval. (Required)
- users_requested_for (List[User]): Users who we are requesting approval for. (Required)
Request Schema:
{
"approval_key": "string",
"approval_details": "string",
"users_requested_for": "List[User]"
}
generate_structured_value_action
generate_structured_value_action
Call an LLM and have it produce a structured output.
Action Name: mw.generate_structured_value_action
Input Parameters:
- payload (object): Payload to analyze when producing outputs. (Required)
- output_schema (object): Output schema in JSON Schema format with type
object
, e.g.{"type": "object", "properties": {"name": {"type": "string"}}}}
). For more information please check the OpenAI API docs (Required) - system_prompt (string): Instructions for the model on how to extract the value. If omitted, will use the default prompt (should be sufficient for most cases). (Optional)
- strict (boolean): Whether to turn on Structured Outputs to have the model enforce strict adherence to the schema. Default false. If set to true, you will receive an error unless you also set "additional_properties" to false in output_schema and make all fields required (Optional)
- output_schema_name (string): LLM-facing name for the schema. Defaults to "extracted_value". (Optional)
- output_schema_description (string): LLM-facing description for the schema. (Optional)
Request Schema:
{
"payload": "object",
"output_schema": "object",
"system_prompt": "string",
"strict": "boolean",
"output_schema_name": "string",
"output_schema_description": "string"
}
Result Schema:
{
"openai_chat_completions_response": {
"choices": [
{
"message": {
"content": "This is an example of structured content produced by the LLM."
}
}
]
}
}
generate_text_action
generate_text_action
Call an LLM and have it produce some standard text.
Action Name: mw.generate_text_action
Input Parameters:
- system_prompt (string): Optional message to set the model behavior. (Optional)
- user_input (string): Context from the user which should be used in this specific generation. (Required)
Request Schema:
{
"system_prompt": "string",
"user_input": "string",
}
Result Schema:
{
"openai_chat_completions_response": {
"choices": [
{
"message": {
"content": "This is an example of structured content produced by the LLM."
}
}
]
}
}
send_plaintext_chat_notification
send_plaintext_chat_notification
Sends a chat notification to a user.
Action Name: mw.send_plaintext_chat_notification
Input Parameters:
- user_record_id (string): The record ID of the user to notify. To retrieve user record IDs you need to use the Get User by Email or Look up multiple users by email native actions (Required)
- message (string): The message to send. (Required)
Request Schema:
{
"user_record_id": "string",
"message": "string"
}
summarize_text_action
summarize_text_action
Summarize a given text.
Action Name: mw.summarize_text_action
Input Parameters:
- text_to_summarize (string): The text to summarize. (Required)
Request Schema:
{
"text_to_summarize": "string"
}
Result Schema:
{
"openai_chat_completions_response": {
"choices": [
{
"message": {
"content": "This is a summarized version of the text provided for summarization."
}
}
]
}
}
batch_get_users_by_email
batch_get_users_by_email
Retrieves multiple users by email against Moveworks' Internal Identity store.
Action Name: mw.batch_get_users_by_email
Input Parameters:
- user_emails (List[string]): The email addresses of the users to retrieve.
Request Schema:
{
"user_emails": "List[string]",
}
Result Schema:
{
"user_records": [
{
"lookup_id": "12345",
"user": {
"full_name": "John Doe",
"email_addr": "[email protected]",
...
}
},
{
"lookup_id": "67890",
"user": {
"full_name": "Jane Smith",
"email_addr": "[email protected]",
...
}
}
]
}
You can find the full list of user fields in our Moveworks Data Object page.
get_user_by_email
get_user_by_email
Retrieve a user record according to their email address.
Action Name: mw.get_user_by_email
Input Parameters:
- user_email (string): The email address of the user to retrieve.
Request Schema
{
"user_email": "string"
}
Result Schema
{
"user": {
"full_name": "John Doe",
"email_addr": "[email protected]",
...
}
}
You can find the full list of user fields in our Moveworks Data Object page.
Updated 3 days ago