Changes to inline_json format for ActionHub Actions in Looker v21.4

As part of the new release version 21.4 of Looker, changes were made to the inline_json format.

The ActionHub actions using inline_json had credentials removed from JSON payload due the way these payloads were constructed. This meant that no actions that required credentials, API keys, etc would work with this format.

In order to resolve this issue, we implemented changes treating inline_json payloads like all other formats. This enables Looker and customers developing their own actions to have a consistent pattern to leverage along their development. This change also means that inline_json actions that require credentials will work!

Which exact schedule format was updated?

In Looker there are several JSON based options for scheduling data: JSON simple, JSON label, JSON simple inline and JSON detailed inline.
The only one that was updated is the JSON simple inline format.

 

Will this impact Webhook schedules?

No, the change will not impact webhook based schedules.

Are Looker built actions impacted by this change?

The actions shipping natively with Looker are not impacted by this change!

What is impacted?

For customers who have built custom inline_json ActionHub actions, they will have to change their code as the path to the query data in the new JSON payload has been updated. In order to help facilitate these updates for your developer teams, we are providing below two samples of inline_json, the old format, and the new format.

Old Format for inline_json

 {
    "attachment": null,
    "data": [
        {
            "Active API Sessions": "0",
            "Active UI Sessions": "6",
            "Timezone": null,
            "Name": "Friendly User"
        },
        {
            "Active API Sessions": "0",
            "Active UI Sessions": "0",
            "Timezone": null,
            "Name": "Friendly User"
        },
        {
            "Active API Sessions": "0",
            "Active UI Sessions": "3",
            "Timezone": null,
            "Name": "Friendly User"
        }
    ],
    "form_params": {
        "channel": "0101010101"
    }
}


New Format for inline_json **

{
    "attachment": {
        "mimetype": "application/json",
        "extension": "json",
        "data": "[{\"Active API Sessions\":\"0\",\"Active UI Sessions\":\"6\",\"Timezone\":null,\"Name\":\"Friendly User\"},\n{\"Active API Sessions\":\"0\",\"Active UI Sessions\":\"0\",\"Timezone\":null,\"Name\":\"Friendly User\"},\n{\"Active API Sessions\":\"0\",\"Active UI Sessions\":\"3\",\"Timezone\":null,\"Name\":\"Friendly User\"}]"
    },
    "data": {
        "slack_api_token": "some-secret-thing"
    },
    "form_params": {
        "channel": "0101010101"
    }
}

** note the change including the credentials into the new format
** note the changes relating to the query data location

0 0 199