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

# Kafka send action

> The FlowX.AI Designer offers various options to configure the Kafka Send Action through the Actions tab at the node level.

* [Action Edit](#action-edit)
* [Parameters](#parameters)

<Frame>
  ![Kafka Send Action Configuration](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/3.5/kafka_send_action_confg.gif)
</Frame>

### Action Edit

* **Name** - Used internally to distinguish between different [actions](../actions/actions) within the process. Establish a clear naming convention for easy identification.
* **Order** - Sets the running order for multiple actions on the same node.
* **Timer Expression** - Enables a delay, using [ISO 8601 duration format](../node/timer-events/timer-expressions#iso-8601) (e.g., `PT30S` for a 30-second delay).
* **Action Type** - Designate as **Kafka Send Action** for sending messages to external systems.
* **Trigger Type** - Always set to Automatic.

<Info>
  The Kafka Send Action type is always **Automatic**. Typically, Kafka Send Actions automatically trigger when the process reaches this step.
</Info>

* **Required Type** (Mandatory/Optional) - **Automatic** actions are typically set as **mandatory**. Manual actions can be either mandatory or optional.
* **Repeatable** - Allows triggering the action multiple times if required.
* **Autorun Children** - When activated, child actions (mandatory and automatic) execute immediately after the parent action concludes.

### Parameters

You can add parameters via the **Custom** option or import predefined parameters from an integration.

<Info>
  For detailed information on **Integrations management**, refer to [<u>**this link**</u>](../../platform-deep-dive/integrations/integration-designer).
</Info>

* **Topics** - Specifies the Kafka topics listened to by the external system for requests.
* **Message** - Contains the message payload to be dispatched.
* **Advanced Configuration (Headers)** - Represents a JSON value sent within the Kafka message headers.

<Frame>
  ![Parameters](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/3.5/message_send_parameters.png)
</Frame>

## Dynamic Kafka topics

You can use dynamic topic names for Kafka Send and Kafka Receive actions in FlowX.AI processes by leveraging Configuration Parameters. This enables flexibility when working with Kafka topics across different environments or use cases.

Steps to Create Dynamic Kafka Topics:

<Steps>
  <Step title="Define Configuration Parameters for Kafka Topics">
    Navigate to **Projects → Your Project → Configuration Parameters** in FlowX.AI Designer.

    Add or update configuration keys for Kafka topics.

    Example:

    * Key: `kafka_send_2`
    * Value: `ai.flowx.plugin.document.trigger`
    * Key: `kafka_receive`
    * Value: `ai.flowx.engine.receive.plugin.document`

    <Frame>
      ![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/4.6/Screenshot%202025-02-24%20at%2017.47.57.png)
    </Frame>

    This allows referencing these parameters dynamically in your Kafka actions.
  </Step>

  <Step title="Use Configuration Parameters in Kafka Send Action">
    Open the process where you want to configure the Kafka Send Action.

    Go to Node Config > Actions.

    Select Kafka Send Action as the action type.

    Under Parameters, locate the Topics field.

    Use a dynamic reference to concatenate a parameter with another value:

    `${kafka_send_2}.${topic2}`

    Here:

    * `${kafka_send_2}` dynamically pulls the value from Configuration Parameters.
    * `${topic2}` can be another dynamic input set within the process.
  </Step>

  <Step title="Configure the Kafka Message Payload">
    Define the JSON structure for the message payload.

    <Frame>
      ![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/4.6/Screenshot%202025-02-24%20at%2018.03.36.png)
    </Frame>

    Ensure that all required fields align with the expected schema of the consuming system.
  </Step>

  <Step title="Validate and Test the Configuration">
    Start the process and check whether messages are correctly sent to the Kafka topic.

    If needed, modify the configuration parameters to change the topic dynamically.
  </Step>
</Steps>

## Kafka send action scenarios

The Kafka Send action serves as a versatile tool that facilitates communication across various systems and plugins, enabling efficient data transfer, reliable document management, notifications, and process initiation.

This action finds application in numerous scenarios while configuring processes:

* **Communicating with External Services**
* **Interacting with Connectors** - For example, integrating a connector in the FlowX.AI Designer [here](../../platform-deep-dive/integrations/building-a-connector#integrating-a-connector-in-flowxai-designer).
* **Engaging with Plugins:**
  * **Document Plugin:**
    * Generating, uploading, converting, and splitting documents - Explore examples [here](../../platform-deep-dive/core-extensions/content-management/documents-plugin/documents-plugin-overview).
    * Updating/deleting documents - Find an example [here](../../platform-deep-dive/core-extensions/content-management/documents-plugin/deleting-a-file)
    * Optical Character Recognition (OCR) integration - View an example [here](../../platform-deep-dive/plugins/custom-plugins/ocr-plugin#scenario-for-flowxai-generated-documents).
  * **Notification Plugin:**
    * Sending notifications - Example available [here](../../platform-deep-dive/core-extensions/content-management/notifications-plugin/sending-a-notification) and emails with attachments [here](../../platform-deep-dive/core-extensions/content-management/notifications-plugin/sending-an-email-with-attachments).
    * One-Time Password (OTP) validation - Refer to this [example](../../platform-deep-dive/core-extensions/content-management/notifications-plugin/sending-a-notification).
    * Forwarding notifications to external systems - Explore this [example](../../platform-deep-dive/core-extensions/content-management/notifications-plugin/forwarding-notifications-to-an-external-system).
  * **OCR Plugin**
  * **Customer Management Plugin**
  * **Task Management Plugin:**
    * Bulk operations update - Find an example [here](../../platform-deep-dive/core-extensions/task-management/task-management-overview#bulk-updates).
* **Requesting Process Data for Forwarding or Processing** - For example, Data Search [here](../../platform-deep-dive/core-extensions/search-data-service).
* **Initiating Processes** - Starting a process via Kafka. Find examples [here](../../flowx-designer/managing-a-project-flow/starting-a-process).

The Kafka Send action stands as a versatile facilitator, enabling smooth operations in communication, document management, notifications, and process initiation across diverse systems and plugins.
