Custom actions
- Create a new Zap.
- Add a trigger of your choice, then add an action to your Zap by clicking + Add a step.
- Type “Oneflow” in the search field and click on it.
- From the Event dropdown, select Custom Actions (Beta).
- Click on Continue.
- Click on the Choose button and connect to your Oneflow account, then click on Continue to proceed.
- Under the Action stage, click on the Custom Actions Builder link.
- Click on the pencil icon near the "Untitled Action" title, then provide a name for your custom action. You will need this later on in the process.
- Modify the following to match your API endpoint.
Input fields:
Add any input fields required by the Oneflow API endpoint by clicking Add Input Field. Enter the field name in the Key field, and enter a user-friendly version of the key in the Label field. For instance, in our example, contract_id will act as the key for the API request URL in the Action stage.
Action:
Method: GET, POST, PUT, DELETE, PATCH
URL: URL: Enter the URL of your API endpoint.
Note:
The URL can include path parameters within brackets. For instance, for the Get contract by ID endpoint, the contract ID can be passed as an input field as follows.
https://api.oneflow.com/v1/contracts/{contract_id}Query parameters:
Key and Value pairs: You may include query parameters required by the Oneflow API endpoint. Enter the name of the query parameter (i.e. Key) in the first field, and enter its Value in the second field.
Click on the + button to add another key & value pair.
For instance, for the Get contracts endpoint, the query parameters and their values can be expressed as follows.
Key: offset
Value: 0
Key: limit
Value: 100The resulting URL will be as follows.
https://api.oneflow.com/v1/contracts?offset=1&limit=100Additional Headers: You may include additional headers required by the Oneflow API endpoint. Enter the name of the header in the first field, and enter its value in the second field. For instance, for the Get contracts endpoint, the additional headers can be expressed as follows.
x-oneflow-user-email: johndoe@oneflow.com - Click on Save then click on Publish. The custom action will then be saved to the library in your Zapier account.
- Go back to the Zap, click on the custom action dropdown, and select the custom action name you provided in the previous stage.
API requests
- Create a new Zap.
- Add a trigger of your choice, then add an action to your Zap by clicking + Add a step.
- Type “Oneflow” in the search field and click on it.
- From the Event dropdown, select API Request (Beta).
- Click on Continue.
- Click on the Choose button and connect to your Oneflow account, then click on Continue to proceed.
- Under the Action stage, modify the following to match your API endpoint.
HTTP Method: Select the method of your API endpoint: GET, POST, PUT, DELETE, PATCH.
URL: Enter the URL of your API endpoint.
Note:
The URL can include path parameters within brackets. For instance, for the Get contract by ID endpoint, the contract ID can be passed as an input field as follows. https://api.oneflow.com/v1/contracts/{contract_id}Query String Parameters:
Key and Value pairs: You may include query parameters required by the Oneflow API endpoint. Enter the name of the query parameter (i.e. Key) in the first field, and enter its Value in the second field.
Click on the + button to add another key & value pair.
For instance, for the Get contracts endpoint, the query parameters and their values can be expressed as follows.
Key: offset
Value: 0
Key: limit
Value: 100The resulting URL will be as follows.
https://api.oneflow.com/v1/contracts?offset=1&limit=100Additional Headers: You may include additional headers required by the Oneflow API endpoint. Enter the name of the header in the first field, and enter its value in the second field. For instance, for the Get contracts endpoint, the additional headers can be expressed as follows.
x-oneflow-user-email: janedoe@oneflow.com - Click on Continue to proceed with your Zap.