TeamSupport -> raia Agent

As a user of Raia Agent, I want to automatically sync our knowledge base articles from TeamSupport into a Raia Agent as a Markdown file. This will ensure the agent has access to our most current support documentation, enabling it to provide accurate and consistent answers to customer inquiries.
The n8n workflow should run on a nightly schedule and perform the following actions:
Fetch Knowledge Base Tickets: Retrieve all tickets from TeamSupport that are marked as knowledge base articles (
IsKnowledgeBase = true).Consolidate to Markdown: Convert the fetched tickets into a single, well-structured Markdown file. The file should include:
A title and introduction for the knowledge base document.
A table of contents, possibly organized by ticket type or status.
The content of each knowledge base article, including its title, ticket number, and body.
Upload to Raia Agent: Upload the generated Markdown file to the Raia Agent using the API.
Acceptance Criteria:
An n8n workflow is created that successfully fetches all tickets from TeamSupport where
IsKnowledgeBaseis true.The workflow consolidates the content of these tickets into a single Markdown file with a clear structure.
The workflow successfully uploads the Markdown file to the Raia Agent via the API.
The workflow is scheduled to run every night.
The workflow includes robust error handling and notifications for failed runs.
Technical Details:
TeamSupport API:
Authentication: Basic Authentication using Organization ID and API Token.
Endpoint:
GET https://app.[ServerName].teamsupport.com/api/json/tickets?IsKnowledgeBase=trueNote: The
[ServerName](e.g., na1, na2) needs to be configured.
Raia Agent API:
Endpoint:
POST /external/agent-files/uploadRequest Type:
multipart/form-dataAuthentication: API Key in the header.
Request Body:
file: The Markdown file to upload.autoAddToVectorStore:true(to make the content searchable by the agent).
Implementation Notes:
The n8n workflow will require credentials for both the TeamSupport API (OrgID, API Token) and the Raia Agent API.
The workflow must handle pagination, as the TeamSupport API may return a large number of tickets.
The Markdown file should be formatted for readability, using headings for each article title.
The workflow should be tested with a small set of knowledge base tickets before being deployed to production.
Last updated

