Incoming Webhooks
How incoming webhooks work
This guide explains how to set up incoming webhooks for your integration. The process involves the following steps:
Creating a Flow: A user creates a new flow in FlowMate using the Integration Center or Integration Portal. Each flow is assigned a unique ID, such as
1234.Retrieving Flow ID: As a FlowMate Partner, retrieve all active flows via the API to get the flow IDs associated with the users who have activated a flow.
Matching Flows to Users: Next, you will need to match each active flow to a user within your system. ****
Configuring the Webhook: Now that you know the user's identity, you can configure a webhook for them within your system to send data to their flow at
https://api.platform.openintegrationhub.com/webhooks/{flowId}Executing Webhooks: Any valid requests sent to the flow’s webhook URL will now cause the flow to execute with the payload in the request.
Setting up incoming webhooks
Retrieve all active flows
To retrieve the active flows for your users, perform a GET request to the endpoint:
GET https://api.platform.openintegrationhub.com/flows
Query Params
page[size]
integer
Amount of flows per page returned. Default is 10.
page[number]
integer
Number of the page to be returned. Default is 1.
filter[status]
string
Filter results by flow status. Accepts either string ('active' and 'inactive') or integer (1 or 0)
The response will include a list of flows, each associated with a flow id and a user id. For example:
{
"data": [
.....
{
"id": "6762e154616e91cb8d8b1aaf",
"owners": [
{
"id": "636d0762bd257a7eb2373d6c",
"type": "user"
},
{
"id": "636d0762bd257a7eb2373d6a",
"type": "tenant"
}
]
}
]
}Flow ID: The
idfield (e.g.,6762e154616e91cb8d8b1aaf) at the top level of each flow object.User ID: The
idfield in theownersarray wheretypeisuser(e.g.,636d0762bd257a7eb2373d6c).
Use these values to identify the flow and its associated user.
Retrieve Username Associated with Flow
The user ID from the previous response is the internal ID used by FlowMate and may differ from the user ID your system recognizes. To retrieve the username (which corresponds to the user ID in your system), perform a GET request to the endpoint:
GET https://api.platform.openintegrationhub.com/users/
The response will include the user's details, such as:
Response:
{
"_id": "636d0762bd257a7eb2373d6c",
"username": "your-userId",
"status": "ACTIVE",
"confirmed": true,
"canLogin": false,
"tenant": "61233456678764",
"roles": [],
"permissions": [
"flows.read",
"tenant.flows.update",
"flows.update",
"flows.delete",
"flows.control",
"icenter.read",
"icenter.write",
"secrets.create",
"secrets.read",
"secrets.delete",
"templates.read",
"components.read",
"components.write"
],
"createdAt": "2023-11-09T20:46:58.652Z",
"updatedAt": "2023-11-09T20:46:58.652Z",
"__v": 0,
"safeguard": {
"failedLoginAttempts": 0,
"lastLogin": "2024-12-30T13:30:27.529Z"
}
}Configure Webhook to FlowMate
Within your system’s webhook functionality, create and configure a webhook to send relevant data as a POST request to the webhook url using the user’s flow ID:
POST https://api.platform.openintegrationhub.com/webhooks/{flowId}
You can send payload data via POST request using JSON in the request body, which will then be processed in the flow.
Last updated