Webhooks
Schedule and share your dashboard via a Webhook.
Webhooks Admin Setup
There is no configuration needed within Omni Admin settings to establish a Webhook as a schedule's destination. Simply add the webhook's destination URL when creating a schedule.
Scheduling to Webhooks
Webhook Response Requirement
For successful delivery, Omni expects an HTTP 200 status response from the webhook upon delivery. Ensure your webhook setup is configured to acknowledge Omni’s POST requests with a 200 response to avoid delivery retries or failures.
Webhook Metadata by Format
- For scheduling to a Webhook in a link-only format, Omni is sending POST with JSON object body containing
{url: <your_super_cool_dashboard_url>}
- For all other Webhook destination formats, Omni sends a POST using
FormData
to organize key-value pairs of data, where the file names are the keys, and the values are the file contents.
Learn more about scheduling dashboards here.
Webhook Delivery with Zapier to Export to Google Sheets
Utilize Omni's webhook delivery method in conjunction with Zapier to export schedules and alerts to Google Sheets. Two configuration options are available:
- Overwrite an existing tab in your Google Sheet on each delivery
- Create a new tab with a timestamp in your Google Sheet on each delivery
Prerequisites
- An Omni dashboard with a tile configured for export
- A Zapier account
- A Google Sheets account, workbook.
Configuration Steps
1. Set Up Omni Dashboard
- Configure a tile in your Omni dashboard for export as a Schedule or an Alert.
- Set the destination to Webhook.
- Choose CSV as the format.
- Leave the Webhook URL blank for now.
2. Create Zapier Workflow and catch raw hook
- In Zapier, create a new workflow.
- Select "Webhooks by Zapier" as the first step.
- Set the event to "Catch Raw Hook". Continue and "Test Trigger"
- Copy the provided webhook URL.
- Return to Omni and paste the webhook URL into the schedule/alert configuration.
- Click "Test Now" to send a test to Zapier.
- Save the schedule/alert in Omni.
- In Zapier, test the trigger to receive the POST request from Omni.
- Verify the CSV data in the "Raw Body" key.
3. Parse CSV
- Add a "Files by Zapier" step to the worflow.
- Set the event to "Line Items From CSV Rows".
- Configure the action:
- Set CSV file to the Raw Body from the Catch Raw Hook stage.
- Set "Has header row" to true.
- Set delimiter as Comma.
- Test the step and verify the parsed CSV contents.
4. Google Sheet Worksheet headers
- Add a Google Sheets step to the workflow.
- Set the event to "Create Worksheet".
- Configure the action:
- Choose the Google Drive account.
- Select the spreadsheet.
- Set the sheet title.
- Manually enter column names from your Omni export.
- Test the step and verify the new tab in your Google Sheet.
5. Populate Google Sheet
- Add another Google Sheets step.
- Set the event to "Create Multiple Spreadsheet Rows".
- Configure the action:
- Match the account, drive, spreadsheet, and worksheet from the previous step.
- Select columns from the "Files by Zapier" step in the same order as the header columns.
- Test the step and verify data population in the Google Sheet (Tests in Zapier send 10 rows of data)
6. Finalize Zapier Workflow
- Publish the Zapier workflow.
- Name the workflow and set a version.
- Ensure the workflow is active.
7. Test End-to-End Process
- In your Omni dashboard, locate your schedule/alert.
- Select "Send Now" from the options menu.
- Wait a few seconds and check your Google Sheet for updated data.
The final Zapier workflow will look like. Link to Zapier template
Configuration Options
Option 1: Overwrite Existing Tab
Follow the steps above. Ensure the "Overwrite" option is set to "True" in Step 3 of the Zapier workflow setup.
Option 2: Create New Timestamped Tab on each run
Follow steps 1-3 as above, then:
- In the Google Sheets "Create Worksheet" step:
- Append
-{{zap_meta_human_now}}
to the worksheet title for a timestamp. - Set "Overwrite" to "False".
- Append
- In the "Create Multiple Spreadsheet Rows" step:
- Use the Custom option for Worksheet.
- Select the ID generated in the previous "Create Worksheet" step to ensure the data from the previous step is inserted into the new tab.
- Select columns in the same order as the headers from the parsed csv step.
There is a Zapier template for creating new timestamped tabs here
Troubleshooting
- For table exports from Omni, consider disabling totals for the export.
- Ensure column names and order match between Omni, Zapier, and Google Sheets configurations.
- Verify webhook URL is correctly copied from Zapier to Omni.