> For the complete documentation index, see [llms.txt](https://docs.nected.ai/nected-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nected.ai/nected-docs/workflow/add-node/action-nodes/ai-agent-node/text-analysis.md).

# Text Analysis

The **Text Analysis Node** allows you to perform natural language understanding directly within your workflows — without external scripts or APIs.\
You can use it to analyze text, extract key insights, classify messages, or summarize long pieces of content — all powered by your connected AI provider.

{% hint style="info" %}
[How to connect AI Providers?](/nected-docs/integrations/integrations-libraries/ai-providers.md)
{% endhint %}

<details>

<summary>How does it work?</summary>

When you add a Text Analysis Node inside your workflow, it takes your input text (or variables passed from earlier nodes), sends it to the configured AI model, and returns structured, machine-readable results such as sentiment scores, detected entities, or summarized text.

Each analysis type is pre-optimized for specific NLP tasks, so you don’t need to engineer prompts — just choose the analysis type, and Nected does the rest.

</details>

### **Configuration Tabs**

#### **1. Input Params**

This is where you define what the node should analyze and how.

**Connector dropdown:** Select your preferred AI connection. This determines which model and provider will power your text analysis.

**Assistant ID/Model name:** You can use a normal model or any of your AI assistants for this task. If you’re using a custom AI assistant from your provider (like OpenAI’s Assistant API), you can select its **Assistant ID**. This helps reuse a pre-configured assistant for specific tasks, instructions, or datasets. Or, you can use a normal AI model. In that case you only need to add the model name.

**Analysis Type:**\
Choose the kind of analysis you want the node to perform.\
Each type serves a different purpose:

| **Analysis Type**        | **What It Does**                                                                                           | **Common Use Cases**                                                            |
| ------------------------ | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| **Sentiment Analysis**   | Identifies whether a given text expresses a positive, negative, or neutral tone.                           | Customer feedback evaluation, chat sentiment detection, social media monitoring |
| **Entity Recognition**   | Detects named entities such as people, companies, dates, and amounts, and classifies them into categories. | Extracting company names, policy numbers, product SKUs, or transaction details  |
| **Keywords Recognition** | Pulls out important keywords or phrases from the text.                                                     | Highlighting main topics, tagging content, indexing articles                    |
| **Text Classification**  | Categorizes the text into predefined labels or topics based on its content.                                | Ticket routing, content moderation, email sorting, intent detection             |
| **Summarization**        | Generates a concise summary of longer content while preserving meaning.                                    | Meeting notes condensation, news/article summaries, document overviews          |

**Text:** Enter the text you want to analyze. You can directly paste static text or pass dynamic values from previous workflow nodes using tokens.

For example:

```
{{.LoopBlock.output[1].customer_feedback}}
```

👉 [Learn more about using tokens in the editor →](https://docs.nected.ai/nected-docs/references/pre-configured-tokens/use-tokens-in-the-editor)

**Add Variable**

Variables allow you to pass additional instructions or identifiers to fine-tune analysis.

You can add:

* **Instructions** — to customize behavior (e.g., *“Only detect company and product entities.”*)
* **Thread ID** — to maintain context between multiple text analyses, especially in long-running conversations.

#### **2. Test Results**

Once you’ve set up the node, switch to the **Test Results** tab to view the AI’s response.\
When you click *Run Test*, the output appears here in **JSON format**, including:

* The **analysis result** (sentiment label, extracted entities, summary, etc.)
* **Processing time**
* **Reference ID**
* Optional **metadata**

You can toggle between *Raw*, *Pretty*, or *Table* views depending on how you want to inspect or debug the response.

For example:

```json
{
  "type": "sentiment",
  "label": "Positive",
  "confidence": 0.93
}
```

#### **3. Settings**

In this tab, you can adjust how the model executes the analysis.

* **Timeout for API (s):** Set how long to wait for an API response.
* **Timeout for Webhook/Cron (s):** Specify a limit for scheduled or webhook-based runs.
* **Continue on Error:** Allow the workflow to proceed even if the AI request fails.
* **Max Tokens:** Limit how long the response can be (use lower values for shorter summaries or classifications).
* **Temperature:** Control randomness — lower (0–0.3) for deterministic outputs, higher for creativity.
* **Max Retries:** Define how many times the node should retry in case of transient issues.
* **Metadata Required:** Enable this if you need extra information from the AI response (like token counts or processing stats).
* **Cache:** Save previous responses to speed up repeated analyses.
* **Time to Expire:** Set how long cached results remain valid.

### **What are the practical applications?**

Using the **Text Analysis Agent** in your workflow, you can automate the understanding and interpretation of text data at scale.

1. **Analyzing Customer Sentiment**\
   Detect positive or negative tones in feedback messages, and use a **Switch node** to route complaints to the support team automatically.
2. **Extracting Entities from Documents**\
   Run entity recognition to extract company names and monetary values from financial statements before storing them in your database.
3. **Summarizing Long Meeting Notes**\
   Feed entire transcripts into the Text Analysis Node with “Summarization” selected — the node returns a short, structured summary ready to be shared.
4. **Keyword Extraction for SEO**\
   Automatically identify the top keywords from new articles and save them in a database for indexing or analytics.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.nected.ai/nected-docs/workflow/add-node/action-nodes/ai-agent-node/text-analysis.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.
