Skip to content

Data to Attribute

The Data to Attribute component acts as a smart organizer for your data. Instead of passing a large, complex block of data (like a customer record or a file) to the next step as one whole piece, this component breaks it down. It looks inside the data object and separates each specific piece of information—such as a name, an email address, or a date—into its own distinct output. This allows you to connect different parts of that data to different steps in your automation, making it easier to process, validate, or store each item exactly where it needs to go.

How it Works

This component works locally within the Nappai dashboard. It takes a main Data object as input and inspects its internal structure. It then identifies the specific attributes or fields contained within that object (like keys in a list or properties in a record).

For every attribute it finds, the component automatically creates a new, separate output port. For example, if your input data contains a “First Name” and a “Last Name,” the component will generate two separate outputs: one for the First Name and one for the Last Name. This dynamic process means you don’t need to manually configure every single field; the component adapts to the structure of the data you feed into it. Note that certain internal system codes are automatically ignored to keep your workflow clean.

Connection & Credentials

This component does not require any external credentials or API keys. It works entirely within your Nappai environment using the data objects you have already created or retrieved.

Operations

This section is not applicable as this component does not have selectable operations.

Inputs

Mapping Mode

This component does not use a fixed mapping mode toggle. Instead, it dynamically generates outputs based on the structure of the input data provided.

Input Fields

  • Data: This is the main object you want to break apart. It should be a structured data object (such as a record, a JSON file, or a list) that contains the information you want to separate. When you connect another component to this field, the “Data to Attribute” component will look inside that object and create outputs for every valid piece of information it finds.

Outputs

The component produces dynamic outputs. This means the number and names of the outputs depend entirely on the data you provide.

  • Dynamic Attributes: Each attribute found inside your input Data object becomes a separate output. For example, if your input data has fields for “ID,” “Name,” and “Status,” you will receive three distinct outputs labeled “ID,” “Name,” and “Status.”
  • Usability: You can now connect each of these individual outputs to different parts of your workflow. You might send the “Name” to a translation node, while sending the “ID” to a database storage node.

Output Data Example (JSON)

Below is an example of how a data object might look before processing. When passed through this component, each key becomes a separate output. json { “id”: 12345, “customer_name”: “Jane Doe”, “email”: “jane.doe@example.com”, “is_active”: true }

After processing, you would have individual outputs for id, customer_name, email, and is_active.

Connectivity

This component is typically placed after a data retrieval or generation node (such as a Database Reader, API Caller, or File Uploader) and before specific processing nodes.

  • Connect To: Connect the individual outputs (e.g., email, id) to nodes that require that specific data, such as:
    • Validation Nodes: To check if an email is valid.
    • Storage Nodes: To save specific fields to a spreadsheet or database.
    • AI Nodes: To provide context for a chatbot using specific attributes.
  • Connect From: Connect the Data input from any node that produces a structured object (like a JSON response or a CSV row).

Usage Example

Imagine you have a workflow that needs to send personalized emails to customers. You first retrieve a list of customer records. By adding the Data to Attribute component after the retrieval step, you can separate each customer’s details. You can then connect the email output to an email sender node and the customer_name output to a message template, ensuring the right name is used for the right email address without manual formatting.

Templates

This section is omitted as no specific templates are listed for this component.

This section is omitted as no related components are listed.

Important Notes

This section is omitted as no specific user notes were provided.

Tips and Best Practices

  • Check Your Data Structure: Ensure the input data is a structured object (like a dictionary or JSON). If the input is just a simple text string, the component may not have any attributes to extract, resulting in no outputs.
  • Dynamic Outputs: Remember that the outputs are dynamic. If you change the input data to include new fields, the component will automatically create new output ports for those fields.
  • Avoid Code Fields: The component automatically filters out certain internal fields (like “code”) to keep the workflow clean. You do not need to configure this; it happens automatically.

Security Considerations

This component does not involve external APIs or credentials, so there are no specific security risks related to key exposure. However, ensure that the input data you provide does not contain sensitive information (like passwords) if you plan to view or log the output data in the dashboard.