Zapier

Introduction

Papertrail can invoke a Zapier action using a webhook trigger, which can then invoke any desired action in Zapier.

Setup

Follow the steps in Alerts.

Settings

In Zapier, create a new Zap. Under Built-In Apps, select Webhooks, then Catch Hook, and save the new Zap.

You’ll see the Pick off a Child Key dialog: child_key_dialog.png

If you’re interested in event details, enter payload.events. If you need something else, enter the related key, or omit this if you want all the data. Click Continue to show the Zap’s webhook URL.

On Papertrail’s Dashboard, find the Papertrail saved search you set up earlier. Click the Edit icon to edit its settings. Click the Manage Alerts tab and provide the Zap’s webhook URL, then save the settings.

Once you do that, you can add an action of your choice to your Zap to process the data, such as sending data to Google Sheets, Gmail, Trello, GitHub, or BitBucket.

Example: Google Sheets

Create a Google spreadsheet with column names corresponding to the fields you’re interested in. For this example, we’ll use log event details, and enter fields such as id, received_at, source_ip, source_name, hostname, program, severity, facility, message.

At the Test this step point in Zapier, open your saved Papertrail alert for editing and click Send test data. In Zapier, click OK, I did this. Zapier begins waiting to see data come to the hook URL and in a moment you’ll see the message Test successful.

Once the test has succeeded, set up the action. First select the Google Sheets app, then:

  1. Select Create Spreadsheet Row.
  2. Connect a Google account if you haven’t yet, or select an account you previously connected.
  3. Select the spreadsheet and worksheet you created earlier. The column names you added become a list of fields to provide content for.
  4. Fill in the fields with selections from the payload.
  5. Click Continue and test your new integration. If it works, save it. You now have an awesome spreadsheet that will dynamically update with details from the matched events when the Papertrail alert fires: log_sheet.png