How to Build an Automated Ticket Management Agent on Pupau
Overview
This guide will walk you through the process of creating an automated Ticket Management Agent (Ticketing Agent) on Pupau, inspired by the workflow described in our ticket-handling automation YouTube Tutorial. You’ll learn to configure the agent, connect APIs, define tool usage, set up automation, and test your setup—all inside Pupau, leveraging its modular and no-code design. Use this example as a starting point and customize it to fit your specific needs on your ticketing system and workflow.
1. Introduction
A Ticket Management Agent in Pupau aims to fully automate the repetitive handling of support or incident tickets within business workflows. The agent retrieves new tickets from a system, processes each ticket (analyzing their content and formulating answers), and updates or closes tickets as needed, all without manual intervention. This tutorial is ideal for those who want to streamline operations such as customer support, IT issue tracking, or any scenario based on ticketing systems.
2. Create a New Agent
-
Log in to Pupau: Open Pupau and ensure you have access and permissions to create new agents.
-
Create Agent:
- Click on Create New Assistant (+ button).
- Name: Enter a name, such as
Automated Ticket Manageror any naming convention that fits your use case. - Description: Provide a brief description, e.g., "Automates ticket retrieval, response, and closure for the support platform."
- Model: Select a suitable model (e.g., GPT-4.1 Global or other available models).
- System Prompt: (Placeholder) Leave as default for now; you will customize it later.
- Features: Disable features not required (such as default Web Search or Navigation, unless applicable). Keep attachments and multi-agent orchestration enabled if you plan advanced integrations.
3. Tool Setup
To enable the ticketing workflow, set up the following tools:
a) Ticket ID Retrieval Tool
This tool is used to retrieve all current/open ticket IDs for processing. You should map this tool to your ticketing system's API or backend via Pupau's pipeline builder or API tool. Adjust authentication as required.
- Type: Pipeline Tool (or API integration, depending on your ticketing backend)
- Name:
fetch_ticket_ids - Description: Retrieves all current/open ticket IDs for processing.
- Configuration: Link this to your ticketing system’s API or backend via Pupau’s pipeline builder or API tool. Adjust authentication as required.
b) Ticket Content Fetch Tool
This tool is used to retrieve the full content/details of a specific ticket by ID. You should map this tool to your ticketing system's API or backend via Pupau's pipeline builder or API tool. Adjust authentication as required.
- Type: API Tool
- Name:
get_ticket_content - Description: Retrieves the full content/details of a specific ticket by ID.
- Configuration:
- Set method, endpoint URL, and authentication for your ticketing backend.
- Add required parameters (typically,
ticket_idas a string).
c) Ticket Response Submission Tool
This tool is used to submit a response/note for a specific ticket. You should map this tool to your ticketing system's API or backend via Pupau's pipeline builder or API tool. Adjust authentication as required.
- Type: API Tool
- Name:
submit_ticket_response - Description: Posts or updates the response/note for a specific ticket.
- Configuration:
- Set method, endpoint, and authentication as per backend.
- Parameters:
ticket_id(string),ticket_note(string).
d) Todo List Tool
This tool is used to maintain and track the steps to perform for each ticket, ensuring that each ticket is processed in a repeatable, cyclical way.
- Type: Native Tool
- Name:
manage_todolist - Description: Maintains and tracks the steps to perform for each ticket, ensuring that each ticket is processed in a repeatable, cyclical way.
- Configuration: Default settings recommended.
Tip: Clear, focused names and descriptions for each tool help drive successful automation and proper tool invocation.
4. System Prompt
Now it’s time to configure your system prompt, which controls the behavior and automation flow for your agent. Here you can find an example of system prompt that you can use as a starting point.
# tool agent- Continuous Execution Loop
## CRITICAL IMPERATIVE
**YOU MUST CONTINUOUSLY EXECUTE TASKS UNTIL THE TODOLIST IS COMPLETELY EMPTY**
You excel at the following tasks:
1. Information gathering, ticket-checking, and recover documentation for ticket
2. You have to recover id and body of the ticket, analyze it and give notes as a response
## Your Mission
You are a helpful AI agent created by the Pupau team. You are the best at using the tool, the todo list, and API calls to get and post parameters.
You are an helpful task-focused agent that **ALWAYS** uses the tool to track and systematically execute work. Your primary job is to break down objectives into actionable tasks and complete them ALL without stopping within tool use cycles
## Available Tools
- **ticket _todolist**: Single tool to manage the todolist with these actions:
- `action: 'LIST'` + `actionParameter: ""` → List all items
- `action: 'ADD_TASK'` + `actionParameter: "task string"` → Add single task
- `action: 'ADD_TASKS'` + `actionParameter: ["task1", "task2", ...]` → Add multiple tasks
- `action: 'SET_ITEM_DONE'` + `actionParameter: id_number` → Mark task completed
- `action: 'SET_ITEM_NOT_DONE'` + `actionParameter: id_number` → Reopen task
- **ticket _api_call_in **: start the api call and get the ticket body based from the id
- ** ticket _api_call_out ** : start the api call and post the ticket notes and the ticket id
- ** id _api_call **: start the api call and get all the tickets id
## IMPORTANT: TodoList Tool Behavior
**Every ticket_todolist call automatically returns the current state of the entire todolist.**
- After ADD_TASKS → You see the updated todolist
- After SET_ITEM_DONE → You see the updated todolist
**USE THIS INFORMATION:** Don't make unnecessary LIST calls - use the todolist state returned by your last ticket_todolist interaction to know the current status.
## Optimized Execution Loop
**NEVER STOP UNTIL ALL TASKS ARE DONE**
1. **Check todolist status** (from last ticket_todolist response OR use action: 'LIST' if starting fresh)
2. **If todolist has tasks → Continue to step 3**
3. **Execute the task**
6. **ticket _todolist** with `action: 'SET_ITEM_DONE'` and `actionParameter: task_id` (this shows updated todolist)
7. **Check the returned todolist status** - Are there more tasks?
8. **If YES: IMMEDIATELY go to step 3**
9. **If NO: Mission complete!**
## Non-Negotiable Rules
- **NEVER WAIT for user input** during task execution
- **NEVER STOP** until todolist shows no pending tasks
## Initial Setup Process
When user gives you an objective:
1.**ticket** - Break down user's request into specific, actionable tasks
2.start the first too to recover all the id ticket available: id _api_call
3. with all the id start the ticket to do list: ticket _todolist
**ticket_todolist** with `action: 'ADD_TASKS'` and `actionParameter: ["task1", "task2", ...]` (this returns updated todolist)
In the ticket _todolist you have to include the use of this tool for each id:
1create the "id_number" with the id number
2.**ticket _api_call_in **: start the api call give as parameter: "id_number" where is the number of the id to start the call (do it for each id number)and get the ticket body based from the id.
3. Read the body and prepare notes based on this prompt: you are a top reviewer of the ticket company and complaints; you are an expert technical and IT technician to resolve issues; prepare an answer with the best solution based on the ticket body.
4. create the parameter "ticket_note" with the notes you are generated
5.** ticket _api_call_out ** : start the api call , give as the parameter: "id_number" and "ticket_note" where is the number of the id and the notes of the ticket to start the call, and post the ticket notes and the ticket id related
## Smart Todolist Usage
- **Only use action: 'LIST' again** if you need to refresh or verify status
- **SET_ITEM_DONE** already show you the current todolist
- **After SET_ITEM_DONE** you already have the Updated LIST
- **Be efficient** - don't make redundant tool calls
- **Never pause** between tasks - keep the momentum going!
## Communication During Loop
- Show which task you're currently working on
- Show completion status after each task
- Reference the todolist status from your last manage_todolist response
- Keep working - don't ask for permission to continue
- Provide brief updates on progress
## ABSOLUTE REQUIREMENT
**YOU ARE NOT DONE UNTIL:**
The todolist returned by your last ticket_todolist call shows no pending tasks (all items have done: true or no items exist).
**Only then can you stop and report mission complete.**
<language_settings>
- Default working language: **English** and **Italian**
- Use the language specified by user in messages or in the message you receive in parameter of the API as the working language when explicitly provided
- All thinking and responses must be in the language of the ticket
</language_settings>
<error_handling>
- Tool execution failures are provided as events in the event stream
- When errors occur, first verify tool names and arguments
- Attempt to fix issues based on error messages; if unsuccessful, try alternative methods
- When multiple approaches fail, report failure reasons to user and request assistance
5. Custom Actions & Automation
Pupau allows you to add Custom Actions for one-click or event-driven automation. We will use a custom action to start the ticket management agent. In a real world scenario you should instead use a webhook or an event to trigger the ticket management agent.
-
Add a Custom Action:
- Go to Custom Actions in your agent’s configuration.
- Type: Prompt (or Actor, as fits your scenario).
- Prompt: e.g., "Start automatic ticket retrieval and processing."
- Description: e.g., "Begins the loop to process and respond to all new tickets."
-
With this setup, you (or a webhook/event) can trigger the ticket agent with a single action.
6. Human-in-the-Loop (Optional)
For flows requiring human review before posting responses, enable the user approval option on the output/response submission tool:
- Go to the
submit_ticket_responsetool settings. - Enable the "user approval required" toggle.
- Set a custom approval message (e.g., "Are you sure you want to submit these ticket responses?").
When enabled, the agent pauses for manual confirmation before sending ticket updates.
7. Testing Your Agent
Test your Ticketing Agent through incremental scenarios:
- Trigger the agent to fetch ticket IDs.
- Confirm that for each ticket, the agent retrieves content, formulates a response, and posts updates.
- Observe the cyclical processing of all tickets via the todo list’s status.
- Test error handling and, if enabled, the human approval workflow.
- Check the ticketing system backend to verify that all actions are completed as expected.
8. Example Use Cases
- Help Desk Automation: Fully automate response drafting for FAQs and easy issues, escalating complex tickets as needed.
- IT Incident Management: Gather, analyze, respond, and close IT requests within your team.
- Customer Care Back Office: Mass-process requests with consistent, rapid responses and reporting.
9. Next Steps and Optimization
- Refine your system prompt for clarity, robustness, and safety.
- Adjust tool authentication, parameters, and error handling in Pupau’s visual editor.
- Experiment with agent orchestration (e.g., hand tickets off to specialist agents).
- Integrate webhooks or email triggers for event-based automation.
- Check out detailed logs for each tool invocation for debugging and fine-tuning.
You are now ready to deploy your automated Ticket Manager Agent with Pupau. Change the system prompt and tool parameters to match your exact workflow, and start saving time on repetitive ticket handling!