If you’ve ever opened a shared support inbox, you know the feeling. A stream of messages arrives every day, each one asking for something different. Some patients want appointments. Some need prescription refills. Others have billing questions. And somewhere in that list, a genuinely urgent message is waiting.
It’s easy to imagine the pressure on the team handling these requests.
But the truth is, you can take a huge step toward calmer, faster, more organised support with one small slice of AI.
In this tutorial, we’re going to build that slice. You’ll create a simple Boomi flow that reads an email, turns it into clean structured data, sends it to an AI Agent, and receives a clear classification back. This small piece becomes the foundation for smarter routing, better response times, and more patient-centred care.
You can further develop this with the Boomi process like sending the response to different system or querying another system based on the response you get from the agent.
But let’s first build a very simple scenario using Boomi’ AI Agent
1. What we’re building
Our outcome is straightforward.
When a patient email arrives, the system will convert it into structured JSON and ask an AI Agent:
“What type of request is this?”
The agent will reply with something neat and predictable:
{
"category": "Appointment Request",
"confidence": "High",
"reason": "The email asks to schedule a consultation.",
"key_terms": ["schedule", "appointment", "consultation"]
}
That one response opens the door to automation, routing, dashboards, and more.
But today, we focus on the foundation. Once you understand this pattern, you can apply it anywhere.
2. How the architecture fits together
Here’s the whole picture in one line:
Email arrives → Boomi reads it → Boomi converts it to clean JSON → AI Agent analyses it → Agent returns structured classification
3. What you need before you begin
You don’t need much:
- A Boomi Integration environment
- Access to Boomi AI Agents
- Any email connector (Office 365, IMAP, POP)
- A basic understanding of mapping and connector shapes
This tutorial keeps everything simple, so even if you’re new, you’ll be able to follow.
4. Shape the email into clean JSON
Before we bring AI into the picture, we need one thing:
a clear JSON structure that represents the email.
This keeps the agent focused. It sees only what matters.
Here’s the JSON we’ll work with:
{
"from": "patient@example.com",
"subject": "Need to book a consultation",
"bodyText": "Hello, I'd like to schedule my annual check-up next week.",
"attachments": []
}
Your JSON profile should contain:
- from (string)
- subject (string)
- bodyText (string)
- attachments[] (optional array)
This structure is simple, readable, and easy for the AI to parse.
Note: Attachment is passed an empty array but if you need to read attachment then you will need pass values or extract the text from attachments within the Boomi process and feed to AI Agent.
5. Build the Boomi process
Let’s set up the flow that prepares the JSON and sends it to the agent.
Step 1: Create a new process
Name it something like:
Healthcare_Email_Classifier
If you’re testing, you can use a No Data start and feed in a sample in Message shape
In real deployment, you’ll use an email connector.

Step 2: Extract the fields you need
Most email connectors output:
- Subject
- From
- Body (HTML or text)
- Attachment metadata
Use a Message, Script, or Data Process shape to pull out the values you want.
The only important rule is this:
get the email into plain text form before sending to the agent.
Note: In above screenshot, I have just put the JSON message from my email to test the agent.
Step 3: Map the raw email into your JSON profile
Add a Map shape.
Set the Source to your extracted email structure,
and the Destination to the JSON profile you created earlier.
Map:
- from → from
- subject → subject
- plain-text body → bodyText
- attachments → attachments[]
After this step, you’re holding a beautifully clean JSON representation of the email – perfect for the AI Agent.
6. Create the AI Agent
Now we move to Agent Garden, where the intelligence lives.
Step 1: Create a new Agent
Name it:
Patient Query Classifier
In the agent description, spell out its purpose clearly:
You classify patient emails into one of the following categories:
- Appointment Request
- Prescription Refill
- Insurance/Billing
- General Medical Question
- Other
You base your decision on the subject, body text, and any contextual keywords.
When you create an agent in Boomi instead of Conversational Agent mode, select Structured Agent mode as the input to this agent is not going to be coming coming from user through Chat.

You need to add Input JSON Schema and Output JSON Schema to be able to proceed further.
This Input JSON is the input from your email you will be generation it in your Integration Process and Output schema would be the response you expect your AI Agent to provide you but in JSON format.
Step 2: Define the response format
Tell the agent exactly what structure it must return.
Agents perform best when the output shape is unambiguous.
Use something like:
{
"category": "Appointment Request | Prescription Refill | Insurance/Billing | General Question | Other",
"confidence": "High | Medium | Low",
"reason": "Explanation of why it fits this category",
"key_terms": ["keywords", "detected"]
}
This avoids free-form text, which is harder to automate downstream.
Step 3: Write the instructions
Your instructions guide the agent’s behaviour.
A clear instruction might say:
Read the email JSON.
Analyse the patient’s message based on subject, text, tone, and keywords.
Decide which category it belongs to.
Always respond using the JSON structure provided.
Do not include any additional text or commentary.
This keeps the agent predictable and easy to integrate into workflows.
7. Create a Prompt Tool
For Boomi AI Agent to work, it needs to be linked with the Tool
You will need two tools that need to be linked with the agent.
- Classify Email
- Extract Email Details
Classify Email Tool – Pass input parameters in the prompt tool setup which will be email body, email subject, attachment, sender. Pass all the description appropriate for your requirement
In this scenario, we will say read inbound email and classify patient query.
You will follow same steps for the Extract Email Details Prompt Tool.
then proceed further in the prompt section of the prompt tool write the instructions what the prompt tool should be doing along with the structured JSON that it needs to follow and respond.
8. Connect everything inside Boomi
Now we tie the pieces together.
Step 1: Add the Agent Connector
Place a Connector shape after your Map.
Choose the Boomi AI Agent connector.
Select your Patient Query Classifier.
Set the:
- Request profile → email JSON
- Response profile → classification JSON structure
Whatever JSON arrives at this connector becomes the agent’s input.
Step 2: Handle the agent’s response
After the connector, add a Stop shape or a Log shape.
You can expand this later:
- route the email to different queues
- trigger different processes
- escalate based on category
- store structured insights in a database
But for the tutorial, just capture the response.
Your foundation is complete.
9. Test your flow with examples
Here are some safe sample emails to test with:
Example 1: Appointment request
Subject: Book annual check-up
Body: I’d like to schedule my annual exam.
Expected output:
{
"category": "Appointment Request",
"confidence": "High",
"reason": "The email requests to schedule a check-up.",
"key_terms": ["schedule", "annual exam", "check-up"]
}
Example 2: Prescription refill
Subject: Medication refill
Body: Can I get a refill for my asthma inhaler?
Expected output:
{
"category": "Prescription Refill",
"confidence": "High",
"reason": "User asks to refill medication.",
"key_terms": ["refill", "medication", "inhaler"]
}
Example 3: Billing question
Subject: Insurance coverage
Body: Does my plan cover blood tests?
Expected output:
{
"category": "Insurance/Billing",
"confidence": "Medium",
"reason": "Message relates to insurance payments.",
"key_terms": ["insurance", "cover", "blood tests"]
}
10. What you can build next
Once this foundation is working, you can extend it in many ways:
- Route emails to different teams automatically
- Prioritise urgent or sensitive cases
- Draft responses automatically
- Create a dashboard of patient support trends
- Integrate with scheduling or prescription workflows
This is how small building blocks become big transformations.
I hope this helps to understand creating Structured Boomi AI Agent
For further learning on Boomi’s AI Agent, refer to these resources
https://developer.boomi.com/docs/BoomiAI/BuildingAIAgents/Building_AI_agents
