Work-in-progress repository for code to be used when demoing Hookdeck.
Create a .env
with the following:
SHOPIFY_CUSTOMER_PHONE_NUMBER={PHONE_NUMBER}
- What is Hookdeck
- Event Gateway overview
- Key use cases
- Inbound webhooks
- Outbound webhooks
- Async API Gateway
- Connecting services
- Generally, a serverless queue for connecting services
- Creation connection demo
- Choose Source Type / highlight authentication
- Select Destination Type of mock for testing purposes
- Make cURL command and see event arrive
- Demo localhost development
- Run local server
- Use Hookdeck CLI to listen and forward events
- Show updated dashboard with CLI connection
- Deliver event to localhost via cURL
- Show/demo replay event
- Change Mock Destination to live destination and deploy
- Deploy from local and get URL
- Update Destination URL
- Deliver event via URL
- Connect service demo
- Create a new connection and reused the existing Source
- Create a new destination with URL and required auth
- Use a filter to only trigger on a specific type of event
- Use a transformation to change the webhook payload to outbound API payload
- Trigger event and see the result
- Highlight Hookdeck Terraform provider for managing Hookdeck resources
- Demonstrate issues
- Update code to have breaking bug and deploy YOLO
- cURL to push an event
- See issue being raised
- Acknowledge
- Pause the connection to stop any more events going through
- Implement fix and push
- Retry event via dashboard
- Resolve issue
- General overview steps up to but not including 4.
- Demonstrate PagerDuty integration
- Show an issue being created when a webhook endpoints responds with an error status code
- Resolve the issue.
- We want to use PagerDuty for our incident workflow
- Connect the PagerDuty integration
- Retry the event via the dashboard (error not fixed so will trigger issue)
- See PagerDuty incident - acknowledge
- See Hookdeck Issue has also been acknowledged
- Implement fix and push
- Resolve issue
- Trigger event from Hookdeck dashboard and check we get a 200
- What is Hookdeck, and what are the common use cases? Mention a couple of customers, including Lemon Squeezy.
- More detail on the most common Stripe-related use case: receive events, emphasizing that this centralizes event management from all API providers you are receiving webhooks from. Show the Visual designer.
- Hands-on receiving webhooks locally with the Hookdeck CLI. Will show Stripe and also Shopify to emphasize the centralizing of webhook handling.
- Push the app live to some hosting provider and update Hookdeck to deliver the events to the live endpoint.
- Cover features such as Transformations and Filters. Go into a Filter use case. I'm still working on that, but something based on data residency based on the customer's address and sending the event to a different endpoint. Open to other ideas.
- Push a bug to the live endpoint (whoops!) and demo the issue notification and webhook retry workflow.
Destination setup:
- API URL:
https://api.nexmo.com/v1/messages
- Use basic auth
- Username: from
https://dashboard.nexmo.com/settings
- Password: use secret as API key from
https://dashboard.nexmo.com/settings
Transformation:
Add Variable called VONAGE_FROM_NUMBER
to the transformation.
addHandler("transform", (request, context) => {
request.body = {
message_type: "text",
text: `Hi, ${request.body.customer.first_name}. Your order ${request.body.order_number} has been received.`,
to: request.body.customer.phone,
from: process.env.VONAGE_FROM_NUMBER,
channel: "sms",
};
return request;
});
Filter:
{
"to": {
"$exist": true
}
}
Install the dependencies:
npm i
Then run the app:
npm run dev
Trigger a Shopify event:
npm run shopify:trigger -- {HOOKDECK_URL}