Flow Sharing and Connections
Once you've created a Flow in Cognipeer, you can maximize its value by sharing it with others and integrating it with various systems. This guide explains how to share your Flows, use them with Peers, and integrate them with external systems.
Sharing Flows
Cognipeer offers flexible sharing options to control who can access and use your Apps.
Sharing Settings
When saving or updating a Flow, you can choose from the following visibility settings:
- Private: Only you can access and use the App
- Shared: Specific users or teams can access the App
- Public: All users in your workspace can access the App
How to Share a Flow
- Navigate to the Flows section in the sidebar (may be labeled Apps)
- Find the Flow you want to share and click on the Settings icon
- Select Sharing Settings
- Choose the appropriate visibility level
- If selecting "Shared," specify the users or teams who should have access
- Click Save to apply the sharing settings
Permissions
When sharing Apps, you can assign different permission levels:
- View: Users can see and execute the App but cannot modify it
- Edit: Users can view, execute, and modify the App
- Manage: Users have full control, including the ability to change sharing settings
Integrating Flows with Peers
One of the most powerful features of Cognipeer Apps is their ability to be used as tools by Peers, extending the Peers' capabilities.
Adding a Flow as a Peer Tool
- Navigate to the Peers section in the sidebar
- Select the Peer you want to enhance
- Go to the Tools tab
- Click Add Tool
- Select Flow (or App) from the tool type options
- Choose the Flow you want to add from the dropdown list
- Configure any additional settings
- Click Save to add the App as a tool
How Peers Use Flows
When a Peer has access to an App as a tool:
- During conversations, the Peer can identify when the App's functionality would be helpful
- The Peer can invoke the App, providing the necessary inputs based on the conversation context
- The App executes its workflow and returns the results
- The Peer incorporates these results into its response to the user
This integration allows Peers to leverage complex workflows and external integrations without requiring users to manually execute Flows.
API Access
Cognipeer provides API endpoints that allow you to execute Flows programmatically, enabling integration with external systems. Both legacy App and new Flow endpoints are available.
API Endpoints
The following endpoints are available for Flow execution:
Execute Flow
POST /v1/flow/execute/:appIdLegacy endpoint (still supported):
POST /v1/app/execute/:appIdAuthentication: Bearer token with apps.run permission
Request Body:
{
"inputs": {
"input1": "value1",
"input2": "value2"
// App-specific inputs
}
}Response:
{
"outputs": {
"output1": "result1",
"output2": "result2"
// App-specific outputs
},
"executionId": "execution_id"
}Get Execution Status
GET /v1/apprun/:executionIdResponse:
{
"status": "completed", // "completed", "running", "failed"
"outputs": {
// If completed, contains the outputs
},
"error": "Error message" // If failed
}Authentication
API requests require authentication using an API token. Include the token in the Authorization header:
Authorization: Bearer YOUR_API_TOKENYou can generate API tokens in the Settings > API Tokens section of your Cognipeer dashboard.
Webhooks
Flows can both send data to external systems via webhooks and receive data through webhook endpoints.
Outbound Webhooks
Use the HTTP Request step in your Flow to send data to external webhook endpoints:
- Add an HTTP Request step to your App
- Configure it with the webhook URL and appropriate method (usually POST)
- Format the data as required by the receiving system
- Execute the step as part of your App workflow
Inbound Webhooks
Cognipeer can generate unique webhook URLs for your Flows, allowing external systems to trigger them:
- Navigate to the Flows section
- Select your Flow and go to Settings
- Select Webhook Settings
- Enable the Accept Webhook Triggers option
- Copy the generated webhook URL
- Configure your external system to send data to this URL
When the webhook is triggered, the Flow will execute with the data provided in the webhook payload as inputs.
Scheduled Execution
Flows can be scheduled to run automatically at specified intervals:
- Navigate to the Flows section
- Find the Flow you want to schedule and click on the Settings icon
- Select Schedule Settings
- Enable scheduling and configure the frequency (hourly, daily, weekly, etc.)
- Specify the default input values to use for scheduled runs
- Click Save to apply the schedule
This feature is particularly useful for regular data processing, report generation, or system synchronization tasks.
Best Practices
- Document Your Flows: Create clear documentation for your Flows, including required inputs and expected outputs
- Version Control: Consider creating new versions of Flows when making significant changes
- Error Handling: Implement robust error handling in your Flows, especially when integrating with external systems
- Security Considerations: Be mindful of data security when sharing Apps and integrating with external systems
- Performance Optimization: Design Apps to be efficient, especially if they will be used frequently or by multiple users
By effectively sharing and integrating your Flows, you can create a powerful ecosystem of automated workflows that enhance productivity and enable sophisticated AI-powered solutions across your organization.

