← Cookbook
n8n: summarize incoming emails into Slack
Trigger on new email → SeaLink chat → post summary to Slack channel. No code, 10 minutes to ship.
Workflow
Gmail Trigger → HTTP Request (SeaLink) → Slack message. The HTTP node sends the email body to SeaLink's chat completions endpoint and gets back a summary.
n8n HTTP Request node config
POST to https://api.sealink.asia/v1/chat/completions with Authorization header. Body uses OpenAI-compatible JSON.
Body
{"model": "gpt-4o-mini","messages": [{"role": "system","content": "Summarize this email in 2 sentences. Reply in the same language as the email."},{"role": "user","content": "{{$json[\"body\"]}}"}],"max_tokens": 120}
Send to Slack
Take {{$json.choices[0].message.content}} from the HTTP node response and pipe it into a Slack 'Post Message' node. Done.
Cost ballpark
100 emails / day × 30 days × ~500 tokens on gpt-4o-mini ≈ $0.45 / month. With SeaLink markup ≈ $0.47 / month.