Skip to content
This repository has been archived by the owner on Aug 20, 2021. It is now read-only.

Zapier OAuth2 Docs update #375

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 20 additions & 15 deletions en/plugins/zapier.md
Expand Up @@ -4,21 +4,29 @@ This integration integrates any Mautic instance with 1.100+ third party web serv

## Requirements

1. Mautic version 2.9.0 or newer with SSL - basic authentication requires HTTPS to be secure.
3. Zapier account. Free or Paid. [View Zapier pricing](https://zapier.com/pricing/).
Zapier account. Free or Paid. [View Zapier pricing](https://zapier.com/pricing/).

## Installation

There is no need to install any additional plugin to your Mautic instance. Zapier works with the API and webhooks already available within Mautic. This Zapier integration use Basic Authentication to access Mautic API. It is disabled by default so enable this first.
There is no need to install any additional plugin to your Mautic instance. Zapier works with the API and webhooks already available within Mautic.

### Setup Oauth2 Authentication in Mautic for Zapier 3.x

This new version of the app improves authentication by implementing the Oauth2 protocol

1. Open the admin menu
2. Go to Mautic's global configuration
3. Go to API Settings
4. Set __API enabled?__ to __Yes__.
5. Set __Enable HTTP basic auth?__ to __Yes__.
6. Save the configuration.
2. Go to Mautic's global configuration > API Settings
3. Set __API enabled?__ to __Yes__.
4. Save the configuration.
5. Go to Mautic's global configuration > API Credentials > __Oauth2__
6. Create new __Oauth2___ application with redirect URI: __tba__
7. Copy Public Key and Secret Key of your created app

![How to enable the API](https://user-images.githubusercontent.com/462477/74520415-cc616b00-4f17-11ea-8dbe-f6dd8a0a6cfc.png)

![How to enable API and basic auth](https://www.mautic.org/wp-content/uploads/2018/02/enable-api.png)
__Note__: **Refresh token lifetime (in days)** means how many days need app to refresh token. If your app will not have any activity in that period, you have to re-authorize it again.

![New Oauth2 application](https://user-images.githubusercontent.com/462477/74520342-a1771700-4f17-11ea-866f-5be1c895f0f9.png)

Zapier will be able to create actions and triggers with your Mautic installation.

Expand Down Expand Up @@ -49,8 +57,6 @@ The configured Zapier integrations are called Zaps. The main types of Zaps are T

### 1. Find Mautic integration

When you click on _Make a Zap!_ button, search for Mautic. You may see some unofficial Mautic integrations there. We recommend to use this one. It will always be called "Mautic (2.1.0)". Of course the version number will change in time. The latest version number is available within each changelog at https://github.com/mautic/mautic-zapier/releases.

If you want some inspiration or speed up the process of creating a Zap use preconfigured Mautic Zap templates:
<div id="zapier-widget"></div>
<script src="https://zapier.com/apps/embed/widget.js?services=mautic&html_id=zapier-widget"></script>
Expand All @@ -63,12 +69,11 @@ At this point choose which Trigger or Action you need. Each trigger will get you

### 3. Authorize Mautic instance

Once you choose to use Mautic integration you'll need to authorize your Mautic to it. Mautic use basic auth as mentioned earlier. So all you need is a Mautic user credentials and URL of where your Mautic lives. It's recommended to create a new user for Zapier which will have some advantages:
Once you choose to use Mautic integration you'll need to authorize your Mautic to it.

1. Giving a third party app credentials to your Mautic is a security risk. If something happens you simply delete this special Zapier user and your admin user will be safe.
2. You will see what contacts were created by Zapier simply by looking at the created by user.
<img src="https://user-images.githubusercontent.com/462477/74520761-848f1380-4f18-11ea-82be-152c00020995.PNG" width="300">

![Mautic Zap auth](https://www.mautic.org/wp-content/uploads/2018/02/zapier-auth.png)
![Mautic Zap auth](https://user-images.githubusercontent.com/462477/74520761-848f1380-4f18-11ea-82be-152c00020995.PNG)

### 4. Select an item for Triggers

Expand Down