Skip to main content
This page showcases complete FlowApp implementations from the Iqra AI codebase.

Cal.com integration

The Cal.com FlowApp demonstrates a full-featured integration with multiple actions, dynamic fetchers, and conditional schemas.

App definition

IqraInfrastructure/Managers/FlowApp/Apps/CalCom/CalComApp.cs
Key patterns:
  • Shared HttpClient factory: The CreateClient() helper method is used by all actions and fetchers
  • Base URL constant: Centralized API endpoint configuration
  • DI integration: Leverages IHttpClientFactory and ILogger<T>

Action with multiple output ports

The BookMeetingAction handles different API response codes with specific output ports:
IqraInfrastructure/Managers/FlowApp/Apps/CalCom/Actions/BookMeetingAction.cs
Key patterns:
  • Multiple output ports: success, conflict, and error allow the agent to handle different scenarios
  • Optional fields: Uses TryGetProperty for optional inputs like notes and attendeePhone
  • Polymorphic input handling: Supports three different booking methods (by ID, by username, or by team)
  • Structured error responses: Returns specific error codes and messages

Schema with conditional fields

The BookMeeting.json schema demonstrates oneOf for mutually exclusive field groups:
IqraInfrastructure/Managers/FlowApp/Apps/CalCom/Actions/BookMeeting.json
Key patterns:
  • Common base properties: Fields like start, attendeeName, attendeeEmail are always required
  • Optional fields: attendeeTimeZone has a default value
  • oneOf variants: Three mutually exclusive ways to target an event type
  • Dynamic fetcher: x-fetcher connects the field to a data source

Data fetcher with authentication

IqraInfrastructure/Managers/FlowApp/Apps/CalCom/Fetchers/GetEventTypesByIdFetcher.cs
Key patterns:
  • Null check: Returns empty list if integration is not provided
  • Error tolerance: Catches all exceptions and returns empty list (prevents UI errors)
  • Rich labels: Combines title and duration for better UX (“30min Consultation (30m)”)
  • API versioning: Uses version headers for API compatibility

Common patterns

Pattern: Handling optional fields

Pattern: Returning structured data

Pattern: Multiple authentication methods

Pattern: Context-dependent fetcher

Pattern: Rate limit handling

Pattern: Pagination support

Pattern: Webhook registration

Testing FlowApps

Create unit tests for your actions:

Next steps

Overview

Review the FlowApp architecture and concepts

Creating FlowApps

Build your own FlowApp integration