Overview
This guide outlines best practices for integrating FlowMate into your application using the FlowMate API. The integration process consists of the following key steps:
The FlowMate integration follows a structured process, from creating a flow to executing it with real data. Below is a high-level overview of how it works:
1234.To effectively integrate with the FlowMate API, it's important to understand the key steps involved. The process follows a structured approach to retrieving user and flow data, processing the relevant payload, and triggering flows for execution.
<aside> 💡
The technical process at a high level involves the following steps:
Each user in FlowMate has 2 ids. One is the user id that your system passes to us and the other is a FlowMate internal user id. The FlowMate API works with the FlowMate internal user ID.
*<https://api.platform.openintegrationhub.com/users/*>
Every user in FlowMate has 2 different ids. One is the user id that your system passes to us and the other is a FlowMate internal user id. The FlowMate API works with the FlowMate internal user ID.
Start by retrieving active users. You need the user information to match them with the corresponding flows and ensure that the right data is processed.
To retrieve all active users, perform a GET request to the following endpoint:
<aside>
GET https://api.platform.openintegrationhub.com/users/
</aside>
Query Params:
| Parameter | Type | Description |
|---|---|---|
username |
string | Filter by username. The user name is the ID that you give us, respectively your system’s identifier |
meta |
boolean | Set to true to receive response in data/meta format |
To retrieve the FlowMate internal user id (_id) of a specific user, use the user parameter and filter for the username:
<aside>
GET https://api.platform.openintegrationhub.com/users?username={user-id}
</aside>
The response contains key user details that help identify and manage active users. The most relevant fields include:
_id: The internal FlowMate user ID, which uniquely identifies the user within FlowMate.username: The user ID that corresponds to your system’s identifier.status: Indicates whether the user is currently active.Response:
{
"id": "string",
"username": "string",
"status": "ACTIVE",
"confirmed": true,
"canLogin": false,
"tenant": "string",
"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"
}
}
*<https://api.platform.openintegrationhub.com/flows*>
Once you have identified the active users, the next step is to retrieve their associated flows. In a single request, you can get all active flows for a user, including the necessary payload data for further processing.
To retrieve all active flows associated with a user, perform a GET request:
<aside>
GET https://api.platform.openintegrationhub.com/flows
</aside>
Query Params
| Parameter | Type | Description |
|---|---|---|
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) |
filter[user] |
string | Filter by user. Works for admin or users with same tenant. |
To retrieve all active flows associated with a user apply the following filters:
filter[status]=activefilter[user]=_idExample Request:
<aside>
GET https://api.platform.openintegrationhub.com/flows?filter[status]=active&filter[user]={_id}
</aside>
The response provides a list of flows, each linked to a specific user and tenant:
id field (e.g., 6762e154616e91cb8d8b1aaf) at the top level of each flow object, which uniquely identifies the flow.Response:
{
"data": [
.....
{
"id": "6762e154616e91cb8d8b1aaf",
"owners": [
{
"id": "636d0762bd257a7eb2373d6c",
"type": "user"
},
{
"id": "636d0762bd257a7eb2373d6a",
"type": "tenant"
}
]
}
]
}
In the response from the previous API call to https://api.platform.openintegrationhub.com/flows, you will also find the payload. It contains the data structure required for processing the flow correctly.
To ensure that the necessary data is available, the payload specifies which input parameters need to be provided and what output can be expected. This structure must be adhered to so that the flow operates as intended.
The payload could look like this:
inputParameters: { "firstName": "string", "lastName": "string"},
outputParameters: { "ID": "number", "active": "boolean"}
*<https://api.platform.openintegrationhub.com/webhooks/{flowID}*>
In the previous step, you retrieved the payload for the flow. Now, you need to use this data and send it back to FlowMate to trigger the next processing step.
To send data back to FlowMate, use the following POST request:
<aside>
</aside>
Path Parameter: