Webhooks

Webhooks are available at the "Starter" plan level and above.

If your project is enabled for Webhooks they are accessed from the project dropdown.

A Webhook is a method of extending TakeShape's build-in functionality, with custom callbacks to third-party services. These third-party services are anything can be reached via a URL. In practice they are pointing at another server or a Function-as-a-Service (FaaS) like AWS Lambda, Google Cloud Functions or Azure Functions.

Configuring a Webhook

Secret - The private key that you use to verify your Webhooks on the receiving end

Webhooks - A list of Webhook configurations. You can create as many Webhooks as you need.

Webhook Url - The target URL to be called when the Webhook is triggered

Resources - Built-in constructs "Assets" and  "Sites" and your own project's unique content types for which actions can be configured. Resource selections can be general using * or highly specific and selecting individual sites or content types.

Sites

You can configure actions on all sites by using "Site: *"

Content

You can configure actions on all content types by using  "Content: *"

Actions - Events in TakeShape that trigger the Webhook

Sites

Actions available for sites: "Create", "Update", "Delete", "Publish/start" "Publish/success", "Publish/failure".

Content Types

Actions available for content types: "Create", "Update", "Delete".

Additional HTTP Headers - Key / Value pairs to be sent along as supplementary headers with the Webhook. These might be used to provide additional context to the receiving service.

Reasons you might use a Webhook

  • Notify a slack channel every time you publish a specific static site
  • Use a serverless function to enrich your article content

Testing Webhooks

You can use https://webhook.site to test your Webhooks before you build your own service. Below is an example of the Webhook payload that is sent to the configured "Webhook Url".

{
  "action": "content:create",
  "meta": {
    "projectId": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "userId": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  },
  "data": {
    "contentId": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "contentTypeName": "article",
    "isSingleton": false
  }
}


Join us

Interested in joining the team as coworker or investor?

contact@takeshape.com