n8n

How to Automate IMAP to LINE Email Summaries?

Turn long email threads into quick summaries sent to LINE. Great for busy teams that live in LINE and want a short daily digest without opening the inbox.

The sequence reads emails over IMAP, sends the content to an AI model through OpenRouter to create a summary, then pushes that summary to a LINE user via the LINE Messaging API. The flow runs across three nodes: Read emails IMAP, an HTTP Request to OpenRouter for summarization, and a second HTTP Request that posts to LINE. New lines are preserved in the message so the digest stays readable. This setup cuts inbox scanning, helps you spot important items faster, and keeps updates where your team already communicates.

You will need IMAP access to your email account, an OpenRouter API key, and a LINE channel access token with push message permission. In n8n, both HTTP calls use simple header auth with a Bearer token. Expect to reduce manual reading time by at least 30 to 45 minutes per day, especially for roles that get status updates, order notices, or vendor emails. It works well for store managers, field teams, and operations leads who prefer LINE for daily communication.

What are the key features?

  • Reads incoming mail using IMAP and passes the content to the next step
  • Calls OpenRouter chat completions to generate a clean summary from the email text
  • Pushes the summary to a LINE user with the LINE Messaging API
  • Uses header authentication with Bearer tokens for both HTTP requests
  • Formats message text to keep new lines for better readability in LINE

What are the benefits?

  • Reduce inbox reading time from 45 minutes to 5 minutes with AI summaries sent to LINE
  • Automate up to 90 percent of daily email triage for operations updates
  • Improve focus by keeping only the key points and action items
  • Connect email and LINE with no manual copy and paste
  • Deliver readable digests that preserve line breaks for quick scanning

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with IMAP Email, OpenRouter and LINE Messaging API. See the Tools Required section above for links to create accounts with these services.
  3. Enable IMAP in your email provider and note the IMAP host, port, username, and password. Some providers require an app password.
  4. In n8n, open the Read emails IMAP node. In the Credential to connect with field, click Create new credential and enter your IMAP details. Save and test the connection.
  5. Create an OpenRouter account and generate an API key from the API page. Copy the key to your clipboard.
  6. Open the Send email to A.I. to summarize node. In credentials, choose HTTP Header Auth or click Create new credential. Add a header key Authorization with value Bearer YOUR_API_KEY. Save.
  7. Confirm the OpenRouter URL is https://openrouter.ai/api/v1/chat/completions and the JSON body includes model and messages fields as provided.
  8. In the LINE Developers console, create a Messaging API channel and copy the Channel access token. Ensure push messages are enabled.
  9. Open the Send summarized content to messenger node. Create a new HTTP Header Auth credential and set Authorization with value Bearer YOUR_LINE_CHANNEL_ACCESS_TOKEN. Save.
  10. Set the to field in the LINE JSON body to the target user or group ID. For testing, use your own user ID from LINE tools.
  11. Run the workflow in n8n. Check the execution for the OpenRouter response path choices[0].message.content and confirm a message arrives in LINE.
  12. If emails are not found, verify IMAP folder and filters in the IMAP node. If LINE fails, confirm the token scope and that the user ID is correct.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

IMAP Email

Sign up

LINE Messaging API

Sign up

Free plan (Communication): $0 / mo, 500 messages / mo (USA/Other regions)

OpenRouter

Sign up

Free models: $0 via API, 20 requests/min; 50/day or 1000/day with ≥10 credits

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.