The action module is a module that makes a request (or several) and returns a result. It does not have a state or any internal complex logic.
Action modules are straightforward modules that make one or more requests and return a single bundle as result. Each execution is isolated, so they do not have a state like polling triggers and they can't be used to output multiple bundles like search modules. You should use an action module when the API endpoint returns a single item in the response. Some examples of common action modules include:
Create an object
Update a user
Delete an email
Get a record (by its ID)
Download/Upload a file
You can define a module's actions to take advantage of features.
Used for modules that are creating an object. Most of the time these modules use a POST request.
{
"url": "/contacts",
"method": "POST",
"body": {
"{{...}}": "{{omit(parameters, 'date')}}",
"date": "{{formatDate(parameters.date, 'YYYY-MM-DD')}}"
{
"url": "/contacts",
"method": "POST",
"body": "{{parameters}}",
"response": {
"output": "{{body}}"
{
"url": "/contacts"
"method": "POST",
"qs": {},
"headers": {},
"body": {
"name":
Used for modules that are retrieving an object. Most of the time these modules use a GET request.
If you happen to receive this error: Invalid module output. Expected Object, but found Array., it means that your module should be a Search type. A module expects an array output type and, unlike the action type module, supports the directive.
Used for modules that are updating an object. Most of the time these modules use a PATCH or PUT request.
Used for modules that are deleting an object. Most of the time these modules use a DELETE request.
{
"url": "/contacts/{{parameters.contact_id}}",
"method": "GET",
"response": {
"output": "{{body}}"
}
}"response": {
"output":
{
"myArray": "{{body}}"
}
}{
"url": "/contacts/{{parameters.contact_id}}",
"method": "PUT",
"body": "{{omit(parameters,'contact_id')}}",
"response": {
"output": "{{body}}"
}
}
{
"url": "/contacts/{{parameters.contact_id}}",
"method": "PUT",
"body": {
"name": "{{parameters.name}}",
"email": "{{parameters.email}}",
"phone": "{{parameters.phone}}",
"address": "{{parameters.address}}"
},
"response": {
"output": "{{body}}"
}
} {{
"url": "/contacts/{{parameters.contact_id}}",
"method": "DELETE",
"response": {
"output": "{{undefined}}"
}
}For more information, see the communication documentation.
The communication response is extended with the wrapper object.
limit is not available in response as the result of the action should always be only one bundle
Communication can be .
You can use inside the action module without any restrictions.
You can use inside the action module without any restrictions.
The action module should always .
To help the users with setting up your module, you can provide .
When using an OAuth type of connection, use the to define scopes required by this action.
These IML variables are available for you to use everywhere in this module:
Additional variables available for the response object:
Additional variables available after using the iterate directive, i.e. in wrapper or pagination directives:
Additional variables available for pagination and response objects:
data
Contains the module’s data collection.
scenario
TBD
metadata.expect
Contains the module’s raw parameters array in the way you have specified it in the configuration.
metadata.interface
Contains module’s raw interface array in the way you have specified it in the configuration.
now
Current date and time
environment
TBD
temp
Contains custom variables created via the temp directive.
parameters
Contains the module’s input parameters.
connection
Contains the connection’s data collection.
common
Contains the app’s common data collection.
output
When using the wrapper directive, the output variable represents the result of the outputdirective.
iterate.container.first
Represents the first item of the array you iterated.
iterate.container.last
Represents the last item of the array you iterated.
body
Contains the body that was retrieved from the last request.
headers
Contains the response headers that were retrieved from the last request.
items
When iterating this variable represents the current item that is being iterated.

{
"url": "/api/users/create",
"body": {
"name": "{{parameters.name}}",
"email": "{{lower(parameters.email)}}"
},
"method": "POST",
"response": {
"output": {
"id": "{{body.id}}"
}
}
}[][
{
"name": "email",
"type": "email",
"label": "Email address",
"required": true
},
{
"name": "name",
"type": "text",
"label": "Name",
"required": true
}
][
{
"name": "id",
"type": "uinteger",
"label": "User ID"
}
]{
"id": 1
}