Sea12Docs
Getting Started

Quickstart

End-to-end walkthrough building a Steel Order Quoting System with Gmail input, schematization, script-based pricing, and Gmail reply.


This guide walks you through building a complete automation from scratch. By the end you will have a process that:

  1. Monitors a Gmail inbox for incoming steel order requests
  2. Extracts structured data (customer name, steel type, weight in lbs) from the email body using AI
  3. Calculates a quote based on the extracted weight
  4. Replies to the original email thread with the quote

Prerequisites

  • A connected Gmail account (OAuth or Service Account) under Settings > Service Accounts
  • At least one LLM provider configured (OpenAI or Anthropic)

1

Create the Schema

A schema defines the shape of data your process works with. For this system you need two data blocks: one for the incoming request and one for the outgoing quote.

  1. Navigate to Schemas and click New Schema.
  2. Name it Steel Order.

Data Block: Order Request

Create a data block called Order Request with these data points:

FieldTypeDescription
customer_namestringName of the requesting customer
customer_emailstringEmail address of the customer
steel_typestringType of steel requested (e.g., carbon, stainless, alloy)
weight_lbsnumberWeight of steel requested in pounds
urgencyenumstandard, rush, emergency

Data Block: Quote

Create a second data block called Quote with these data points:

FieldTypeDescription
price_per_lbnumberPrice per pound for the steel type
total_pricenumberCalculated total price
estimated_deliverystringEstimated delivery date
notesstringAny additional notes

2

Create the Process

  1. Navigate to Processes and click New Process.
  2. Name it Steel Order Quoter.

You are now in the visual workflow editor. You will add four nodes and connect them left to right.


3

Add the Gmail Input Node

This node monitors your inbox for order requests.

  1. Open the Node Palette (left sidebar) and drag an Input node onto the canvas.
  2. Click the node to open its configuration.
  3. Set the following:
SettingValue
TypeGmail
Auth MethodOAuth (or Service Account)
AccountSelect your connected Gmail account
Sender Filter*@steelcustomer.com
Subject Filterorder, quote, steel
Polling Interval30
Convert to Plain TextEnabled
LabelEmail Input

When this node triggers, it outputs data in this shape:

Output JSON
{
  "id": "msg_abc123",
  "thread_id": "thread_xyz789",
  "sender": "buyer@steelcustomer.com",
  "recipients": ["orders@yoursteel.com"],
  "subject": "Steel Order Request - 5000 lbs Carbon Steel",
  "body": "Hi, we need a quote for 5000 lbs of carbon steel...",
  "date": 1712937600
}
The thread_id is critical — you will template it into the output node to reply in the same thread.

4

Add the Schematization Node

This node uses an LLM to extract structured data from the raw email body into your Order Request data block.

  1. Drag a Schematization node onto the canvas.
  2. Connect the Email Input output port to the Schematization input port.
  3. Open the configuration:
SettingValue
SchemaSteel Order
Data BlocksOrder Request
Modelgpt-4o
Provideropenai
System PromptExtract the steel order details from this email. If the customer name is not explicit, use the sender name. Map urgency based on keywords like "rush", "ASAP", "urgent".
LabelExtract Order

After execution, this node outputs:

Output JSON
{
  "Order Request": {
    "customer_name": "John Smith",
    "customer_email": "buyer@steelcustomer.com",
    "steel_type": "carbon",
    "weight_lbs": 5000,
    "urgency": "standard"
  }
}

Each data block name becomes an output handle, so downstream nodes reference the data as Extract Order.Order Request.weight_lbs.


5

Add the Script Node (Quote Calculator)

This node runs a Python script to calculate the quote based on the extracted weight and steel type.

  1. Drag a Script node onto the canvas.
  2. Connect Extract Order to the Script node.
  3. Open the configuration and set Label to Calculate Quote, Output Type to text.

Enter this Python code:

Python
# Price table (per lb)
prices = {
    "carbon": 0.45,
    "stainless": 1.20,
    "alloy": 0.85,
    "galvanized": 0.65,
    "tool": 2.10
}

# Extract fields from the upstream schematization node
order = input_data["Extract Order"]["Order Request"]
steel_type = (order.get("steel_type") or "carbon").lower()
weight = float(order.get("weight_lbs") or 0)
urgency = order.get("urgency") or "standard"

