0, 'published' => 0, 'failed' => 0, 'pending' => 0 ]; try { $stmt = $pdo->query("SELECT status, COUNT(*) as count FROM scheduled_posts GROUP BY status"); $results = $stmt->fetchAll(PDO::FETCH_KEY_PAIR); $stats['published'] = $results['published'] ?? 0; $stats['failed'] = $results['failed'] ?? 0; $stats['pending'] = $results['pending'] ?? 0; $stats['total'] = array_sum($stats); } catch (PDOException $e) { // Handle error, maybe show a message } // --- Fetch Recent Webhook Events --- $recent_events = []; try { $event_stmt = $pdo->query("SELECT * FROM webhook_events ORDER BY received_at DESC LIMIT 15"); $recent_events = $event_stmt->fetchAll(PDO::FETCH_ASSOC); } catch (PDOException $e) { // Handle error } ?>
This page provides an overview of your post scheduling and publishing activity, based on status updates received from your n8n workflows.
| Post ID | Status | Message | Received At |
|---|---|---|---|
| No recent webhook events found. | |||
| # | |||