Why I dropped the X API for an IFTTT webhook - and what it cost me
Описание и применение
Автор заменил X API на IFTTT Webhook, чтобы убрать сложность OAuth, но столкнулся с ложными подтверждениями успешной публикации. Добавил извлечение ошибок из тела ответа и отдельную проверку публикаций через публичный таймлайн, а также исправил конфигурацию launchd.
Задача
The author’s bot failed to reliably confirm that tweets were posted when using an IFTTT webhook, because the webhook’s 200 response only indicated acceptance, not publication, leading to a false sense of success.
Результат
The bot now accurately reports posting success, avoids false positives, and handles launchd quirks, resulting in reliable tweet announcements.
Рабочий процесс
- Generate announcement text and enqueue with scheduledAt timestamps
- Launchd job runs every 30 minutes, sending queued items via IFTTT webhook
- Extract errors from IFTTT response body to detect failures
- Treat "published" as null (unknown) and log only "accepted"
- Verify actual posts by scraping the public X timeline
Доказательства
IFTTT can return an error in the body while the status stays 200
Treat "published" as null (unknown)
Setting PATH explicitly in EnvironmentVariables fixed node: command not found
- Дата записи: 2026-09-16T10:15:32.673Z