Create Articles
Audience:
Low-code EngineersSkill Prerequisites:
Tokens,Connectors,Actions
Uses OpenAI, or OpenAI on Microsoft Azure, to turn one long text into several knowledge base articles, one for each topic in the text. Each article has a title, a summary and a body.
The action doesn't save the articles anywhere. For each article, it runs the On Article Created actions, where you save it, for example with Run SQL Query.
This action is part of the AI add-on (PlantAnApp.OpenAi). The add-on is installed separately and needs the AI feature in your license. If it isn't licensed, the action fails with an "AI package is unlicensed" error. If you don't see the OpenAi actions, the add-on isn't installed.
Typical Use Cases
- Turn a product manual, policy document or training transcript into knowledge base articles
- Split a long meeting or webinar transcript into articles by topic
- Build a searchable help section from existing documents
Don't use it to
- Create one summary of a text. Use Summarize Content instead.
- Write a single article from a short prompt. Use Chat instead.
- Create articles with Amazon Bedrock or Google Vertex AI models. This action only supports OpenAI and Azure OpenAI. See AWS AI Chat and VertexAI Chat.
- Process text you're not allowed to send to a third party. See Considerations.
Related Actions
| Action Name | Description |
|---|---|
| Summarize Content | Creates one summary of a text. |
| Chat | Sends messages to OpenAI and returns the response. |
| Count Tokens | Counts the AI model tokens in a text, to estimate how many requests are needed. |
| Speech to Text (Whisper) | Turns an audio file into text you can create articles from. |
| Run SQL Query | Saves each article in a database table. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Provider | The AI service: OpenAI or Azure OpenAI. It decides which connector parameter is shown. | No | OpenAI | Yes |
| OpenAI Connector | The connector that holds your API key: an OpenAI connector for OpenAI, or a Microsoft Azure OpenAI connector for Azure OpenAI. Both are labeled OpenAI Connector. See Connectors. | No | none selected | Yes |
| Deployment Id | Azure OpenAI only. The name of your model deployment in Azure. You need to deploy a model in Azure before you can use it. | Yes | empty string | Yes |
| Model | The model, for example gpt-4o. The list comes from the OpenAI models known to PAA. The model's context window sets how much text is sent in each request. With Azure, pick the model your deployment runs, so the size limits are right. | Yes | none selected | Yes |
| Instructions | Optional extra instructions, added to both the topic request and the article requests, for example Write in a friendly tone for customers. Use British English. Don't use { or }. See Considerations. | Yes | empty string | No |
| Content | The text to create articles from, for example [ManualText]. | Yes | empty string | Yes |
| Temperature | How random the output is, from 0 to 2, for example 0.3. Lower values give more focused, repeatable results. Leave empty to use the provider's default. | No | empty | No |
| Maximum Length | The most tokens the model can write in each response. It applies to every request, so it must be big enough for a whole article. Leave empty to use the provider's default. | No | empty | No |
| Parallelization | How many articles to create at the same time, for example 3. Values below 1 are treated as 1. See Considerations. | Yes | 1 | No |
| On Article Created | Actions that run once for each article. They can use [Article:Title], [Article:Summary] and [Article:Body]. | No | empty | No |
| Resource ID | A label saved with the usage record, so you can tell where AI usage came from, for example KnowledgeBase/Document/[DocumentId]. | Yes | empty string | No |
| Ignore Errors | When on, an error doesn't stop the actions that follow. The error is written to the site's event log. On Error still runs. | No | Off | No |
| On Error | Actions that run when this action fails. See Errors. | No | empty | No |
Output Parameters Reference
| Parameter | Description |
|---|---|
| Store Usage ID | Token that receives the ID of the AI usage record for this run. |
These tokens are available inside On Article Created:
| Token | Value |
|---|---|
[Article:Title] | The article's title. It has two parts: a title for the whole text, and the topic of this article. |
[Article:Summary] | A short summary of the article. |
[Article:Body] | The article's text. |
How articles are created
- The content is split into chunks. Each chunk is up to 60% of the model's context window, minus the tokens used by the instructions. For example, that's about 76,000 tokens for
gpt-4o. Chunks overlap by about 100 tokens, and they end at a space or punctuation mark. Short content is sent as one chunk. - Topics are found. For each chunk, one request asks the model for a list of the high-level topics it covers. The model must answer with a JSON array of strings.
- Articles are written. For each topic, one request asks the model to write an article about that topic only, using the text of that chunk. The model answers with a JSON object with
title,summaryandbody. - On Article Created runs for each article, as soon as it's ready.
All chunks are processed for topics first, then the articles are written. So a text with 2 chunks and 5 topics each makes 12 requests.
If a response can't be read as JSON, the request is tried again up to 2 more times, half a second apart. After that, the action fails.
The instructions sent to the model are fixed. Your Instructions are added after them. The topic request uses:
You are an assistant that creates a list of topics covered in a large document. The topics should be high level. You will receive the document in chunks, so pay close attention to the overlap between chunks when defining the topics. Always respond back with an array of type string, containing the topics.
Each article request asks for a knowledge base article about one topic, with a two-part title, a summary, and a body that's "as specific and detailed as possible with names, numbers, amounts, dates, and other details."
Errors
If the action fails, the On Error actions run with these tokens:
| Token | Value |
|---|---|
[ErrorMessage] | The error message. For provider errors, the message returned by OpenAI or Azure. |
[ErrorCode] | The HTTP status code returned by the provider. Empty for other errors. |
[ErrorJson] | The provider's error response as JSON. Empty for other errors. |
These tokens are removed after On Error finishes. Unless Ignore Errors is on, the action then fails.
An error in the On Article Created actions also makes the action fail. Articles that were already created stay wherever your actions saved them.
When the provider responds with "Too Many Requests" (a rate limit), the request waits 20 seconds and tries again, with no limit on retries. Request timeouts are also retried.
Considerations
- Your content is sent to OpenAI or Microsoft. Everything in
Contentleaves your server and is processed by the provider under your account's terms. Don't send personal, confidential or regulated data unless your agreement with the provider allows it. - Costs and time. The action makes one request per chunk plus one per topic, and each article request includes the whole chunk. Long documents can make many large requests and take several minutes. Run it in a workflow rather than a form submit. Use Count Tokens to estimate the size first.
- Save articles in On Article Created. Nothing is saved or returned otherwise. The
Articletokens only exist inside On Article Created. - Articles run in parallel and share tokens. In 1.28,
Parallelizationdoesn't limit how many articles are written at once: all of them start together. They also share one set ofArticletokens, so another article can replace the values while your actions run. Keep On Article Created short, ideally one action that saves the article straight away, and check the saved results. - Order isn't guaranteed. Articles can finish in any order. If order matters, save a sort value of your own.
- Similar topics. Topics are found per chunk. With long content, neighboring chunks can produce similar topics and similar articles.
- Don't use braces in Instructions. A
{or}inInstructionsmakes the article requests fail with an "Input string was not in a correct format" error. - JSON mode depends on the model. The article requests ask for JSON output only for some OpenAI models, such as
gpt-4o,gpt-4o-mini,gpt-3.5-turboandgpt-4-turbo-preview. With other models, and with Azure, the model is only asked in the instructions to answer in JSON, so failures are more likely. - Empty content. If
Contentis empty, no articles are created, and On Article Created doesn't run. Add a condition such as"[Content]" != ""to skip the action instead. - Usage tracking. PAA records the tokens used by each run. Use
Resource IDto label where the usage came from, andStore Usage IDto keep the record's ID. - Connectors. Create the OpenAI or Azure OpenAI connector first. See Connectors, Add Connector and Test Connector.
Examples
To understand how to use the below examples, please see Running Examples.
After importing the example, select your connector in the action. The connector ID in the JSON is a placeholder.
1. Create knowledge base articles from a manual
This action creates articles from the text in the ManualText token with gpt-4o. For each article, a Run SQL Query action saves the title, summary and body in a KnowledgeBaseArticles table, linked to the source document.
{
"Title": "Create Articles",
"ActionType": "OpenAi.CreateArticles",
"Description": "Create knowledge base articles from the manual",
"Condition": "\"[ManualText]\" != \"\"",
"Parameters": {
"Provider": "openAi",
"OpenAiConnector": {
"Entry": "00000000-0000-0000-0000-000000000000"
},
"Model": {
"Expression": "",
"Value": "gpt-4o",
"IsExpression": false,
"Parameters": {}
},
"Instructions": "The articles are for customers. Use plain language and short paragraphs.",
"Content": "[ManualText]",
"Temperature": 0.3,
"Parallelization": "1",
"OnArticleCreated": [
{
"Title": "Run SQL Query",
"ActionType": "RunSql",
"Parameters": {
"SqlQuery": "INSERT INTO KnowledgeBaseArticles (DocumentId, Title, Summary, Body) VALUES (@DocumentId, @Title, @Summary, @Body)",
"BindTokens": [
{
"name": "DocumentId",
"value": "[DocumentId]"
},
{
"name": "Title",
"value": "[Article:Title]"
},
{
"name": "Summary",
"value": "[Article:Summary]"
},
{
"name": "Body",
"value": "[Article:Body]"
}
]
}
}
],
"ResourceId": "KnowledgeBase/Document/[DocumentId]",
"StoreUsageId": "ArticlesUsageId"
}
}
Revised 09/27/2026