Skip to main content

Set Up an Action for a Zap

availability
Platform:WebMobile
Plan Type:BasicEssentialPremiumEnterprise
User Type:RequesterFull UserAdministrator

You can use your Zap to trigger actions in MaintainX, as well as perform actions in any other app supported by Zapier.

If you want a Zap to perform an action in MaintainX, do one of the following:

  • Use prebuilt MaintainX actions
  • Create custom requests with Zapier webhooks

Use Prebuilt MaintainX Actions​

Zapier supports the following prebuilt actions for MaintainX:

ActionDoes this
Add Existing Categories to a Work OrderAdds one or more of your organization's [categories] to a work order.
Create New MessageCreates a new message in a conversation.
Create Work OrderCreates a new work order in your organization.
Create Work RequestCreates a new work request in your organization.
Create Work Order CommentAdds a comment to a work order in your organization.

Set Up a Prebuilt Action​

In Zapier:

  1. In your Zap, edit the Action.

  2. When prompted to choose an app to perform the action, select MaintainX.

    The action options open.

  3. In the Setup section, select an Action event (e.g. Create Work Order).

  4. In the Account field, select your MaintainX API Key.

  5. In the Configure section, specify the data to send to MaintainX.

    The options vary based on the action you selected.

    You can map data from other parts of your Zap (e.g. the trigger) and/or pre-set additional fields.

    Screenshot showing how to configure a create MaintainX work order action in Zapier
    Creating a work order using a prebuilt MaintainX action in Zapier
  6. In the Test section, test your action to make sure it works.

    You should see the results in MaintainX.

  7. If the test is successful, you can select Publish to publish the action.

Create Custom Requests with Zapier Webhooks​

You can create custom requests using a combination of MaintainX’s REST API and Webhooks by Zapier. You can configure a request with any of the endpoints listed in the MaintainX API Documentation.

Set Up a Custom Request​

In Zapier:

  1. Create or edit a Zap.

  2. Edit the Action.

  3. When prompted to choose an app, select Webhooks.

  4. In the Action event field, select Custom Request.

  5. Select Continue.

  6. In the Configure options, fill in the following fields:

    FieldValue
    MethodGET, POST, or PATCH
    URLThe MaintainX Endpoint URL.

    For example, the URL for the Create new work order endpoint is

    https://api.getmaintainx.com/v1/workorders

    To find the URL for the endpoint you want to use, consult the MaintainX API Documentation.
    BodyJSON-formatted data to be passed into MaintainX.

    Use the request samples for each endpoint in the MaintainX API Documentation a reference for how to format this data.
  7. In the Headers section, add the following headers:

    HeaderValue
    AuthorizationBearer <your API key>
    Content-Typeapplication/json
  8. In the Test options, test your custom request.

    Use the MaintainX API Documentation to troubleshoot any error codes you receive.

Example: Create a New Asset​

This example shows you how to create a custom request to create a new asset in MaintainX and automatically name it based on a variable from earlier in the Zap. For example, data that was received by the Trigger.

You can find information about the Create new asset endpoint in the MaintainX API documentation.

FieldValue
MethodPOST
URLhttps://api.getmaintainx.com/v1/assets
Body
{
"name": "{{variable1}}",
"description": "Created from Zapier"
}
Screenshot showing the configuration for a custom Zapier action to create a MaintainX asset
Example of creating a new asset via a custom action using the MaintainX API

Example: Update a Custom Field on an Existing Work Order​

This example shows you how to use the Update work order information endpoint to dynamically update a work order field called External Tracking ID.

The example references the ID of the work order and sets the custom field, External Tracking ID, based on variables from earlier in the Zap. For example, data that was received by the Trigger.

FieldValue
MethodPATCH
URLhttps://api.getmaintainx.com/v1/workorders/{{workOrderId}}
Body
{
"extraFields": {
"External Tracking ID": "{{variable}}"
}
}