# Look up price
price_per_lb = prices.get(steel_type, 0.50)

# Urgency multiplier
multiplier = 1.0
if urgency == "rush":
    multiplier = 1.25
elif urgency == "emergency":
    multiplier = 1.50

# Calculate
total = weight * price_per_lb * multiplier

# Delivery estimate
delivery = "10-14 business days"
if urgency == "rush":
    delivery = "5-7 business days"
elif urgency == "emergency":
    delivery = "2-3 business days"

# Return structured result
return {
    "price_per_lb": price_per_lb,
    "total_price": round(total, 2),
    "estimated_delivery": delivery,
    "weight_lbs": weight,
    "steel_type": steel_type,
    "urgency": urgency,
    "customer_name": order.get("customer_name")
}

After execution, this node outputs:

Output JSON
{
  "output": {
    "price_per_lb": 0.45,
    "total_price": 2250.00,
    "estimated_delivery": "10-14 business days",
    "weight_lbs": 5000,
    "steel_type": "carbon",
    "urgency": "standard",
    "customer_name": "John Smith"
  }
}

6

Add the Gmail Output Node (Reply)

This node replies to the original email thread with the calculated quote.

  1. Drag an Output node onto the canvas.
  2. Connect Calculate Quote to the Output node.
  3. Open the configuration:
SettingValue
TypeGmail
Auth MethodSame as input
AccountSame Gmail account
Reply Modereply
Thread ID{{input["Email Input"]["thread_id"]}}
SubjectRe: {{input["Email Input"]["subject"]}}
LabelSend Quote

For the Body, use templates to pull data from both upstream nodes:

Email Body Template
Hi {{input["Calculate Quote"]["customer_name"]}},

Thank you for your inquiry. Here is your quote:

Steel Type: {{input["Calculate Quote"]["steel_type"]}}
Weight: {{input["Calculate Quote"]["weight_lbs"]}} lbs
Price per lb: ${{input["Calculate Quote"]["price_per_lb"]}}
Total Price: ${{input["Calculate Quote"]["total_price"]}}
Estimated Delivery: {{input["Calculate Quote"]["estimated_delivery"]}}

This quote is valid for 30 days. Reply to this email to confirm your order.

Best regards,
Steel Orders Team
The key template here is {{input["Email Input"]["thread_id"]}} in the Thread ID field. This tells the Gmail output node to reply within the same email conversation rather than starting a new thread.

7

Connect and Test

Your final graph looks like this:

[Email Input] → [Extract Order] → [Calculate Quote] → [Send Quote]

Manual Test

  1. Click Start on the process toolbar.
  2. Send a test email to the monitored inbox:
    Subject: Steel Order Request - Carbon Steel
    Body: Hi, I need a quote for 5000 lbs of carbon steel.
          This is for our warehouse expansion project.
          Standard delivery timeline is fine.
          Thanks, John Smith
  3. Watch the Execution History panel on the right side of the editor.
  4. Each node will turn green as it completes.
  5. Check the Gmail inbox — a reply should appear in the same thread.

Inspect Node Output

Click any completed node in the execution history to see:

  • Input Data: What the node received
  • Output Data: What it produced
  • Timing: Start time, duration
  • Errors: If anything went wrong

8

Production Considerations

Error Webhook

Set an error webhook URL on the process to get notified when executions fail:

  1. Open process settings.
  2. Set Error Webhook URL to your monitoring endpoint.
  3. Failed executions will POST error details including the failed node and error category.

Locking

Lock the process to prevent accidental edits while it runs in production:

  1. Click the Lock icon in the process toolbar.
  2. Only users with write access can unlock it.

Versioning

Save a version snapshot before making changes:

  1. Click Versions in the toolbar.
  2. Click Create Version with a label like v1.0 - initial release.
  3. You can restore to any previous version if a change breaks something.

Template Reference (Quick)

Templates use double curly braces and bracket notation to reference upstream node data:

PatternExample
Field reference{{input["Node Label"]["field_name"]}}
Nested field{{input["Node Label"]["address"]["city"]}}
Array element{{input["Node Label"]["items"][0]}}
File reference{{input["files"]["Node Label"][0]["name"]}}
Built-in function{{now("2006-01-02")}}
Default value{{default(input["Node"]["field"], "N/A")}}
UUID generation{{uuid()}}

See Data Flow and Templates for the full reference.


Next Steps