---
title: Triggering options and State actions
description: "In the Document Processing module, actions are triggered by changes in workflow states. First, specify the workflow state, then define the corresponding state action. ## Workflow This is a workflow filter for states. Select from a list of workflows within…"
url: "https://extensionkit.unitfly.com/documentation/document-processing-triggering-and-state-actions/"
updated: "2026-09-28"
category: Configurations / Document Processing / Simple Rule Configuration
---

# Triggering options and State actions

In the Document Processing module, actions are triggered by changes in workflow states. First, specify the workflow state, then define the corresponding state action.

## Workflow

This is a workflow filter for states. Select from a list of workflows within a particular vault. The workflows are referenced by a GUID, ID or alias.

## Workflow state

Specify the workflow state in which selected action will be executed. Select from a list of available workflow states within a particular workflow. **NOTE!** If you have entered a workflow state, you must also specify the workflow above.

## State actions

The State Actions options allow you to configure various actions to modify documents when they enter a specific workflow state. You can set up multiple state actions within a single rule. For instance, you might configure a rule so that when a contract enters the state Active, the Draft watermark is removed and the contract is automatically converted to a PDF.

1. Expand **State actions**.
2. Click on **Add State action**.
3. Expand **State Action [1]**.

Within this section, you’ll find the following fields: **Name**, **Description**, **Enabled**, **Action**, and **Act as user**. After specifying the action, additional fields for configuration open up.

### Name

*State Actions > State Action [1] > Name*

Specifies unique action name, for example: *Remove watermark*.

### Description

*State Actions > State Action [1] > Description*

Optionally, specifies action description, for example: *When a document is approved and active, remove DRAFT watermark.*

### Enabled

*State Actions > State Action [1] > Enabled*

Determines whether the state action is active. This is especially useful when multiple state actions are configured within a single rule, allowing you to enable or disable specific actions as needed. Choose one of the following options:

- **Yes (default)**: The action is enabled and will be executed.
- **No**: The action is disabled and will not be executed.

### Action

*State Actions > State Action [1] > Action*

Specifies the type of action that will be executed when an object enters a defined workflow state. Depending on the selected action, additional fields for configuration are available. Select from the following options:

- **ConvertToPdf**: Convert documents from Word, Excel, or text formats to PDF. If this action is selected, the **Filename wildcard** needs to be specified.
- **UndoPdfConversion**: Revert the PDF conversion. If this action is selected, the **Filename wildcard** needs to be specified.
- **AddWatermark**: Create watermarks using pictures or text, imported from objects or local disks. If this action is selected, the **Filename wildcard** and **Remove any existing watermark** need to be specified, and the additional configuring options are available within the **[Watermarks](https://extensionkit.unitfly.com/documentation/document-processing-action-add-or-remove-watermark/#watermarks)** section.
- **RemoveWatermark**: If this action is selected, the **Filename wildcard** needs to be specified.
- **AddSignature**: Add and modify signatures. If this action is selected, the **Filename wildcard** and **Remove any existing signatures** need to be specified, and the additional configuring options are available within the **[Signatures](https://extensionkit.unitfly.com/documentation/document-processing-action-add-or-remove-signature/#signatures)** section.
- **RemoveSignature**: If this action is selected, the **Filename wildcard** needs to be specified.
- **MergeDocuments**: Merging two PDF files results in a single PDF file. Merging two Word files produces a single Word file. Merging a PDF file with a Word file results in a PDF file. If this action is selected, the **Filename wildcard** and **Merged file action** need to be specified, and the additional configuring options are available within the **[Merge files](https://extensionkit.unitfly.com/documentation/document-processing-action-merge-or-undo-merge-documents/#mergefiles)** section.
- **UndoMergeDocuments**: If this action is selected, the **Filename wildcard** needs to be specified.
- **RestoreOriginal**: If this action is selected, the **Filename wildcard** needs to be specified.
- **SyncFileNamesWithObjectTitle**: Synchronize file names with their object titles If this action is selected, the **Filename wildcard** needs to be specified.
- **AddBarcode**: If this action is selected, the **Filename wildcard** needs to be specified, and the additional configuring options are available within the **[Barcodes](https://extensionkit.unitfly.com/documentation/document-processing-action-add-or-read-barcode/#barcodes)** section.
- **ReadBarcode**: If this action is selected, the **Filename wildcard** needs to be specified, and the additional configuring options are available within the **[Barcodes](https://extensionkit.unitfly.com/documentation/document-processing-action-add-or-read-barcode/#barcodes)** section.
- **AddOrReplaceFile**: If this action is selected, the additional configuring options are available within the **[File](https://extensionkit.unitfly.com/documentation/document-processing-action-add-replace-or-remove-file/#file)** section.
- **RemoveFile**: If this action is selected, the additional configuring options are available within the **[File](https://extensionkit.unitfly.com/documentation/document-processing-action-add-replace-or-remove-file/#file)** section.
- **AddBlankPage**: If this action is selected, the additional configuring options are available within the **[BlankPage](https://extensionkit.unitfly.com/documentation/document-processing-action-add-replace-or-remove-file/#blankpage)** section.
- **ConvertToSearchablePdf**: If this action is selected, the additional configuring options are available within the [Conversion settings](https://extensionkit.unitfly.com/documentation/document-processing-action-convert-to-pdf-or-undo-pdf-conversion/#configuration-options-when-action-is-convert-to-searchable-pdf) section.
- **OpticalTextExtraction**: If this action is selected, the additional configuring options are available within the [OpticalTextExtraction](https://extensionkit.unitfly.com/documentation/document-processing-action-optical-text-extraction-2/#configuration-options-when-action-is-opticaltext-extraction)section.
- **RenameFile**: If this action is selected, the [additional configuring options](https://extensionkit.unitfly.com/documentation/document-processing-action-add-replace-or-remove-file/#configuration-options-when-action-is-renamefile) are available.

### Act as user

*State Actions > State Action [1] > Act as user*

Impersonate the user when executing an action. When expanded, the **Type** field is available.

### Type

*Act as user > Type*

Specifies impersonation type. Based on this setting, the following users are set as Last modified by after the rule is executed.

- **None:** M-Files Server.
- **LastModified:** The last user who modified this object before the rule was executed (it can also be M-Files Server).
- **LastActualUserModified:** The last real user account that made changes on this object.

### Configuration

*State Actions > State Action [1] > Configuration*

The Configuration section provides various options depending on the selected action. Descriptions of these options are organized by the corresponding action. For detailed configuration instructions for each action, please refer to their respective pages.
