Integrate OutBlog to
Webhookin minutes
Connect your Outblog project to any public HTTPS endpoint and receive article payloads in real time for your own custom workflows.
How Webhook Integration Works
The current webhook flow stores a webhook URL and key for a project, then sends a JSON POST request to that URL using the `post_data` object it receives from the publishing flow. If a key exists, Outblog includes it in the Authorization header as a Bearer token so your server can verify the request.
Setting Up Your Webhook
To set up a webhook integration, you'll need to provide the following information:
- Webhook Endpoint: The public HTTPS URL where you want to receive webhook events from Outblog.
- Access Token: Your project API key from Outblog, if one exists for the project, sent in the Authorization header as a Bearer token.
- Database Record: The webhook integration table stores user_id, project_id, key, and website_url for delivery.
Implementing Webhook Secret Mechanism
To ensure the security of your webhook, Outblog sends the saved project key in the request header when that key exists. Here's how to verify incoming webhook requests:
Example in Node.js:
import express from "express";
const app = express();
const ACCESS_TOKEN = process.env.OUTBLOG_API_KEY;
app.use(express.json());
function validateAccessToken(req) {
const authHeader = req.headers.authorization || "";
if (!authHeader.startsWith("Bearer ")) {
return false;
}
const token = authHeader.split(" ")[1];
return token === ACCESS_TOKEN;
}
app.post("/api/outblog-webhook", (req, res) => {
if (!validateAccessToken(req)) {
return res.status(401).json({ error: "Invalid access token" });
}
console.log("Incoming Outblog payload:", req.body);
return res.status(200).json({ message: "Webhook processed successfully" });
});
app.listen(3000, () => {
console.log("Webhook server listening on port 3000");
});Publish Articles Event
When webhook delivery runs, Outblog sends a POST request to your saved webhook endpoint with the exact post_data object it receives. These files do not normalize or reshape the payload before sending it.
- Payload Shape: The request body is forwarded as-is from the publishing flow.
- Headers: Outblog sends Content-Type: application/json and adds Authorization: Bearer <key> when a key is available.
- Delivery Rule: The current service considers the webhook successful only when the response status is 200.
Article Data Properties
Since the current service forwards post_data without reshaping it, the exact properties depend on the calling publishing flow. A typical article payload may contain fields like these:
- id: Article identifier if the publishing flow includes it in `post_data`.
- title: Article title when it is present in the forwarded payload.
- content: Main article body if the upstream publishing flow passes it through.
- excerpt: Summary or description if it exists in the outgoing `post_data` object.
- created_at: Creation timestamp when supplied by the publishing flow.
- featured_image_url: Primary image URL if it is included upstream.
- slug: URL slug when present in the payload.
- tags: Tag array if provided by the publishing flow.
- category: Article category if present.
- language: Language value if included in the post data.
- image_urls: Additional image URLs when available.
- translations: Optional translation data if the publishing flow includes it.
Response Schema:
{
"event": "blog_published",
"id": "post-uuid-9f2a4b7c",
"title": "How to Build a Reliable Webhook Receiver",
"slug": "how-to-build-a-reliable-webhook-receiver",
"content": "<p>This guide explains request...</p>",
"created_at": "2026-03-15T10:00:00Z",
"featured_image": "https://cdn.example.com/images/webhook-receiver-cover.jpg",
"blog_meta_data": {
"tags": ["webhooks", "reliability", "automation"],
"categories": ["engineering", "integration"],
"length": "long",
"meta_description": "Learn practical patterns for..."
},
"translations": [
{
"title": "Webhook receiver ko reliable kaise banaye",
"content": "Is article me request verification ...",
"language_code": "hi"
}
]
}Testing Your Webhook
These files do not define a dedicated test webhook endpoint. To verify the current webhook flow, test it by triggering the real publish path or by manually sending a request to your endpoint:
- Make sure the webhook_integration table contains the correct website_url, project_id, and optional key.
- Trigger the publish flow that calls send_post_to_user, or send a manual JSON request to your receiver using the same headers.
- Confirm your endpoint receives the forwarded JSON payload and, if a key exists, the Authorization header in Bearer format.
- Return HTTP 200 and check your server logs to verify the webhook was received and processed correctly.
Best Practices
- Always verify the webhook access token to ensure the request is genuine.
- Implement proper error handling and logging in your webhook receiver.
- Return HTTP 200 after processing, since the current service only treats that exact status as success.
- Store your Outblog API key in environment variables rather than hardcoding it into your application.
Troubleshooting
Webhook endpoint not receiving requests
Verify your endpoint URL is correct, publicly accessible, and using HTTPS. Check your server logs, firewall settings, and any platform routing rules.
Access token validation failing
Ensure your access token matches the current project API key in Outblog exactly. Check for missing Bearer formatting, extra spaces, or an outdated key.
Webhook returning 500 errors
Review your server logs for specific error details. Make sure your endpoint accepts JSON payloads and always returns an appropriate status code after processing.
401/403 authentication errors on hosting platforms
If you are using platforms like Vercel or custom middleware, make sure the webhook route is publicly accessible and not blocked by additional platform-specific auth.
Payload parsing errors
Confirm your handler reads `application/json` requests and can parse fields such as `event`, `title`, `content`, `tags`, and `featured_image_url` correctly.