Papertrail can invoke a Zapier action using a webhook trigger, which can then invoke any desired action in Zapier.
Papertrail sends data to a Zapier webhook URL when the alert fires.
- Create a new Zap.
- Under Built-In Apps, select Webhooks by Zapier, then Catch Hook to create a static webhook that listens for data.
- Save the new Zap.
You'll see the Pick off a Child Key dialog:
To focus on event details, enter
payload.events. For other data, enter the related key, or leave it blank to get all the data. Click Continue to show the Zap’s webhook URL and use Copy to clipboard to grab it.
- Follow the steps in Alerts, selecting Zapier as the service.
- Enter the Zap's webhook URL in the URL to Zapier trigger field.
- Click Create Alert.
Once the alert is set up, 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.
Create a Google spreadsheet with column names corresponding to the fields you're interested in. For this example, use log event details, and enter fields such as
Now that the webhook URL has been created and saved, move on to the Test this Step verification.
Open the saved Papertrail alert 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, it displays Test successful.
Once the test has succeeded, set up the action. First select the Google Sheets app, then:
- Select Create Spreadsheet Row.
- Select an account that was previously connected, or connect the account where the spreadsheet was created.
- Select the spreadsheet and worksheet created earlier. The column names become a list of fields to provide content for.
- Fill in the fields with selections from the payload.
- Click Continue and test the new integration. If it works, save it. It’s now an awesome spreadsheet that will dynamically update with details from the matched events when the Papertrail alert fires:
First select the Slack app, then:
- Select Send Channel Message.
- Select an account that was previously connected, or connect the Slack account to send messages to.
- Fill in details for the channel and settings. In the Message Text field, use the following fields: or select others, using the button in the upper right of the field.
- Click Continue, and check the Slack channel for messages. Each message’s time, sender, program, and message appear, with the time linking directly to the message.
Papertrail offers a direct Slack integration, which is a great choice for most use cases, but running the payload through Zapier provides an easy way to customize the message content.