# Featured Action Nodes

This Topic features some nice-to-know Action Nodes relevant to logic, functionality and flow.

## Actions Flow

### While

The While action node runs a block of action nodes as long as a condition evaluates to true.

**Article**:

* [While](/library/action-nodes/while.md)

**Example in Showroom:**

* [Showroom example](https://showroom.appfarm.app/action-nodes/while)

### Foreach & Next Iteration

The Foreach action node loops over objects in a data source and runs a block of action nodes for each object. You may exit a Foreach-loop (prior to looping all objects) using the Next Iteration action node.

**Article:**

* [Foreach](/library/action-nodes/foreach.md)

**Example in Showroom:**

* [Showroom example](https://showroom.appfarm.app/action-nodes/foreach)

### Block

The Block action node has a few settings allowing for either parallel or "first-to-finish" execution of the action nodes inside it.

**Article:**

* [Block](/library/action-nodes/block.md)

### Sleep

Adding a Sleep action node to an action will allow the Action to pause for a given number of milliseconds. Can be useful e.g. if collecting data from an external system fails, and you want to retry automatically 2 seconds later.

## Other action nodes

### Run Code

Allows you to run Javascript code.&#x20;

**Article**:

* [Run Code](/library/action-nodes/run-code.md)

**Example in Showroom**:

* [Showroom example](https://showroom.appfarm.app/action-nodes/run-code)

### Export Data

Export data to a CSV file.

**Article**:

* [Export Data](/library/action-nodes/export-data.md)

**Example in Showroom:**

* [Showroom example](https://showroom.appfarm.app/action-nodes/exportdata)

### Generate Document

Generate a PDF file using HTML and your data.

**Article**:

* [Generate Document](/library/action-nodes/generate-document.md)

**Example in Showroom:**

* [Showroom example](https://showroom.appfarm.app/action-nodes/generate-document)

### Set theme

Change the Theme of your App runtime. Useful e.g. for changing to Dark mode, or when creating a white-label App with different Theming per customer.

**Article**:

* [Set theme](/library/action-nodes/set-theme.md)

**Example in Showroom:**

* [Showroom example](https://showroom.appfarm.app/action-nodes/set-theme)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appfarm.io/appcademy/appfarm-professional/logic-and-flow/featured-action-nodes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
