Webhook Integrations

Send the contents of your project to a specified endpoint. Add the content to your CMS or distribute it to a network

Diego Muralles avatar
Written by Diego Muralles
Updated over a week ago

Webhooks can be used to automatically publish the website when you have finished building your Vev project. We can trigger a webhook, which is essentially an HTTP POST request containing the relevant data needed to publish your Vev project. This webhook is sent to a webhook receiver, which could be another application or service that is responsible for handling the publishing process. The webhook receiver would then process the webhook data, which could include the HTML, CSS, and JavaScript files needed to publish the website. The receiver would then use this data to publish the website to your desired location, such as a web server or a content delivery network (CDN).

Once the webhook is set up, the publishing process can be automated, reducing the time and effort required to publish the website manually.

Our webhook integration is straightforward and requires the user's service to respond with a 2xx code; any other response codes will be considered an error. The requests have a 20-second timeout.

Creating Webhook trigger

  1. In the dashboard, click on your avatar in the left sidebar and click on Hosting

  2. Click Create hosting

  3. Enter your domain or sub-domain (e.g www.mywebsite.com) for navigation purposes - you will add your Webhook URL in the next stage.

  4. Select Advanced hosting option as the hosting option

  5. Choose Webhook trigger from the list

  6. Decide on the access level (public or private).

  7. Click on Create hosting

☝️ Upgrade from the Starter plan to the Professional plan to unlock Webhook integrations as an Advanced hosting option!

Setting up a Webhook trigger

To successfully connect your Webhook trigger, it's essential to provide several parameters. While some are mandatory, others are optional, depending on your server configuration.

Take a look at the list below to understand each parameter's function:

  • Webhook URL (required)

    • This is the required address (e.g., https://www.yourwebhookurl.here) where Vev sends the content when you publish from the platform. If you don't have a server or endpoint available, you can utilize a tunneling service like Ngrok to direct content to your local computer.

  • Page content to send in addition to body

    • Send full page: Enable this option if you want Vev to generate the complete page, including the HTML structure (<html /> and all). If disabled, only the HTML required to render the content will be sent.

    • Send plugin settings: Add the generated data from your integrations (e.g. Google Analytics, Google Tag Manager, etc.) of your project and attach them as a JSON attribute.

  • Payload Settings

    • Select Content as links if you encounter publishing issues. This option sends a list of HTML files instead of including the code directly in the payload's pages field.

  • How to handle assets

    • Select Include asset URLs in payload if you want your assets (images, fonts, videos, etc.) to be included as URLs in your webhook payload.

  • Ping

    • Enable this option to grant Vev permission to send pings.

  • Unpublish

    • Enable this option to grant Vev permission to unpublish the content.

πŸ‘€ Explore our Webhook receiver example implementation on our public GitHub repository.

Gain a comprehensive understanding of all Webhook event types, documented for your reference.

Signature

The token, set by you, can be anything and is crucial for verifying that the content originates from Vev. To view or generate a Secret for your webhook, click on "Generate token." This string of characters is utilized in the Webhook server code.

When publishing to a Webhook, all requests from Vev are signed with a header called
X-Vev-Signature. This allows clients to confirm that Vev is indeed the sender. To verify the signature from the request, you'll need the secret set by you in Vev and a crypto library to create HMAC digests.

The X-Vev-Signature value consists of an algorithm used to generate a hash and the signature itself, for example, sha512=super-long-hashed-value. Currently, we only support the sha512 algorithm for creating a signature. If you use the payload and secret with sha512, you'll obtain the same value as the signature.

Endpoint security

This feature ensures proper communication with users' endpoints. We support non-secured endpoints, basic authentication, and token-based authentication. Please note that OpenID Connect (OIDC) is not yet supported.

Additional settings for your domain

Adding a web path

You can add a path to your domain at the core level, which means it will be used as a base path in all projects to which the domain is added.

Select your default content language

Here you can set the default content language for all your published projects. This determines the language and character encoding used for the text content in your websites, ensuring proper display and functionality.

Adding a Favicon

A favicon is a visual representation of your web page that helps your user visually identify and distinguish websites when they have multiple tabs open. Simply drag and drop your file into the designated area.

Publishing to a Webhook trigger

After setting up your Webhook trigger correctly, follow these steps to add it as a publish destination:

  1. Open the project you want to publish

  2. Click the Publish button on the top right corner

  3. Select Add publish destination from the publish dialog

  4. Choose your domain from the dropdown list

  5. Add a path to your domain or leave it blank if you want to publish to its root (the path will only be added at a project level)

  6. Hit Add publish destination

  7. Open the publish dialog

  8. Hit Publish project

To publish via your Webhook, you need to upgrade to our Professional plan.

Unpublishing a project

To unpublish your project from your Webhook, you have two options:

  1. Unpublishing from the publish modal

    1. Click on the "Publishing" button to access the Publishing Modal.

    2. In the Publishing Modal, locate your domain.

    3. Click on the overflow menu (represented by three dots) associated with your domain.

    4. From the options displayed, select "Unpublish."

    5. A pop-up menu will appear asking you to confirm your decision. Click on "Unpublish" to proceed.

    6. After confirming, your project will be unpublished. Please note that it may take up to 5 minutes for the changes to take effect, and your page will no longer be accessible.
      ​

  2. Unpublishing from the Webhook settings page

    1. In your Webhook settings page, click the "Projects" tab on the left bar

    2. If you have published projects, click the three dots next to the project you want to unpublish and click "Unpublish".

    3. The project will no longer appear on the list.

Choose the option that best suits your workflow to unpublish your project from the Webhook.

If you're having trouble unpublishing your page, we're here to help! Please reach out to our support team for assistance.

Did this answer your question?