HomeData IntegrationsOther

Webhook

Send JSON Objects to a Causal Webhook

  • Make sure that the JSON object has the correct format (see example below) and that you know the keys. (If you don’t know what your data looks like, you can send it to a webhook data source, click edit then click the View last uploaded data button.)
  • Go to https://my.causal.app/data and click on the Webhook button in the New data source section
  • Fill in the keys and click on Create webhook data source
  • This will generate the Webhook URL that you can send the data to
  • After sending data to this URL you can refresh your data source to overwrite the old data.

Example for Looker

Make sure to check out our Looker documentation about the setup in Looker.

This example Look has the three columns “Event Date”, “Country” and “Customers”:

The JSON export will look something like this (this is auto-generated from the 4th bullet under Step 3 here):

{
  "type": "query",
  "scheduled_plan": {...},
  "data": [
    {"Event Date": "2022-02-14", "Country": "UK", "Customers": 5},
    {"Event Date": "2022-02-14", "Country": "USA", "Customers": 6}
  ]
}

Create a new Webhook Data Source and fill in the following fields:

  • Data array key: data (the array with the results is stored under the “data” key in the example above. Note: for Looker, this will always be data)
  • Date key: Event Date (the key with the dates. This is the name of your column in Looker)
  • Cohort key: There are no cohorts in the example above, so you can leave this field empty
  • Variable keys: Customers (the key that contains the values (measures). This is the name of your column in Looker. To enter multiple variables, hit enter after typing each variable name.)
  • Category keys: Country (the key that contains the category (dimension). This is the name of your column in Looker. To enter multiple categories, hit enter after typing each category name.)
  • Click Create webhook data source to generate the Webhook URL that you can paste into the Looker Schedule (more details about the Looker setup: Looker)

Category Mappings

Just like spreadsheet data sources (e.g. time series with categories), you can also send category mappings to webhook data sources. For example if you have an Employee category and every Employee belongs to a Department. To do that, first configure the Categories, then click the Add category mapping button. Enter the key that contains the mapping and the names of the categories.