Real-world integration scenarios
See how teams use Weavz for stateful AI agents, customer onboarding, real-time automation, and compliance. From Code Mode and Human Gates to Filesystem, State KV, Sandbox execution, webhooks, and self-service portals.
Customer Onboarding
New customers connect their tools through a hosted popup. Give them a self-service portal to manage connections. Every user gets a unified identity record.
- Generate connect token
- Customer authorizes via popup
- Portal token created automatically
Customer signs up
End user identity created
OAuth popup opens
Hosted connect flow
Portal access granted
Self-service management
AI Sales Assistant
Your AI agent monitors Salesforce deals, uses State KV for follow-up checkpoints, drafts emails via Gmail, and routes high-risk sends through Human Gates.
- Get Salesforce deals
- Check State KV follow-up cursor
- Approve sensitive Gmail sends
- Post to Slack channel
// AI Sales Assistant — Code Mode MCP
const lastScan = await weavz.state.get({
key: "sales:last-follow-up-scan",
});
const deals = await weavz.salesforce.get_records({
object: "Opportunity",
conditions: "StageName = 'Negotiation'",
});
// Draft follow-up for each stale deal
for (const deal of deals.records) {
const daysSince = (Date.now() - new Date(deal.LastActivityDate).getTime())
/ (1000 * 60 * 60 * 24);
if (daysSince > 7) {
// A Human Gates policy can pause this customer-facing send.
await weavz.gmail.send_email({
to: deal.ContactEmail,
subject: `Following up on ${deal.Name}`,
body: `Hi, just checking in on ${deal.Name}...`,
});
}
}
// Weekly pipeline summary to Slack
const total = deals.records.reduce((s, d) => s + d.Amount, 0);
await weavz.office_slack.send_channel_message({
channel: "#sales",
text: `Pipeline: ${deals.records.length} deals, $${total.toLocaleString()}`,
});
await weavz.state.put({
key: "sales:last-follow-up-scan",
value: { scannedAt: Date.now(), previous: lastScan.value },
});Multi-Tenant SaaS
Each customer workspace gets its own integration config, scoped API keys, and enforced parameter presets. Full tenant isolation without building it yourself.
- Create workspace per customer
- Scope API keys to workspace
- Enforce parameter presets
Real-Time Notifications
Subscribe to webhook events from Stripe or GitHub. When something happens, your handler fires automatically — no polling, no cron jobs.
- Enable Stripe webhook trigger
- Receive real-time events
- Send Slack notification
// Enable a webhook trigger
const trigger = await client.triggers.enable({
integrationName: "stripe",
triggerName: "new_payment",
workspaceId: "550e8400-e29b-41d4-a716-446655440000",
input: { events: ["payment_intent.succeeded"] },
callbackUrl: "https://your-app.com/webhooks/stripe",
});
// Your webhook handler
app.post("/webhooks/stripe", async (req) => {
const payment = req.body;
// Notify the team
await client.actions.execute("slack", "send_channel_message", {
workspaceId: "550e8400-e29b-41d4-a716-446655440000",
integrationAlias: "office_slack",
input: {
channel: "#payments",
text: `New payment: $${payment.amount / 100}`,
},
});
});Data Pipeline Automation
Sync data between Google Sheets and Airtable, transform records in Sandbox, persist logs to Filesystem, and keep cursors in State KV.
- Read Google Sheets rows
- Transform in Sandbox
- Persist to Filesystem
- Checkpoint in State KV
// Data Pipeline — Code Mode MCP
const rows = await weavz.google_sheets.get_rows({
spreadsheet_id: "1BxiMVs...",
sheet_name: "Leads",
range: "A:D",
});
// Normalize and validate rows in Sandbox before writing.
await weavz.sandbox.run_code({
language: "javascript",
code: "/* normalize rows, validate emails, remove duplicates */",
});
// Sync to Airtable
let synced = 0;
for (const row of rows.values) {
await weavz.airtable.create_record({
base_id: "appXyz...",
table_name: "Leads",
fields: { Name: row[0], Email: row[1], Company: row[2] },
});
synced++;
}
// Persist sync log to Filesystem
await weavz.files.write_file({
path: `sync-logs/${new Date().toISOString().slice(0,10)}.json`,
content: JSON.stringify({ synced, timestamp: Date.now() }),
});
await weavz.state.put({
key: "pipelines:leads:last-run",
value: { synced, ranAt: Date.now() },
});Compliance & Audit
Track every action execution, enforce parameter values per workspace, gate sensitive work for human review, and use your own OAuth credentials for compliance.
- Every action logged automatically
- Enforced parameters prevent misuse
- Human Gates capture reviewer decisions
- Custom OAuth apps for your branding
Approval-Gated Agent Work
Let agents move quickly on routine tasks while refunds, outbound emails, CRM updates, exports, and other sensitive steps wait for a reviewer.
- Create approval policy
- Pause sensitive execution
- Reviewer approves, rejects, or edits
- Resume with audit trail
Sensitive action flagged
stripe.refund_payment
Reviewer checks context
Approve, reject, or edit input
Execution resumes
Audit trail kept with decision
API / SDK / MCP / trigger execution resumes after decision
E-Commerce Operations
Trigger on new Shopify orders via webhook. Cross-reference Stripe payments and alert on high-value transactions.
- Get Shopify orders
- Retrieve Stripe payment
- Send Slack alert
// E-Commerce Ops — trigger on new orders
// First, enable a Shopify webhook trigger:
// client.triggers.enable({ triggerName: "new_order", ... })
// Then in your handler — Code Mode MCP
const orders = await weavz.shopify.get_orders({
status: "any",
created_at_min: new Date(Date.now() - 86400000)
.toISOString(),
});
for (const order of orders) {
// Cross-reference with Stripe
if (order.payment_gateway_names.includes("stripe")) {
const payment = await weavz.stripe.retrieve_payment_intent({
payment_intent_id: order.checkout_token,
});
// Alert on high-value orders
if (order.total_price > 500) {
await weavz.office_slack.send_channel_message({
channel: "#high-value",
text: [
`High-value order #${order.order_number}`,
`Amount: $${order.total_price}`,
`Customer: ${order.customer.email}`,
`Stripe: ${payment.status}`,
].join("\n"),
});
}
}
}Build your own integration workflow
20,000 free actions/month. No credit card required.