Core Concepts
Before building your first workflow, it helps to understand how the main pieces fit together.Triggers
Every workflow starts with a trigger: a specific event that causes it to begin. Triggers can be a new list record, an incoming email, a schedule, a manual action, or a step in another workflow.
Steps
Steps are the actions the workflow takes: updating a record, sending a notification, requesting an approval, running an agent, calling an external API, or branching based on a condition.
Conditions
Conditions let a workflow branch. Based on field values, approval decisions, or agent outputs, the workflow can follow different paths for different situations.
Audit Trail
Every workflow run is logged. You can see exactly which steps ran, what data passed through them, who took which action, and when — for every single execution.
Building an Approval Workflow
The most common workflow pattern in Pharen Hub is the approval loop: a record is created, routed to one or more reviewers, and approved or rejected — with each decision logged and the process continuing automatically.Name your workflow
Give the workflow a clear, process-oriented name like
invoice-approval or contract-review. This name is used when triggering the workflow from agents, App Builder apps, and code.Set the trigger
Click + Add Trigger and choose the event that starts this workflow. For an invoice approval, choose List record updated and configure it to fire when an invoice record’s status changes to
Pending Approval.Add an approval step
Click + Add Step → Approval. Configure:
- Assignee: The person, role, or dynamic expression (e.g., the
Managerfield on the record) that receives the approval request. - Context: Attach the relevant doc, list record, or file so the approver has everything they need.
- Deadline: An optional time limit. If the deadline passes with no action, the workflow can auto-escalate or auto-reject.
- Delivery: Send the approval request as a Hub notification, a channel message, an email, or all three.
Branch on the decision
After the approval step, add a Condition branching on the decision result:
- Approved: Continue to the next step (e.g., update the record status to
Approved, post to a channel, trigger an ERP transfer). - Rejected: Route back to the originator with a rejection reason, update the record status to
Returned, and optionally notify the submitter by email.
Add post-approval steps
Add steps for what happens after approval: update the record, send a confirmation email, post a channel message, or call an external API. Use the HTTP Request step to push data to your ERP, CRM, or any external system.
Automation Triggers
Workflows can be started by a wide range of events. Choose the right trigger for your process:- List events
- Mail events
- Schedule
- Manual & API
| Trigger | Description |
|---|---|
| Record created | Fires when a new record is added to a list |
| Record updated | Fires when any field (or a specific field) changes value |
| Status changed to | Fires when the Status field reaches a specific value |
| Record due | Fires a set time before or after a Date field |
| Record assigned | Fires when the Assignee field is set or changed |
Workflow Steps Reference
Approval
Approval
Request a human decision. Configure the assignee, context, deadline, and delivery channels. The workflow pauses until the approver acts. Returns
approved or rejected and an optional comment.Update Record
Update Record
Write new values to fields in any list record. Use dynamic expressions to pull values from the trigger payload or from previous steps — e.g., set
Approved By to the identity of the approver from the previous step.Send Notification
Send Notification
Send a Hub notification, a channel message, or an email. Supports templated messages using
{{field_name}} placeholders that are filled at runtime from the record or workflow context.Run Agent
Run Agent
Invoke a named AI agent as a workflow step. Pass the current record as context. The agent executes its task and returns a result that subsequent steps can use. For example: run the
invoice-processor agent to validate an invoice before routing it for approval.HTTP Request
HTTP Request
Make a GET, POST, PUT, or PATCH request to any external URL. Use this to push approved data to your ERP, call a payment API, update a CRM record, or integrate with any third-party system that exposes an API.
Condition / Branch
Condition / Branch
Branch the workflow based on any field value, approval decision, agent output, or HTTP response. Each branch continues independently and can rejoin at a later merge step if needed.
Wait / Delay
Wait / Delay
Pause the workflow for a set duration or until a specific datetime. Useful for reminder sequences: send a notification, wait 48 hours, and if no action has been taken, escalate.
Create Record
Create Record
Create a new record in any list. Useful for spawning sub-tasks, logging summaries, or creating output records from a workflow run.
Audit Trails
Every workflow execution generates a complete, immutable audit trail. This is not optional logging — it’s a first-class feature of Hub’s Functions layer.What’s Logged
For every workflow run, Hub records:- The trigger event and its full payload
- Each step that executed, in order
- The input and output data for each step
- The identity and timestamp of every human action (approval, rejection, manual trigger)
- Any errors or retries, with the error details
- The final outcome of the run
Accessing the Audit Trail
Open Run History
Click the Run History tab. You’ll see a list of every execution, sorted by most recent, with status (Completed, Failed, Pending, Cancelled) and duration.
Inspect a run
Click any run to open the execution detail view. Each step is shown as a timeline entry. Click a step to see its input, output, and timing. Approval steps show who acted and when.
Audit trail data is retained for the lifetime of your workspace. If your compliance requirements demand a specific retention period or external archival, use the Export function or the Audit API to pull logs to your own storage.
Notifications and Escalations
Workflows communicate with people through notifications. Hub gives you fine-grained control over how and when those messages are sent.Notification Channels
Each notification step can deliver to one or more channels simultaneously:- Hub notification — appears in the recipient’s in-app notification bell
- Channel message — posts to a named channel, optionally with an
@mention - Email — sends to the recipient’s connected email address
- Mobile push — sends a push notification to the Hub mobile app
Escalation Patterns
Deadline-based escalation
Deadline-based escalation
Set a deadline on any approval step. If the deadline passes without action:
- The workflow checks the escalation rule.
- It reassigns the approval to the escalation target (e.g., the approver’s manager).
- It sends a new notification with context about the missed deadline.
- It logs the escalation in the audit trail.
Reminder sequences
Reminder sequences
Use a Wait step followed by a Condition step to build reminder sequences:
- Send the initial approval request.
- Wait 24 hours.
- Check: has the record’s
Approval Statuschanged? - If not, send a reminder notification.
- Wait another 24 hours.
- If still pending, escalate.
Real-World Use Cases
Invoice Processing
Manual invoice handling is one of the highest-friction processes in most organizations. Hub reduces it from ~15 minutes per invoice to ~2 minutes.Extract
The
invoice-processor AI agent uses OCR to extract vendor, amount, line items, due date, and PO number from the attached PDF — in under 60 seconds.Create record
The agent creates a record in the Invoice list with all extracted fields populated and sets the status to
Pending Approval.Route
The
invoice-approval workflow triggers. Based on the amount, it routes to the appropriate approver tier (under €5,000 → team lead, €5,000–€50,000 → finance manager, above €50,000 → CFO).Approve
The approver receives a notification with the full invoice context and a one-click approve button — accessible from web or mobile.
Insurance Claims Triage
Hub’s AI triage cuts claim capture and initial review time dramatically.- A new claim arrives (email, form, or direct API post).
- The AI agent reads submitted documents in under 1 minute, extracting claim type, claimant, amount, and supporting evidence quality.
- Claims are scored for urgency and completeness and sorted into a prioritized queue.
- Adjusters work the queue in order — no manual sorting, no missed claims.
- Each step is logged for regulatory audit purposes.