Skip to main content

Can I send a Webhook to a hosting service other than KurocoFront?

Yes, it is possible.
Please use the Smarty plugin {api} to send requests to external services.
You can define the Webhook destination URL and request content in a custom process, and adjust the timing of sending by setting the desired trigger.

This allows you to automatically trigger builds at any desired timing, such as after content updates, even when hosting with services other than KurocoFront.

How to send a Webhook triggered by content updates

Adjusting the request content

For example, to send a Deploy Hook to Vercel, write the following code in a custom process.
Please refer to Vercel's documentation to generate the endpoint URL on the Vercel side.

{api
endpoint='https://api.vercel.com/v1/integrations/deploy/prj_******************'
method="POST"
var=response
status_var=status
}

{logger msg1="vercel deploy" msg2=$response}

Setting the Webhook Sending Timing

Set the trigger to [After Content Update] for the added custom process.
If you input 1 in the box next to the name, content with Content Definition ID=1 will be targeted by the trigger.

Image from Gyazo

With this setting, when the targeted content is updated, a Deploy Hook will be sent to Vercel, and the build will automatically start.

tip

For the list of available triggers, please refer to the following:

Major Hosting Services

When using other hosting services, please configure a custom process to send a Webhook in a similar manner.

Hosting ServiceFeature NameOfficial Documentation Link
VercelDeploy HookOfficial Documentation
NetlifyBuild HookOfficial Documentation
Cloudflare PagesDeploy HookOfficial Documentation
GitHub PagesWebhookOfficial Documentation
Firebase HostingREST APIOfficial Documentation
AWS AmplifyIncoming WebhookOfficial Documentation
tip

Webhooks can be used not only for deployment purposes to hosting services but also for sending notifications to any service such as Slack, Chatwork, or Discord.


Support

If you have any other questions, please contact us or check out Our Slack Community.