Skip to main content
Actions can return different types of results to provide feedback to users. Use the result builder to control what happens after an action executes.

Default behavior

If you don’t return anything and no exception is thrown, Forest displays a generic success notification.
Default success notification

Success notification

Display a custom success message.
Custom success notification

Error notification

Display an error message when something goes wrong.
Custom error notification
Always handle errors gracefully and return meaningful error messages to help users understand what went wrong.

HTML result

Return rich formatted content displayed in a side panel. Perfect for showing detailed operation results.
HTML success result in a side panel

HTML with error

You can also return HTML content with an error:

File download

Generate and download files (PDFs, CSVs, Excel, etc.).
Actions that generate files must set generateFile: true in their configuration. This flag prevents using other result types (notifications, HTML) in the same action.

Common MIME types

Example: Generate CSV

Example: Generate PDF

Redirect

Redirect users to another page after the action executes. Works for both internal Forest pages and external URLs.

Internal redirect

Redirect to another page within Forest:

External redirect

Redirect to an external URL:

Example: Redirect to created record

Webhook

Trigger an HTTP callback from the user’s browser. Useful for logging into third-party applications or triggering operations on the user’s behalf.
Webhooks are triggered from the user’s browser and are subject to CORS restrictions. Make sure the target server accepts requests from Forest domains.

Example: Single sign-on

Example: Trigger background job

Combining results with operations

Success with HTML details

Conditional redirect