# 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: 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.raiaai.com/dev-program/integrations-training/jira-greater-than-raia-agent.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.
