CommCare connects to a Nagent workspace with an API key. Once it is connected, agents can call 6 CommCare actions, such as "Create Lookup Table", "Create Web User Invitation" and "List Reports". Nothing is enabled on connect: each action is allowed one at a time, and an action with side effects runs or waits for a person according to the agent's level.
Every operation an agent can call against CommCare, with input parameters and output schema.
COMMCARE_CREATE_LOOKUP_TABLETool to create a new lookup table in a CommCare domain. Use when you need to set up reference data structures like product catalogs, price lists, or configuration tables. Requires 'Edit Apps' permission.
Input parameters
The name/identifier of the lookup table. This is used to reference the table in applications.
The CommCare domain/project identifier where the lookup table will be created.
Array of field definitions for the lookup table. Each field must have a field_name and optional properties array.
Indicates whether the lookup table is accessible to all users in the domain. Defaults to false if not specified.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
COMMCARE_CREATE_WEB_USER_INVITATIONTool to create an invitation for a new web user in CommCare. Use when you need to invite a user with specific role and permissions. Requires 'Edit Web Users & Edit Access API' permissions.
Input parameters
Role designation for the user (e.g., 'App Editor', 'Admin')
Email address of the user to invite
CommCare domain name where the invitation will be created
Profile to assign to the user
Custom data fields associated with the user
Tableau role (Explorer, ExplorerCanPublish, SiteAdministratorExplorer, Viewer, Unlicensed)
List of Tableau groups for user assignment
Location ID for primary assignment (must be in assigned locations)
List of location IDs the web user will access
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
COMMCARE_LIST_REPORTSTool to retrieve available reports configured in a CommCare project. Use when you need to discover what reports exist before downloading report data via the Download Report Data API.
Input parameters
The CommCare project identifier. This is the project space name where reports are configured.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
COMMCARE_SINGLE_SIGN_ONTool to validate login credentials and retrieve user profile for a mobile worker or web user. Use when you need to authenticate a user and obtain their profile information including roles, permissions, locations, and configuration details.
Input parameters
The CommCare domain/project identifier where the user account exists.
The user's authentication password for login validation.
The user's login identifier (mobile worker or web user username).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
COMMCARE_SUBMIT_FORM_ODK_COMPATIBLETool to submit form data using ODK-compatible endpoint for Android client compatibility. Use when submitting XForm data to CommCare. Requires properly formatted XML with metadata including unique instanceID.
Input parameters
The CommCare project domain name where the form will be submitted.
Complete XForm XML data as a string. Must include root <data> element with xmlns, name, and version attributes. Must contain an n1:meta node with required fields: deviceID, timeStart (ISO 8601), timeEnd (ISO 8601), username, userID (UUID), and instanceID (UUID4, must be unique).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
COMMCARE_SUBMIT_FORM_TO_APPTool to submit an XForm to a specific CommCare application. Use when you need to submit form data and tag it with a specific application ID. The form is submitted as XML following the OpenRosa standard with required metadata fields.
Input parameters
The CommCare project domain/space where the form will be submitted.
Complete XForm XML content following OpenRosa standard. Must include root <data> element with xmlns, name, and version attributes. Must contain a <meta> section with required fields: deviceID, timeStart (ISO 8601 format), timeEnd (ISO 8601 format), username, userID, and instanceID (must be a unique UUID4 in format 'uuid:...' or just the UUID).
Application ID to tag the form submission with. This associates the submission with a specific CommCare application.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
Agents can call 6 CommCare actions on Nagent, including "Create Lookup Table", "Create Web User Invitation" and "List Reports". Create Lookup Table: Create a new lookup table in a CommCare domain. Each action is listed on this page with its input parameters and its output.
CommCare connects with an API key, under your workspace's own connection. Nothing is enabled on connect: each action is allowed one at a time and can be scoped to the agents that need it.
Create Lookup Table takes 3 required inputs: tag, domain and fields. It also takes 1 optional input: is_global. It returns data, error and successful.