> For the complete documentation index, see [llms.txt](https://raia2.gitbook.io/raia/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://raia2.gitbook.io/raia/dev-program/integrations-training/jira-greater-than-raia-agent.md).

# Jira -> raia Agent

<figure><img src="/files/edDhJqnLvCqnNNtYZiNJ" alt=""><figcaption></figcaption></figure>

As a user of raia Agent, I want to automatically sync content from a Jira board or space into a Raia Agent as a Markdown file. This will allow the agent to have up-to-date knowledge of our project status and documentation.

The n8n workflow should run on a nightly schedule and perform the following actions:

1. **Fetch Jira Content:** Retrieve all issues, comments, and attachments from a specified Jira board or an entire space.
2. **Consolidate to Markdown:** Convert the fetched Jira content into a single, well-structured Markdown file. The Markdown file should include clear metadata, such as:
   * Project Name
   * Board/Space Name
   * Sync Date
   * A table of contents
3. **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 content from a Jira board/space.
* The workflow consolidates the content into a single Markdown file with the specified metadata.
* 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 error handling and notifications for failed runs.

**Technical Details:**

* **Raia Agent API Endpoint:** `POST /external/agent-files/upload`
* **Request Type:** `multipart/form-data`
* **Authentication:** 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 Jira and the Raia Agent API.
* The Jira API can be used to fetch the board/space content.
* The Markdown file should be structured for readability, using headings, lists, and tables where appropriate.
* The workflow should be tested with a sample Jira board before being deployed to production. '''


---

# 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, and the optional `goal` query parameter:

```
GET https://raia2.gitbook.io/raia/dev-program/integrations-training/jira-greater-than-raia-agent.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
