Integrations

Outrank webhook setup

Automatically ingest every article Outrank publishes by wiring up a secure webhook endpoint. Use the access token to confirm the request originates from Soreno before storing or synchronizing data downstream.

Setting up your webhook

Provide this information inside the Soreno dashboard when creating the integration.

  1. Integration name (2-30 characters, alphanumeric and spaces only).
  2. Webhook endpoint hosted over HTTPS where you will receive events.
  3. Access token used to validate requests (store as OUTRANK_WEBHOOK_ACCESS_TOKEN).

Verifying the webhook signature

Validate the bearer token on every request before processing the payload. Store the token in your environment and never commit it to source control.

const express = require('express');
const app = express();

const ACCESS_TOKEN = process.env.OUTRANK_WEBHOOK_ACCESS_TOKEN;

function validateAccessToken(req) {
  const authHeader = req.headers.authorization;
  if (!authHeader || !authHeader.startsWith('Bearer ')) {
    return false;
  }
  const token = authHeader.split(' ')[1];
  return token === ACCESS_TOKEN;
}

app.use(express.json());

app.post('/api/integrations/outrank', (req, res) => {
  if (!validateAccessToken(req)) {
    return res.status(401).json({ error: 'Invalid access token' });
  }

  // Process the webhook payload here
  // ...

  res.status(200).json({ message: 'Webhook processed successfully' });
});

app.listen(3000, () => console.log('Webhook server listening on port 3000'));

Publish articles event

Soreno sends this payload structure when articles go live. Each article includes Markdown and HTML variants so you can pick the format that fits your CMS.

{
  "event_type": "publish_articles",
  "timestamp": "2023-04-01T12:00:00Z",
  "data": {
    "articles": [
      {
        "id": "123456",
        "title": "How to Implement Webhooks",
        "content_markdown": "Webhooks are a powerful...",
        "content_html": "<p>Webhooks are a powerful...</p>",
        "meta_description": "Learn how to implement webhooks in your application",
        "created_at": "2023-03-31T10:30:00Z",
        "image_url": "https://example.com/images/webhook-article.jpg",
        "slug": "how-to-implement-webhooks",
        "tags": ["webhooks", "integration", "api"]
      },
      {
        "id": "789012",
        "title": "Best Practices for API Design",
        "content_markdown": "When designing an API...",
        "content_html": "<p>When designing an API...</p>",
        "meta_description": "Discover the best practices for designing robust APIs",
        "created_at": "2023-03-31T11:45:00Z",
        "image_url": "https://example.com/images/api-design-article.jpg",
        "slug": "best-practices-for-api-design",
        "tags": ["api", "design", "best practices"]
      }
    ]
  }
}

Testing the integration

Publish any draft article in the dashboard to trigger a webhook. Your endpoint should log the request and return a 200-series response. If nothing arrives, double-check your networking rules and SSL configuration.

Quick checklist

  • Endpoint accessible from the public internet with HTTPS.
  • Authorization header captured and validated on every call.
  • JSON body parsed with appropriate error handling.
  • Webhook handler returns a 2xx status when processing succeeds.

Best practices

Keep your integration resilient with these operational tips.

  • Always verify the bearer token before touching the payload.
  • Log and monitor webhook responses so you can alert on failures.
  • Add retry logic on your side when forwarding data to downstream systems.
  • Keep your endpoint lightweight—offload heavy work to background jobs when possible.

Troubleshooting

Common issues usually stem from networking or token configuration.

  • Double-check your endpoint is reachable from the public internet over HTTPS.
  • Ensure the Authorization header is formatted as 'Bearer <token>'.
  • Inspect application logs for stack traces when you see 500 responses.
  • Confirm hosting providers (like Vercel) do not add extra auth requirements to the route.
  • Validate the payload schema matches the publish_articles contract before parsing.