Skip to main content
A Unified App uses two files: This example creates a customer. It assumes your workspace has a CRM service with a createCustomer operation that accepts name and email and returns id. Replace the example service reference, version, and operation with the exact values in your workspace.

1. Create the files

Save customer-app.ts and customer-app.yaml together in .fused/unified_app/. The TypeScript defines your action; the YAML selects the operations it can call.
Use the service’s full reference, including its provider. The app can call only the operations you select. bucket: default tells Fused where to find credentials; keep the credential values in the bucket. Use the same service reference in both files. Fused checks the request against input, runs execute, then checks the returned value against output. You do not need a database call to return a result. Add stored execution data only when you need it.

2. Deploy and call

plan checks and compiles the source. apply deploys it. Save the returned app_family_id and execution token, then call the app with input matching your schema—for this example, {"name":"Jane","email":"jane@example.com"}. After changing the source or selected operations, increase the version and deploy again.

Use a connected user’s account

For OAuth services, connect the user first. In your function, use fused.forUserRef(userRef).serviceName.operationName(input) from @fused/operations. The user reference selects their connection in the configured bucket; it does not contain their provider token.