Skip to main content
Version: 1.28 (Current)

Create Articles

Audience: Low-code Engineers

Skill 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.

note

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.
Action NameDescription
Summarize ContentCreates one summary of a text.
ChatSends messages to OpenAI and returns the response.
Count TokensCounts 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 QuerySaves each article in a database table.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
ProviderThe AI service: OpenAI or Azure OpenAI. It decides which connector parameter is shown.NoOpenAIYes
OpenAI ConnectorThe 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.Nonone selectedYes
Deployment IdAzure OpenAI only. The name of your model deployment in Azure. You need to deploy a model in Azure before you can use it.Yesempty stringYes
ModelThe 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.Yesnone selectedYes
InstructionsOptional 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.Yesempty stringNo
ContentThe text to create articles from, for example [ManualText].Yesempty stringYes
TemperatureHow 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.NoemptyNo
Maximum LengthThe 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.NoemptyNo
ParallelizationHow many articles to create at the same time, for example 3. Values below 1 are treated as 1. See Considerations.Yes1No
On Article CreatedActions that run once for each article. They can use [Article:Title], [Article:Summary] and [Article:Body].NoemptyNo
Resource IDA label saved with the usage record, so you can tell where AI usage came from, for example KnowledgeBase/Document/[DocumentId].Yesempty stringNo
Ignore ErrorsWhen on, an error doesn't stop the actions that follow. The error is written to the site's event log. On Error still runs.NoOffNo
On ErrorActions that run when this action fails. See Errors.NoemptyNo

Output Parameters Reference​

ParameterDescription
Store Usage IDToken that receives the ID of the AI usage record for this run.

These tokens are available inside On Article Created:

TokenValue
[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​

  1. 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.
  2. 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.
  3. 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, summary and body.
  4. 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:

TokenValue
[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 Content leaves 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 Article tokens only exist inside On Article Created.
  • Articles run in parallel and share tokens. In 1.28, Parallelization doesn't limit how many articles are written at once: all of them start together. They also share one set of Article tokens, 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 } in Instructions makes 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-turbo and gpt-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 Content is 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 ID to label where the usage came from, and Store Usage ID to keep the record's ID.
  • Connectors. Create the OpenAI or Azure OpenAI connector first. See Connectors, Add Connector and Test Connector.

Examples​

tip

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