Quick Overview
This workflow listens for failed social posts and expired logins from PostWire, explains the cause and fix (using Google Gemini for unknown errors), deduplicates alerts via Google Sheets, and sends notifications to Telegram with a Gmail fallback, including an optional reconnect link.
How it works
- Triggers in PostWire when a post fails or a connection requires reauthentication.
- Converts the event into a normalized alert record with a human-readable cause and fix for known error codes.
- Checks a Google Sheets alert log to suppress repeat alerts for the same network/brand/error code within the configured quiet window, logging repeats without notifying.
- For new problems, checks PostWire connection health and scans queued/held scheduled posts to estimate how many are at risk on the affected network.
- If the error code is unknown, sends the details to Google Gemini to generate a plain-language cause and next-step fix.
- When a reconnect is needed, generates a time-limited PostWire reconnect link and adds it to the alert.
- Sends the formatted alert to Telegram and falls back to Gmail if Telegram fails, then appends the final alert status and details to Google Sheets.
Setup
- Install the PostWire n8n node, add PostWire API credentials, and ensure your n8n instance is reachable over public HTTPS for the PostWire trigger to receive events.
- Add credentials for Telegram, Google Sheets, Gmail, and Google Gemini.
- Create or choose a Google Sheets log with columns time, key, network, account, code, problem, fix, at_risk, status, label, and link, then select the document and sheet in all Google Sheets steps.
- Fill in the Telegram chat ID, fallback email address, time zone, and quiet window duration in the workflow’s alert settings.