> ## Documentation Index
> Fetch the complete documentation index at: https://comfyreel.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom actions

> Turn any ComfyUI workflow into an action of your own, with its own inputs, settings and outputs.

A custom action wraps one of your ComfyUI workflows with a name, the inputs it takes, the settings you want to change on the canvas and the outputs it gives back. ComfyReel then offers it where it fits: in a node's model list, in a node's toolbar, or as a **Custom** node you add to the canvas. The agent can list, run and create actions too.

Custom actions sit next to [custom workflows](https://comfyreel.org/guides/custom-workflows.md): a custom workflow takes the place of the workflow behind a built-in feature, a custom action is a new feature of its own.

## Example: a film look in the toolbar

This example turns the film simulation of the [Spektrafilm](https://github.com/jtydhr88/ComfyUI-Spektrafilm) node pack into a toolbar action for picture nodes: pick a film stock and a print paper, and the picture comes back as a film print. Install the node pack in ComfyUI first.

### 1. Export the workflow from ComfyUI

Open `example_workflows/photo_film_look.json` from the node pack in ComfyUI (**File → Open**). It loads a picture, simulates the film and shows the print in a preview node. Choose **File → Export (API)** in the ComfyUI menu and save the file.

![The film look workflow in ComfyUI with the menu open at File, Export (API)](https://mintcdn.com/comfyreel/d8xVTlBYWP7ahhU2/images/custom-actions-export-api.webp?fit=max\&auto=format\&n=d8xVTlBYWP7ahhU2\&q=85\&s=71abee4ad4ea3e656029e4b6e44a78f1)

### 2. Create the action

In ComfyReel open the logo menu at the top left, pick **Custom actions…**, then **New action**, and choose the exported file. The Load Image is already ticked as a required input and the preview node as the output.

1. Name it **Film look** and describe it in one sentence.
2. Rename the image input to **Photo**.
3. Under **Spektrafilm Film Simulation**, tick `film_stock`, `print_paper` and `exposure_compensation_ev`, and rename them to **Film stock**, **Print paper** and **Exposure**.

![Action dialog: name, description, the Photo input marked Required and the three settings](https://mintcdn.com/comfyreel/T7jGFS5qWIRwbYQX/images/custom-actions-inputs.webp?fit=max\&auto=format\&n=T7jGFS5qWIRwbYQX\&q=85\&s=19f64bdde94c24f609cb583e00cc2e53)

4. Scroll down, name the output **Film print** and click **Save**.

![The ticked film settings and the Spektrafilm Preview output named Film print](https://mintcdn.com/comfyreel/d8xVTlBYWP7ahhU2/images/custom-actions-outputs.webp?fit=max\&auto=format\&n=d8xVTlBYWP7ahhU2\&q=85\&s=9abd0c355b455e6fec988011c466f27f)

### 3. Run it from the toolbar

The action has one required picture, so it goes to the toolbar of picture nodes. Select a picture node, click **Actions** and pick **Film look**.

![Toolbar of the selected picture node with the Actions menu](https://mintcdn.com/comfyreel/d8xVTlBYWP7ahhU2/images/custom-actions-toolbar.webp?fit=max\&auto=format\&n=d8xVTlBYWP7ahhU2\&q=85\&s=f7e12d2396fbccf7db75f9eb0dcd8b47)

A new node linked from the picture opens with the settings. Pick a film stock and a print paper, set the exposure and press the generate button.

![The new Film look node linked from the photo, with kodak\_vision3\_250d, kodak\_2383 and exposure 0.5](https://mintcdn.com/comfyreel/d8xVTlBYWP7ahhU2/images/custom-actions-run.webp?fit=max\&auto=format\&n=d8xVTlBYWP7ahhU2\&q=85\&s=5bf16ebaa7b22b62af8d1a4178531ec4)

The film print fills the new node.

![The photo and the Film look node with the film print](https://mintcdn.com/comfyreel/d8xVTlBYWP7ahhU2/images/custom-actions-result.webp?fit=max\&auto=format\&n=d8xVTlBYWP7ahhU2\&q=85\&s=d283801ca42ad77d74284b2705939946)

## Example: two pictures in a Custom node

An action with two required pictures becomes a **Custom** node that takes its pictures from connections. This example uses the Image Blend node of [LayerStyle](https://github.com/chflame163/ComfyUI_LayerStyle) to lay a light leak over a photo. The two pictures need the same size; here both are 768 × 512.

1. Open `workflow/image_blend_example.json` from the LayerStyle pack in ComfyUI. It holds three blends; keep one **LayerUtility: ImageBlend** with its two Load Image nodes and its Save Image, and delete the rest. Set `blend_mode` to `screen` and `opacity` to 100: the values in the workflow become the defaults of the action. Export it with **File → Export (API)**.
2. In ComfyReel create a **New action** from the file. Both Load Image nodes are ticked as required inputs and the Save Image as the output. Tick `blend_mode` and `opacity`, and name the inputs **Background**, **Layer**, **Blend mode** and **Opacity**, the output **Blend**. Save it as **Blend layers**.

![Action dialog of Blend layers: two required pictures, two settings and the Save Image output](https://mintcdn.com/comfyreel/T7jGFS5qWIRwbYQX/images/custom-actions-blend-action.webp?fit=max\&auto=format\&n=T7jGFS5qWIRwbYQX\&q=85\&s=f1fe996b15774b42c6a55e5894f9b833)

3. Double-click the canvas, open **Custom actions** and pick **Blend layers**. A Custom node appears with the settings and the inputs it still needs.
4. Connect the photo and the light leak to it. The upper picture fills **Background**, the lower one **Layer**; the node shows which picture went where. Click **Run**.

![The photo and a light leak connected to the Blend layers node, which shows the blended picture](https://mintcdn.com/comfyreel/d8xVTlBYWP7ahhU2/images/custom-actions-blend-node.webp?fit=max\&auto=format\&n=d8xVTlBYWP7ahhU2\&q=85\&s=5074d0bcd1fda93449182def5cd9b17b)

## Make an action

1. In ComfyUI, open the workflow and use **File → Export (API)**.
2. In ComfyReel, open the logo menu at the top left and pick **Custom actions…**, then **New action**, and choose the exported file.
3. Name the action and, if you like, describe it in one sentence.
4. Tick what the action shows on the canvas:
   * **Inputs** lists every widget of the workflow, node by node. Tick a Load Image, Load Video or Load Audio widget to make it an input that a connected node fills; tick a text widget to type into it; tick a number, switch or list widget to make it a setting. Settings that belong to one choice of a node are listed too: in **Resize Image/Mask** set to "scale by multiplier", the multiplier shows up as `resize_type.multiplier`.
   * **Outputs** lists the output nodes. Any output node works: Save Image and the other save nodes, Preview Image, and the preview or output nodes of custom node packs. Tick the ones whose results you want; the first one is the result of the action. Each kind of output appears once; the layers button next to an image output takes the whole batch.
5. Rename inputs and outputs so they read well, reorder them with the arrows, and set the switches: **Required** for media inputs the action cannot run without, **Mask** for an image that is a mask, **Main prompt** for the text that gets the node's prompt box, **Random each run** for a seed.
6. Click **Save**. Anything that keeps the workflow from running is listed above the Save button.

When you import the file, ComfyReel ticks the media loaders (Load Image, Load Video, Load Audio) as required inputs, and a workflow with a single output node gets that output ticked too. Node titles that carry the same marks as custom workflows (`@image`, `@image2`, `@mask`, `@video`, `@audio`, `@prompt`, `@save` and so on) decide instead: the marked widgets and outputs are ticked for you.

Seeds that you leave unticked get a new value on every run, so a run never comes back from the cache.

## Where an action shows up

ComfyReel places each action by its required media inputs:

| Required media inputs | Where it appears |
| - | - |
| None | The model list of image, video or audio nodes, by the kind of its first output. Its settings open from the node's settings button. |
| One | The **Actions** menu in the toolbar of nodes of that kind. Picking it makes a new node linked from the selected one, like the built-in tools. An action with settings, a prompt or more inputs opens its form first; press Generate when it is ready. |
| Two or more | A **Custom** node. |

Every action can also be added as a **Custom** node: double-click the canvas (or press Tab), open **Custom actions** and pick it.

## The Custom node

A Custom node shows the action's prompt box, its settings, the inputs it takes with the node connected to each, and the result with its versions. Click **Run** to start it; anything still missing is listed above the button.

* **Inputs come from connections.** Pictures fill the image inputs in order from top to bottom, videos and audio likewise; connected text goes to the main prompt first, then to the other text inputs. The node takes as many connections of a kind as the action has inputs of that kind.
* **The result travels on.** A Custom node whose first output is a picture feeds other nodes like an image node does; the same goes for video, audio and text.
* **More outputs.** An action with several outputs shows the others under the result. Click **+** next to one to place it as its own node.
* **Change action** (the arrows button) lets you pick another action for the node. When an action is deleted, its nodes keep their results and ask you to pick another one.

Results stay on the canvas like any other result, also when they come from a preview node.

## Manage actions

The **Custom actions** dialog lists every action with where it appears. From there you can:

* **Edit** it: rename, change the description, tick other widgets or outputs.
* **Replace workflow**: after changing the workflow in ComfyUI, export it again and load it here. The ticked widgets and outputs follow their nodes by node type and title; anything that cannot be found is listed so you can tick it again.
* **Export** it as a JSON file and **Import** it on another machine or share it.
* **Delete** it. Nodes that used it keep their results.

Actions are saved with your ComfyReel data, per ComfyUI user.

## With the agent

The ComfyReel Agent sees your actions:

* `list_actions` lists them with their inputs and settings.
* `run_action` runs one on canvas nodes, for example "blend the sunrise over the tiles with Blend two".
* `apply_tool` runs a toolbar action on a node, and `add_node` adds a Custom node.
* `custom_action` reads a workflow, suggests what to expose and saves a new action, so you can ask the agent to turn a workflow into an action.

## Tips

* An action runs on the ComfyUI instance you pick under **Run on**, like the built-in features; the nodes in the workflow must be installed there.
* Keep the workflow small and finished: export exactly what should run, with the output nodes you want.
* A mask input is a plain image input on the canvas: connect a black-and-white picture to it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.