Log Event
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Tokens
Adds an entry to the site's Admin Logs, with an event type you choose, a user ID and any properties you want to record. Administrators can see it under Logs > Event in the Plant an App configuration. Nothing is shown to the user, and the actions after it keep running.
Typical Use Cases
- Record an admin alert when something needs an administrator's attention, for example repeated failed attempts
- Keep a trail of important changes, such as a user's role being changed by a process
- Record who did what, with details, as name/value properties
Don't use it to
- Log errors. Use Log Error.
- Log tracing information while developing. Use Log Debug Message.
- Keep data you need to query or report on. Save it to your own table with Run SQL Query, since logs can be cleared.
Related Actions
| Action Name | Description |
|---|---|
| Log Error | Writes an error message to the logs. |
| Log Debug Message | Writes a message at Debug level. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Event Type | The type of the log entry: ADMIN_ALERT, HOST_SQL_EXECUTED, USER_CREATED, USER_UPDATED, USER_IMPERSONATED or USER_DELETED. With an expression, the value must be one of these names. | Yes | ADMIN_ALERT | No |
| User ID | The ID of the user the event is about, for example [User:UserID]. It must be a number. It's added to the entry as the UserID property. | Yes | empty string | No |
| Log Properties | Extra details for the entry, as rows of name and value. Tokens are replaced in both columns. | Yes | empty | No |
Considerations
- The event type is only a label. Choosing
USER_CREATED, for example, doesn't create a user. Pick the type that describes what happened, so administrators can filter the log. - The entry belongs to the current portal.
- Don't log secrets. Administrators can read the Admin Logs. Avoid passwords, API keys or personal data in the properties.
Examples
tip
To understand how to use the below examples, please see Running Examples.
1. Admin alert when access is denied
Add this action to a form's On Init actions, and give it a condition that checks whether the user may use the form. It records an admin alert with the user and the reason. Follow it with a message for the user.
{
"Title": "Log Event",
"ActionType": "LogEvent",
"Description": "Alert: user denied access",
"Parameters": {
"EventType": "ADMIN_ALERT",
"UserID": "[User:UserID]",
"LogProperties": [
{
"name": "Reason",
"value": "User tried to open the approvals form without the Managers role"
}
]
}
}
Revised 09/27/2026