# Flash

Navigate your automation journey effortlessly with intuitive loops, advanced scripting, smart documentation, enhanced OAuth 2.0 support, and unparalleled control

---

## NEW

### Loops are here, loops are here, loops are here … 🔄

Ref: #3898, #3921

In this update, we're introducing a valuable tool for your automation arsenal: the **"Loop"** step. This feature broadens your workflow capabilities with three key options:

1. **For loop**: Classic for executing a predetermined number of sequential iterations.

   <div class="docs-screenshot-compact">

   ![Loop](./assets/loop.png)

   </div>

2. **While**: This option continues iterations as long as a specified condition remains true. To prevent infinite loops, you can set an upper limit in the settings.

   <div class="docs-screenshot-compact">

   ![While](./assets/while.png)

   </div>

3. **Do While**: Similar to the "While" loop, but with the condition check occurring at the end of each iteration.

   <div class="docs-screenshot-compact">

   ![Do while](./assets/do-while.png)

   </div>

:::note
This feature is particularly useful for dealing with paginated APIs, making the handling of such data much more efficient.
:::

### Scripting (alpha) 🔧

Ref: #681

We're thrilled to unveil **scripting** (source code! 👩‍💻), a robust addition to our platform that enhances your automation capabilities. With this feature, you can now:

- Run scripts written in Python 3 and JavaScript (Node.js 18).
- Import standard -_only_- modules like JSON, HTTP, and others for diverse functionalities.
- Utilize data from the flow as input using the **`mindflowData`** (JavaScript) or **`mindflow_data`** (Python) global variable.
- Output processed data, seamlessly integrating it into subsequent workflow steps.
- Effortlessly mix Python and JavaScript within the same flow and add as many steps as necessary.
- Benefit from syntax highlighting and code completion for a smoother scripting experience.
- Utilize full-screen mode for script editing.

Dive into scripting to bring your automation to the next level!

   <div class="docs-screenshot-compact">

![Utilize full screen mode script editing](./assets/utilize-full-screen-mode-script-editing.png)

   </div>

:::note
This is an alpha feature, and we're keen to hear your feedback to make scripting even better! Please note the following current limitations of this alpha feature:

- Custom modules cannot be imported.
- It's not possible to perform a dry run of a single step.

:::

### Stop a flow execution 🛑

Ref: #676

For now on, you will be in control. A stop button has been added when flows are in action.

   <div class="docs-screenshot-compact">

![Its not possible perform dry run](./assets/its-not-possible-perform-dry-run.png)

   </div>

Should you have multiple workflows running simultaneously, you can now easily navigate to the playbook logs and halt the specific execution you wish to stop.

   <div class="docs-screenshot-compact">

![Its not possible perform dry run](./assets/its-not-possible-perform-dry-run-2.png)

   </div>

A confirmation prompt has been added to prevent any accidental stops, ensuring that your workflows are only interrupted when you're absolutely sure.

   <div class="docs-screenshot-compact">

![Its not possible perform dry run](./assets/its-not-possible-perform-dry-run-3.png)

   </div>

:::note
Please note that while the stop command is designed to halt workflows as quickly as possible, certain actions, like "Wait" cannot be interrupted once they've begun.
:::

### Flow documentation assistant with AI Note ✨

Ref: #3794, #4017

Love well-documented workflows but dread the documentation process? AI Notes is here to help. Simply create your flow, and let AI Notes do the heavy lifting by automatically generating a description for you. Here's how to get started:

1. Click on the "stars" icon located at the top right action bar.

   <div class="docs-screenshot-compact">

   ![Click stars icon located top right](./assets/click-stars-icon-located-top-right.png)

   </div>

1. Wait a few seconds for AI Notes to analyze your flow and generate a description.

   <div class="docs-screenshot-compact">

   ![Wait few seconds ai notes analyze](./assets/wait-few-seconds-ai-notes-analyze.png)

   </div>

1. And just like that, you're done!

   <div class="docs-screenshot-compact">

   ![Just like youre done](./assets/just-like-youre-done-2.png)

   </div>

### Multipart support added to HTTP POST request 🌐

Ref: #3894

We've enhanced the HTTP Request engine with multipart form data support. This update opens the door to a variety of services, such as uploading files, making your integrations more versatile and powerful.

   <div class="docs-screenshot-compact">

![Just like youre done](./assets/just-like-youre-done.png)

   </div>

---

## CHANGES

### Display one workspace at a time **🖥️**

Ref: #3790

We've updated our navigation to enhance user experience. Now, you'll only see one workspace at a time, making it easier to focus on your current tasks. This is just the beginning of more enhancements to come.

### Extended OAuth 2.0 support **🛡️**

Ref: #3941, #4040

We're broadening our authentication options to include more mechanisms:

- Now supporting body token requests in OAuth 2.0 client credentials, simplifying the integration process for OAuth 2.0 workflows.

   <div class="docs-screenshot-compact">

  ![Now supporting body token requests oauth](./assets/now-supporting-body-token-requests-oauth.png)

   </div>

- Added support for ROPC (Resource Owner Password Credentials), offering a direct way to authenticate users with their service credentials.

   <div class="docs-screenshot-compact">

  ![Added support ropc resource owner password](./assets/added-support-ropc-resource-owner-password.png)

   </div>

### Various changes 🍒

- Enhanced theme, UI components, fonts, and colors for improved readability, aesthetics, and consistency, addressing issues #3956, #3785, #3786, #3814, and #3992.
- Minor security fix: Strict-Transport-Security header added: We've added the HTTP Strict Transport Security (HSTS) to enhance your security. This simple yet effective standard ensures that browsers always connect to our website over HTTPS, eliminating the need for insecure http:// to https:// redirects (#3903).
- Improved AI··Agent steps to share the same thread context within a playbook, allowing each step to inherit from the previous context. A new thread context is now created for each playbook execution (#3742).

---

## FIXES

- Fixed the ability to edit emoji on AI··Agent steps (#3931)
- Resolved the issue where restoring a version would break the preview of data pill values (#3990)
- Clarified error messages when selecting a vendor or portfolio credential (#4006)
- Fixed an issue where the cursor unexpectedly jumped to the beginning of the field (#3939)
- Resolved a problem where flows wouldn't display after deleting the body of an HTTP request (#4035)
- Addressed the loss of pill after performing a copy-paste action (#3726, #4087)
- Corrected the user account menu popover appearing under the member table (#3782)
- Fixed orphan links that prevented execution (#3853)
- Resolved an issue where function output incorrectly showed a storage handle instead of the data (#3853)
- Ensured credential references are saved in playbook versioning (#3960)
- Implemented minor fixes on versioning (#3954)
