- CHOOSE: "Process" ➡️ "Add new process" ➡️ WitHook "
- ENTER THE ADDRESS: Under which is the function you want to use
- SPECIFY: Maximum calling time, GET or POST method, parameters sent to the endpoint
- INCLUDE Configured module in the Workflow schedule and start them.
🎉 READY give yourself a high-five 🎉
The WitHooks module allows you to perform a custom function in analytical processes. It consists in making an HTTP request to any address using the GET, POST methods. The function at the address can have any logic in it. WitCloud will start the function in the set schedule, passing it the defined parameters and date. Additionally, if the function is in the Google Cloud environment, we can grant it access to our BigQuery datasets or to Google Cloud Storage.
# An example of operation
- Function sending notifications
- Function that exports data from Drive or Spreadsheet
- Alerts based on BigQuery data
# Before you start
Prepare the function and place it in the URL.
# Start creating the module
From the menu on the left, select the "Process" tab, then click the "Add new Data Process" button.
Select "WitHooks" from the list of available modules
# Initial settings
In the window, after pressing the module, a form for our function will appear, containing the following fields:
Name - The name of our process, it will be visible under this name in other places on the WitCloud platform
URL - The target address of our function.
Timeout in seconds - The maximum duration of calling a function.
Request Method - The method by which WitCloud will perform the request. By selecting the GET method, we can pass Query parameters to the function. By selecting POST, we can pass the Body parameter.
Headers - Headers that will be sent to the query, e.g. a token securing the functions
Query Parameters / Request Body - additional parameters that will be passed to the function.
Workflow Variables - selected variables from the workflow will be passed to the function call. In this example, we pass the date the module was called as the query runDate parameter.
Ready! After pressing the Create button, the configuration of our process will be saved.
# Setting the module in the schedule
Remember about the schedule !!
Please note that the configured data import process must be included in the Workflow configuration for it to be recalculated.