Chatbot Trigger
Chatbot Trigger lets colleagues pick a skill in LINE on their phone, fill in data or upload files, and hand the job to EMILY.RPA. When the job finishes they receive a LINE notification and can view the result. Users do not need to install EMILY.RPA, nor do they need to know which robot runs the job. Note that this feature is only available in the Enterprise edition.
Three roles are involved:
| Role | Where | What they do |
|---|---|---|
| Group administrator | Group dashboard | Enable the feature for robot accounts and maintain the email allowlist of permitted users |
| Robot | EMILY.RPA | Choose which skills to offer and wait for jobs in fully automatic mode |
| User | LINE | Bind once with a company email, then pick a skill and submit it |
LINE never connects to the robot directly. Every request is relayed to the robot by the EMILY server, so the EMILY server must be able to reach the computer the robot runs on. See "Configure the Port and Public URL" below.
Group Administrator Setup
Enable the Feature for a Robot Account
Chatbot Trigger is disabled by default. Sign in to the group dashboard, switch "VIEW" to USER, open the TRIGGER setting of the account that will act as a robot, and turn on "Chatbot Trigger". After that account signs in to EMILY.RPA again, the Chatbot Trigger options appear.
Set the Permitted Users
Switch "VIEW" to CHATBOT, click the add button at the bottom right, enter the colleague's EMAIL and an optional NOTE, then click "OK". Only email addresses on this allowlist can bind a LINE account.
A bound user can run every skill offered by any robot in this group. Skills cannot be restricted per user, so only offer skills that are suitable for everyone on the allowlist.
The BINDINGS column of the allowlist shows the LINE accounts bound to each email, or not bound if there is none:
- Click the close icon on a binding chip to release only that LINE account. The email stays on the allowlist and the user can bind again.
- Click the delete icon at the end of the row to remove the email from the allowlist and release all of its bindings.
Notification and Verification Mail Settings
Switch "VIEW" to SETTING to adjust the following:
- Chatbot Binding PIN Mail: the subject and body templates of the binding verification mail. Two variables are available:
%PIN%(the verification code) and%OWNER%(the group name). Click "TEST" to send a test mail. - Chatbot Job Notification: whether a LINE message is pushed to the user when a skill runs.
| Option | Description |
|---|---|
| None | No push messages; users open the page themselves to see the result |
| Result only (default) | Push only when the job finishes |
| Start and result | Also push when a queued job starts running; a job that starts immediately after submission does not get a start message |
The cost of push messages is deducted from the credit balance of the group. When the balance is insufficient, notifications stop being sent, but skills still run normally and users can open the page themselves to see the result. To reduce the deduction, set the option to None or keep the default Result only.
Robot Setup
Add a Skill to Chatbot Trigger
On the "SKILL" page, click the skill you want to offer to bring up its menu, then select the "Add to Chatbot Trigger" option.
The input form users see in LINE is generated from the input files defined in the skill, and the result page only offers the output files defined in the skill. Make sure the skill's inputs and outputs are fully defined before offering it.
Configure the Port and Public URL
On the "TRIGGER" page, click "Chatbot Trigger" to see the list of added skills. Click the icon on the right of an item to remove the skill.
Click the "Adjust Parameters" icon at the bottom of the interface to bring up the "Chatbot Port" dialog:
PORT: the port on which the robot receives jobs. The default is 3300; if it conflicts with another server you can change it, within the range 1000 ~ 9999.Public URL: optional, in the formhttps://host:port. If the EMILY server cannot connect directly to this computer's IP address, enter a URL through which the EMILY server can reach this port.
The EMILY server tries the public URL first and falls back to each IP address of this computer only if that fails:
- With the EMILY cloud service, the robot usually sits inside a corporate network, so the public URL is required and your network administrator must set up the matching forwarding and firewall rules.
- With a self-hosted server on the same internal network as the robot, the public URL is usually not needed. Just make sure the firewall allows the server to connect to the robot's port.
If you do not have a fixed external address, a tunneling tool such as ngrok is an easy way to get a public URL without changing the firewall. After installing ngrok and setting up your account, run the following command on the robot's computer (replace 3300 with the port you configured):
ngrok http 3300
Enter the URL shown under Forwarding (for example https://xxxx.ngrok-free.app) into the "Public URL" field, then enter fully automatic mode again. Keep in mind:
- ngrok must stay running. Once it is closed, the public URL stops working.
- On the free plan the URL may change every time ngrok starts. When it changes, enter the new URL and enter fully automatic mode again. For long-term use, switch to an ngrok static domain or ask your network administrator for a fixed external address.
Start Fully Automatic Mode
After the setup is complete, start fully automatic mode. Only then does the robot register its offered skills with the EMILY server and begin receiving jobs. When the robot leaves fully automatic mode, its skills disappear from the users' skill list. Changes to the skill list, port, or public URL take effect the next time you enter fully automatic mode.
If several robots offer the same skill, the EMILY server gives each job to the robot with the fewest queued jobs at that moment. When one robot goes offline, the others keep serving.
Chatbot Trigger does not start in the following cases: the account does not belong to an enterprise management group, the group license has expired, or the configured port is already used by another program.
How Users Operate
The pages opened inside LINE are currently in Traditional Chinese. The original labels are shown in parentheses below.
Bind a LINE Account
First scan the QR code below with your phone to add the EMILY LINE official account as a friend:

EMILY LINE official account
- After adding the friend, tap "Bind" (綁定) in the menu at the bottom of the chat. Alternatively, send any message and the official account replies with two cards, "Bind EMILY" (綁定 EMILY) and "Trigger a skill" (觸發自動化技能); tap "Go to bind" (前往綁定).
- Enter the "Owner code" (企業代碼) and your "Company email" (公司信箱), then tap "Send code" (寄送驗證碼). The owner code is the group name; ask your group administrator for it.
- Get the 6-digit verification code from your mailbox, enter it, and tap "Confirm" (確認綁定).
Notes on binding:
- The verification code is valid for 10 minutes and allows up to 5 wrong attempts, after which a new code must be sent. At most 3 codes can be sent within 10 minutes.
- To prevent the allowlist from being probed, the page always says the code has been sent, whether or not the owner code and email are correct. If the mail never arrives, check the owner code with your group administrator and confirm that your email is on the allowlist.
- An email can be bound to only one group at a time. Binding it to another group automatically releases the previous binding.
- A bound user can tap "Unbind" (解除綁定) on the same page.
- When the email is removed from the allowlist or the group license expires, the binding becomes invalid and the page shows "Binding no longer valid" (綁定已失效).
Pick a Skill and Submit
Tap "Skills" (技能) in the menu or "Pick a skill" (選擇技能) on the card to list every skill offered by the robots of your group that are currently online. If the page says no robot is online (目前沒有上線的機器人), no robot is in fully automatic mode; refresh again later.
Tap a skill to expand its input form. The form fields depend on the input file names defined in the skill:
| Input file name | Form field | Example |
|---|---|---|
| No extension | Single-line text | keyword |
| Text extension: txt, md, csv, json, xml, yaml, yml, log, ini | Multi-line text; tap "Upload a file instead" (改為上傳檔案) to switch | keyword.txt |
| Any other extension | File upload | invoice.png |
"Submit" (送出執行) becomes available only after every field is filled in. Each file is limited to 20MB.
View the Result
After submission the page shows "Queued" (排隊中) or "Running" (執行中) together with the elapsed time. You can close the page at this point; when the job finishes, LINE delivers a notification message, and tapping the link in it brings you back to the result page.
| Result | Description |
|---|---|
| Completed (執行完成) | Lists the skill's output files, which can be previewed or downloaded |
| Failed (執行失敗) | Shows the error code; tap "Resubmit" (重新送出) to try again |
| Stopped (已停止) | The job was stopped on the robot; tap "Resubmit" (重新送出) to try again |
| Result unavailable (無法取得結果) | The robot has restarted and the job can no longer be found |
When the job completes, text files (txt, csv, json, md, log, xml, yaml, yml, ini) and images (png, jpg, gif, webp) up to 256KB can be previewed with a tap, and text content can be copied. Tapping "Download zip" (下載 zip) opens the phone's browser to download an archive of all output files.
Output files are kept in the robot's working folder, and the result page link stays valid for 7 days. Once the working folder on the robot has been cleaned up, the files can no longer be previewed or downloaded.
Input Data for the Triggered Skill
Whenever a user submits a skill from LINE, EMILY.RPA writes the data to the working folder as the input of the triggered skill:
- Each form field is saved as a file named after the input file name. Text fields become text files of the same name, such as
keywordorkeyword.txt. Uploaded files are always stored under the input file name, such asinvoice.png, regardless of their original name. - The company email the user is bound with is written to
chatbot-email.txt. A skill can use it to identify who submitted the job, or as the recipient address for sending the result.
In the robot's "TRIGGER QUEUE", jobs triggered by the chatbot show the company email of the submitter.
Self-Hosted Server
The EMILY cloud service already has a LINE official account set up. With a self-hosted server you need to prepare your own LINE official account (Messaging API channel), LINE Login channel, and LIFF app, then set the following environment variables on the server and restart it:
| Environment variable | Description |
|---|---|
CHATBOT_JWT_SECRET | A random string of your choice, used to sign the login tokens of the user pages; the chatbot feature is disabled when it is not set |
LINE_CHANNEL_SECRET | Channel secret of the Messaging API channel |
LINE_CHANNEL_ACCESS_TOKEN | Channel access token of the Messaging API channel |
LINE_LOGIN_CHANNEL_ID | Channel ID of the LINE Login channel that owns the LIFF app |
LIFF_ID | LIFF ID of the LIFF app |
Next, enter the server's address in the LINE Developers Console:
- Webhook URL of the Messaging API:
https://your-server/chatbot/line/webhook - Endpoint URL of the LIFF app:
https://your-server/page/chatbot/line
Binding verification mails are sent through the server's existing mail configuration, so make sure the server can send mail.