Modules
In Make, you can set up six different types of modules, each with a specific function.
In this tutorial, you will set up a Search module to retrieve the coordinates of an address.
The Search module sends a request and returns multiple results. Use this module when you want to let users search for records.
Inside the Search module component there are five tabs:

Create a Search module
To create a new module for your Geocodify app:
In the Modules tab, click Create Module.
In the pop-up window, fill in the module details. The chart below contains the values to use for your Geocodify app.

Template
Blank module (you will set it up from scratch)
Type
Search (to retrieve geolocalization details)
Connection
Geocodify API Key (the connection you have created earlier)
Name
geocode
Label
Search geolocation
Description
Provides longitude, latitude, and place details of a location (address, name of a place, or location).
Click Save.
Click the Mappable Parameters tab for your new search module.
Copy and paste the following code:
/// Defines "location" as module input parameters.
[
{
"name": "location_info", // Makes value accesible via "{{parameters.location_info}}".
"label": "Location", // Sets the user friendly label visible in the module
"type": "text", // Sets the type to text.
"help": "Type the location you want to geolocate", // Sets the help text with an example under input field in the module.
"required": true // Indicates this parameter is mandatory.
}
]

name
Required. Internal name of the parameter. Use it when you want to access the parameter using {{parameters.name}}
.
label
Parameter name displayed in the module setup.
type
Required. Type of the parameter.
help
Instructions for the user displayed in the module setup. It supports Markdown for text formatting.
required
Specifies if the parameter is required.
Click Save changes.
Click the Communications tab for your new search module.
Copy and paste the following code:
{
// Request to API endpoint.
"url": "/geocode", // Endpoint relative to base URL
"method": "GET",
"qs": {
"q": "{{parameters.location_info}}" // Required query parameter. Parameter "location_info" is defined in Mappable parameters.
},
// Response handling
"response": {
"output": "{{body}}" // Return the body of the response
}
}

url
The API endpoint. Since it starts with /
, it is joined to the base URL. Note that if the URL starts with https://
, it will override the base URL.
method
The default method is GET, so it could have been omitted in this case.
qs
Query parameter containing the location to geolocate. Note that you access it by using parameters.location_info
.
response
Defines the output returned, which in this case is the whole body of the response.
Click Save changes.
Leave all the other tabs as they are, including the Interface. This means that you won't apply any filtering or customization to the output, but all the information from the API will be returned as is.
Now you are ready to test your app.
Last updated