# Zapier

> Zapier lets you connect **Parklio** to thousands of other web services with no code.
> Automated workflows called **Zaps** start with a **trigger** in one app and run one or
> more **actions** in others.

Parklio provides **actions only**; there are no Parklio triggers. Start your Zap with a
trigger from another app (a schedule, a form, a calendar event…) and use a Parklio
action, such as **Open Product**, as one of its steps.

## Prerequisites

- An active **API subscription** for each product you want to control from Zapier: get
  one at [subscriptions.parklio.com](https://subscriptions.parklio.com/?product=api).
- An online **Parklio Gateway** on the same lot as the product. Zapier actions reach
  your products through the Gateway, like any other API call. See
  [What you need](/get-started/what-you-need).
- At least one **product added to your Parklio account**, on the **same lot as the
  Gateway**.
- A **Parklio API token**, created by your account's **Super Admin** (below).

## Get an API token

Zapier authenticates to Parklio with an API token, the same kind used for direct API
access. See [Authentication](/api/authentication) for the full flow. In short:

1. [Log in once](/api/authentication#1-log-in-once-as-the-super-admin) with your
   account's **Super Admin** credentials. Only a Super Admin can create API tokens.
2. [Create an API token](/api/authentication#2-create-an-api-token).
3. Copy the `token` from the response.

:::warning
The token is only shown once, at creation time: save it before navigating away. If you
lose it, create a new one; it won't invalidate the previous token, so revoke old tokens
you no longer need.
:::

## Connect Parklio to Zapier

1. Log in to your [Zapier account](https://zapier.com/sign-up), or create one.
2. Navigate to **My Apps** from the top menu bar.
3. Click **Connect a new account** and search for **Parklio**.
4. Paste your Parklio API token to authorize the connection.
5. Start creating automations: use a
   [pre-made Zap for Parklio](https://zapier.com/apps/parklio/integrations) or build your
   own in the Zap Editor.

For questions about Zapier itself, open a ticket with
[Zapier Support](https://zapier.com/app/get-help).

## Supported actions

| Action | What it does |
| --- | --- |
| **Open Product** | Remotely opens a Parklio product. On a barrier, the arm **lowers** so the spot can be used; on a gate, chain, bollard or brain, the passage opens. |
| **Close Product** | Remotely closes a Parklio product. On a barrier, the arm **rises** so the spot is blocked; on a gate, chain, bollard or brain, the passage closes. |
| **List Owned Products** | Retrieves the Parklio products on your account. Use it to populate options in other Zap steps dynamically. |
| **Create Shared Key** | Shares access to a product with a user, existing or new. |

Open and Close are sent to the product through the Gateway on its lot.

## Use cases

- **Open for a booked visitor:** open a barrier when a visitor books an appointment in a
  scheduling tool (for example Calendly or Google Calendar).
- **Close overnight:** close all barriers at a set time each night with a scheduled
  trigger (for example Zapier's Schedule tool), securing the spaces after business hours.

## Reliability tips

- **Use List Owned Products** at the start of a Zap when you need dynamic device
  selection.
- **Add conditional steps or filters** to make sure the product is available and in the
  right state before acting on it.
- **Log every action** (for example, to Google Sheets or Slack) for monitoring and
  troubleshooting.

## FAQ

**Why isn't my device opening or closing when the action runs in Zapier?**

Check that your Parklio Gateway is online and properly connected. Also confirm the
device responds in the Parklio Connect app: if it can't be operated from the app, the
Zap will fail too. See [Troubleshooting](/resources/troubleshooting).

**Where do I find the `product_id` for the Open and Close actions?**

In the Parklio Parking Management System, select the product and open its Details tab.
Alternatively, run the **List Owned Products** action in Zapier and take each product's
`data.id` value from the response.

**Which products work with the Open and Close actions?**

Barrier, Chain, Bollard and Parklio Brain.

**Who do I contact about issues with Parklio products?**

[Contact Support](https://tickets.parklio.com/).
