# Set up a workflow

Walk through defining triggers, actions, and templates for AI Flows.

## What a workflow does

A workflow (AI Flow) watches for matching emails and runs the steps you describe. Think of it as an IF → THEN automation:

- IF certain emails arrive (by sender, subject, or intent)
- THEN Jace drafts replies, creates events, looks up info, or updates connected tools

You set the conditions once and Jace repeats them every time they’re met.

## Open the Workflows page

1. In Jace, open the left sidebar.
2. Click **Workflows**.
3. Review the AI Flows list, then click **Create new**.

## Step 1 – Define the trigger

### Name the workflow

Under **Workflow name**, enter a short title such as “New patient inquiries”, “Partnership requests”, or “Newsletter summaries”. Keep it clear so you can find it later.

### Tell Jace which emails to watch

In **IF emails match…**, describe the emails in plain language. You can reference:

- Sender: “emails from @company.com”
- Subject: “subject includes ‘partnership’ or ‘collaboration’”
- Content or intent: “emails where someone wants to book a meeting”

Example inputs:

- “Emails from @university.edu asking about research or collaboration.”
- “Any email from new patients asking for a first appointment or consultation.”

Click **Next: Define actions →** when you finish the trigger.

## Step 2 – Choose actions and tools

### Select the tools Jace can use

On **Define actions & tools**, enable only what the flow needs:

- Create email drafts
- Create calendar events
- Search the web
- Optional integrations: Notion, Slack, Google Drive, Asana, Monday, HubSpot, and more once connected

Disable tools that aren’t relevant to avoid unexpected behavior.

### Write the action instructions

Use **Action instructions** to spell out what happens after a match. Cover:

- Goal and tone (“professional and friendly”)
- Steps to follow or templates to mirror
- When and how to create calendar events
- Any extra context, links, or formatting to include

#### Example – meeting request flow

“When someone emails to schedule a meeting:

- Draft a polite, professional reply confirming my interest.
- Suggest 2–3 time slots on weekdays between 9:00 and 15:00 my time.
- If the sender suggests a time, accept it if my calendar is free; otherwise offer nearby alternatives.
- Create a 45-minute calendar event titled ‘Meeting with \[Sender Name\]’ and include the email thread in the description.
- Do not send emails automatically; create drafts for my review.”

#### Example – new patient flow

“For emails from potential new patients:

- Draft a reply thanking them for reaching out.
- Ask for full name, date of birth, and preferred appointment time.
- Briefly explain how our clinic works and include this link to our intake form: \[link\].
- If they mention dates, propose the closest suitable slots from my calendar.
- Create a 30-minute placeholder event titled ‘New patient – \[Name if provided\]’ on the best matching date.”

### (Optional) Upload documents

Use **Upload a document** for reference material such as pricing sheets, FAQs, playbooks, or canned responses. Jace will consult them when drafting.

### Drafts vs. automatic sending

Decide how emails send at the bottom of the page:

- **Off (default)** – Jace only creates drafts for review.
- **On** – Jace can send responses automatically when confident.

Most teams start with drafts, review the results, then turn on automatic sending later.

Click **Create automation** to finish the setup.

## Review and edit flows

After saving, you’ll see a confirmation card showing the flow name, IF and THEN summaries, enabled tool icons, and whether emails send automatically.

To edit later:

1. Return to **Workflows → AI Flows**.
2. Find your flow in the list.
3. Click the **…** menu to edit or delete.

Adjust triggers, instructions, or tools anytime as you learn how the automation performs.

## Ready-made text you can paste

### Meeting requests

“When an email is clearly about scheduling a meeting or call:

- Reply in a professional, friendly tone.
- Propose 2–3 meeting times on weekdays between 9:00 and 15:00 my time.
- If the sender suggests a time, accept it if my calendar is free; otherwise offer the nearest alternatives.
- Create a 45-minute calendar event titled ‘Meeting with \[Sender Name\]’ and include a short summary of the purpose in the description.
- Save the email as a draft for my review, do not send automatically.”

### New inquiries (general)

“When someone contacts us for the first time with a question about our services:

- Thank them for reaching out and answer their question as clearly as possible.
- If relevant, invite them to schedule a call and propose 2–3 time slots.
- Keep the tone professional and approachable.
- Add any useful links (website, pricing, booking).
- Create an email draft for my review.”
