Use this robust n8n workflow to implement instant auto-replies to Line messages using reply tokens and manage proactive push notification broadcasts. Learn how to use the HTTP Request n8n node for custom API integration.
Download this n8n workflow template and start using it instantly.
If n8n node.This comprehensive n8n workflow provides a dual-purpose automation system for the Line Messaging API. It solves two common needs: immediate customer interaction and proactive broadcasting. The primary flow uses an n8n trigger webhook to instantly capture messages sent by users on Line. It intelligently filters these events using an If n8n node, ensuring only legitimate user messages receive an automated response via a time-sensitive reply token. The secondary, manually triggered path demonstrates how to send push messages to specific Line User IDs, a crucial component for marketing or notification services. This n8n template showcases effective use of custom HTTP Request n8n node configurations for complex API interactions, making it an excellent learning resource for anyone building custom integrations within n8n.
This n8n workflow operates via two distinct paths:
Webhook from Line Message n8n trigger, which is configured to listen for incoming POST requests from the Line API whenever an event occurs (like a user sending a message).If n8n node immediately follows, checking if the received event type is explicitly a message. This ensures the n8n workflow only processes actual messages and ignores events like user joins or reads, optimizing efficiency.Line : Reply with token n8n node (an HTTP Request node). This n8n node dynamically extracts the replyToken and the received text from the webhook payload. It constructs a JSON body and posts it to the Line reply endpoint, instantly echoing the user's message back to them.When clicking ‘Test workflow’ n8n trigger, allowing users to test push functionality without waiting for an incoming message.Edit Fields n8n node (Set node) is used to define a specific placeholder lineuid (User ID).Line : Push Message n8n node (an HTTP Request node). This n8n node uses the specified lineuid and sends a predefined text message (in this case, '推播測試') to the user, demonstrating the proactive push capability of the n8n workflow.To deploy this powerful n8n workflow, follow these steps:
Line n8n demo auth (HTTP Header Auth type).Authorization.Bearer LINECHANNELACCESSTOKEN> .Webhook from Line Message n8n trigger node and configure it as the webhook endpoint within your Line Developer Channel settings.line_uid in the Edit Fields n8n node with a valid Line User ID before manually testing the push message path. Webhook from Line Message (n8n trigger):
Function: Serves as the primary entry point, listening for all events from the configured Line channel.
Key Configuration: Configured for a POST method on a unique webhook path.
If (n8n node):
Function: Filters the incoming webhook payload, ensuring the n8n workflow only proceeds if the event type is exactly message.
Key Configuration: Condition checks ={{ $json.body.events[0].type }} equals message.
Line : Reply with token (n8n node - HTTP Request):
Function: Uses the Line Messaging API reply endpoint to send an immediate response. It is crucial for replying within the required time window.
Key Configuration: URL is https://api.line.me/v2/bot/message/reply. Body dynamically uses {{ $('Webhook from Line Message').item.json.body.events[0].replyToken }} and the received message text.
When clicking ‘Test workflow’ (n8n trigger):
Function: Initiates the push notification demonstration path manually for testing purposes.
Edit Fields (n8n node - Set):
Function: Creates the required lineuid variable for the push message API call.
Key Configuration: Sets the value of lineuid (requires updating with a real user ID).
Line : Push Message (n8n node - HTTP Request):
Function: Uses the Line Messaging API push endpoint to send a message proactively to a specific user, independent of an incoming webhook.
* Key Configuration: URL is https://api.line.me/v2/bot/message/push. Body uses the stored {{ $json.line_uid }} for targeting.
Deploy a powerful, real-time Line chatbot using this advanced n8n workflow. Integrate Groq (Llama 3) for ultrafast AI responses and automate all messaging with this reusable n8n template.

Use this powerful n8n workflow to build a complete support ticket system managed entirely through Telegram, backed by a PostgreSQL database. Perfect n8n templates for custom CRM and operations.

Use this powerful n8n workflow to automate UGC ad generation. Trigger creation via Telegram, leverage Google Gemini for scripts, and render videos using Kie.ai's Veo3.1 API.

Use this comprehensive n8n workflow template to automatically sync Linear project status and target dates to corresponding Productboard features, ensuring alignment across product and engineering teams. This n8n workflow includes status mapping and Slack notifications.

Use this advanced n8n workflow to automatically enrich LinkedIn messages, generate personalized AI responses using OpenAI and Notion data, and route requests to Slack for one-click human approval. A powerful n8n template for scalable outreach.

Martech Engineer with automation. here is my website: https://www.darrelltw.com/







































