Skip to main content
This guide walks through creating a complete FlowApp from scratch. We’ll build a Cal.com integration as our example.

Project structure

FlowApps are located in IqraInfrastructure/Managers/FlowApp/Apps/:

Step 1: Create the main app class

Create a class that implements IFlowApp:
IqraInfrastructure/Managers/FlowApp/Apps/CalCom/CalComApp.cs
The AppKey must be unique across all FlowApps. Use lowercase snake_case by convention.

Constructor dependencies

You can inject any registered service:
  • IHttpClientFactory - For making HTTP requests
  • ILogger<T> - For logging
  • Custom services from your DI container

Step 2: Define an action

Actions perform the actual work. Create a partial class implementing IFlowAction:
IqraInfrastructure/Managers/FlowApp/Apps/CalCom/Actions/BookMeetingAction.cs
Always mark action classes as partial - the GetInputSchemaJson() method is auto-generated by the FlowAppSchemaGenerator.

Output ports

Output ports define the possible execution paths:
IqraInfrastructure/Managers/FlowApp/Apps/CalCom/Actions/BookMeetingAction.cs:24-32
  • success: API call succeeded
  • conflict: Specific error case (slot unavailable)
  • error: Generic failure (handled automatically by ActionExecutionResult.Failure)

Step 3: Create the JSON schema

Create a schema file with the same base name as your action (e.g., BookMeetingAction.cs → BookMeeting.json):
IqraInfrastructure/Managers/FlowApp/Apps/CalCom/Actions/BookMeeting.json
The x-fetcher property links a field to a data fetcher for dynamic dropdowns. See Schema Definition for details.

Step 4: Create a data fetcher

Data fetchers populate dynamic dropdowns:
IqraInfrastructure/Managers/FlowApp/Apps/CalCom/Fetchers/GetEventTypesByIdFetcher.cs
The context parameter contains the current form state, allowing dependent fetchers:

Step 5: Build and test

1

Build the project

The FlowAppSchemaGenerator runs at build time and generates the GetInputSchemaJson() method:
Generated code
2

Verify discovery

Check the logs on startup:
If your app isn’t discovered, verify:
  • Class implements IFlowApp
  • Class is not abstract or an interface
  • Class is in the same assembly as FlowAppManager
3

Test in the UI

  1. Configure credentials in the admin dashboard
  2. Create a new agent script
  3. Add your FlowApp action to the flow
  4. Fill in the form and test execution

Public apps (no authentication)

For apps that don’t require credentials:
Set RequiresIntegration = false in your actions:

Best practices

  • Good: BookMeeting, GetEventTypes, SendEmail
  • Bad: Action1, Fetch, DoStuff
Keys appear in logs and error messages.
Use specific ports for common error cases:
This allows agents to handle errors gracefully.
Include relevant data in the result for downstream nodes:
Implement retry logic with exponential backoff:
Use structured logging:

Next steps

Schema definition

Learn advanced schema features like conditional fields, dynamic fetchers, and custom validation