Skill instructions
bulk-chat-actions2.05 KB
View saved version →
---
name: bulk-chat-actions
description: Label, assign, unassign, close or reopen many WhatsApp chats at once from a plain-English rule. Use when the user asks to close all resolved chats, label every chat that mentions a topic, move chats to another teammate, or tidy up chats in bulk.
---
Use this skill to apply one change to many chats safely. The rule is always previewed before anything changes.
1. Restate the rule in one sentence: which chats it matches and what will happen to them. If the rule is vague, ask one question.
2. Find the matching chats with `list_chats`. It filters by `closed`, `read`, `labels`, `responsible` (a teammate email), `whatsapp_account_id`, `group`, `name`, `phone` and creation date, 50 per page. It cannot filter by last activity or by message content. When the rule depends on either ("no new message in 7 days", "mentions a refund"), check each candidate with `chat_history` before including it. For a teammate move, get the teammate's email from `workspace_team`.
3. Show a preview: how many chats match, a sample of up to 10 (contact, number, current labels, current owner) and the exact action. Say clearly that nothing has changed yet. If you could not check every candidate, say how many you checked.
4. Ask the user to confirm. Do not proceed on silence or if the rule has changed since the preview.
5. Apply the action chat by chat with `chat_set_label`, `chat_remove_label`, `chat_assign` (needs the teammate's email), `chat_unassign`, `chat_close` or `chat_open`. If a call fails, carry on with the rest and keep a list of failures. Each call returns only a status, so after the changes call `chat_details` on a sample of the changed chats to confirm the real state.
6. Report how many succeeded, which failed and why, and how to undo it. Labels, assignment and open or closed state can be reversed with the matching tool.
Only change chats that were in the confirmed preview. For WhatsApp Business API chats use the matching `waba_` tools (for example `waba_chat_close`, `waba_chat_set_label`, `waba_chat_assign`). This skill never sends messages.
follow-up-stale-chats2.43 KB
View saved version →
---
name: follow-up-stale-chats
description: Find open WhatsApp chats where the customer has not replied after the team's last message, and draft a short follow-up for each. Use when the user asks to chase quiet chats, follow up on unanswered messages, or find chats with no reply in a number of days.
---
Use this skill to find chats that went quiet after we wrote last, and to help the user follow up. Drafting is free. Sending always needs the user's confirmation, message by message.
1. Ask for the quiet period if the user did not give one. Default to 2 days.
2. Call `list_chats` with `closed` set to false, narrowed by `whatsapp_account_id`, `labels` or `responsible` (a teammate email from `workspace_team`) if the user named any. Results come 50 per page. `list_chats` has no last-activity filter, so the quiet period is checked in the next step.
3. For each candidate call `chat_history` and read only the last few messages. Use `from_me` to tell our messages from the customer's. Keep a chat only when our message is the latest and its timestamp is at least the quiet period old. Skip chats the user labelled as hands-off and chats where the customer clearly ended the conversation.
4. Checking every chat is slow. If there are many, check the most recently created or the ones matching the user's filters first, stop at about 30 chats, and tell the user how many you checked and that more may exist.
5. For each kept chat, draft one short follow-up in the language the customer used. Refer to what was actually discussed. Do not invent promises, prices or dates.
6. Show the user a table: contact, number, days quiet, our last message and the draft.
7. Send only after the user approves the exact text of each message. Before the first send, call `workspace_quotas`; if `near_full` or `full` is true, warn the user and wait for their confirmation. Then use `chat_send_message`, or `message_reply` when replying to a specific message. A text message uses one quota unit and an attachment about two. Check delivery with `message_details` before sending anything else into the same chat.
8. Do not send to a number the user has not confirmed, and do not start new conversations with this skill.
Sends are real and immediate. Never send a batch on a single "yes" to the table; confirm which drafts are approved. For WhatsApp Business API chats, free text is only allowed while `service_window_is_open` is true in `waba_chat_details`; otherwise use the waba-template-send skill.
get-started1.39 KB
View saved version →
---
name: get-started
description: Check whether the user has WhatsApp numbers connected to TimelinesAI and guide them if not. Use when the user asks which numbers are connected, says they are new or just connected a number, asks how to connect WhatsApp, or when other tools return no chats or no numbers.
---
Use this skill first when the user is new, or when results come back empty.
1. Call `workspace_whatsapp_accounts` to list the WhatsApp numbers connected to the user's TimelinesAI workspace. Also call `waba_accounts` to see WhatsApp Business API numbers.
2. If numbers exist, list each one with its name or phone number as returned. Then offer a first step, such as showing the latest chats on a number (`list_chats` with `whatsapp_account_id`) or checking what needs a reply.
3. If the user said they just connected a number and it does not appear, say so plainly. Ask them to check that the number shows as connected in the TimelinesAI app and then try again. Do not claim it is connected.
4. If no numbers are connected, tell the user that a WhatsApp number must be connected in the TimelinesAI app first, by scanning a QR code, and that this plugin cannot connect numbers or register WhatsApp Business API numbers. Point them to the TimelinesAI help center at https://help.timelines.ai/en. Do not invent steps, settings or screens that you have not been given.
5. Do not read or send messages in this skill.
inbox-triage2.48 KB
View saved version →
---
name: inbox-triage
description: Sweep the user's TimelinesAI WhatsApp inbox and report which chats need attention. Use when the user asks what needs them today, who is waiting for a reply, which chats are unread, urgent or stalled, or wants a morning briefing of their WhatsApp chats.
---
Use this skill to answer "what needs me?" across the user's WhatsApp numbers. This workflow only reads. It never sends, labels, assigns or closes anything.
1. Call `workspace_whatsapp_accounts` to see the connected numbers. If the user named a number, teammate or label, pass it as a filter (`whatsapp_account_id`, `responsible` with the teammate's email from `workspace_team`, or `labels`). Otherwise cover all numbers.
2. Call `list_chats` with `closed` set to false. Run it once with `read` set to false for unread chats, and once without `read` for open chats in general. Results come 50 per page; continue with `page` only while `has_more_pages` is true and the user wants the full picture. `list_chats` cannot filter by last activity, only by creation date, so the waiting time must come from the messages.
3. For each chat that could need attention, call `chat_history` and read only the most recent messages. Use `from_me` to tell our messages from the customer's. Do not read whole histories. When there are many chats, work through the unread ones first and tell the user how many you covered and how many you did not.
4. Sort what you read into three lists, most urgent first:
- Waiting on us: the customer's message is the latest and nobody has replied.
- Stalled: we wrote last, after a question or promise, and the customer has been quiet for 2 or more days.
- Unassigned: open chats with no teammate. `list_chats` cannot filter for this, so check `chat_details` for chats you are already reporting on and do not try to scan the whole inbox for it.
5. For each chat give the contact or group name, the number it came in on, the owner, how long it has waited (from the message timestamps), and a one-line reason, quoted or paraphrased from the actual messages.
6. If WhatsApp Business API numbers are connected (`waba_accounts`), run `waba_list_chats` with `closed` set to false and `with_msg` set to true, and report them in a separate section.
7. End by offering next steps, such as drafting replies, assigning or labelling. Do not take them unasked.
Do not guess urgency from a contact's name. Base it only on message content and waiting time. If a tool returns no chats, say so plainly instead of filling the list.
waba-template-send2.32 KB
View saved version →
---
name: waba-template-send
description: Choose an approved WhatsApp Business API template, fill in its variables and send it to a customer. Use when the user asks to send a template message, re-open a conversation outside the 24-hour window, or start a new WhatsApp Business conversation from a template.
---
Use this skill for WhatsApp Business API (WABA) numbers only. It does not apply to numbers connected by QR code.
1. Call `waba_accounts` to see which WABA numbers the user can send from. If there is more than one, ask which.
2. Find the recipient. For an existing chat, use `waba_list_chats` (filter by `whatsapp_phone` or `waba_account_id`) and then `waba_chat_details`. Read `service_window_is_open`. If it is true, a free-form reply with `waba_chat_send_message` may be enough; say so and offer it, because it avoids the template charge. For a new conversation the phone number must be in international format starting with "+". If you have to infer the country code, show the number and ask the user to confirm it before going further.
3. Call `waba_templates` (50 per page, continue while more pages exist), then `waba_template_details` with the chosen `template_id`. Only templates with status APPROVED can be sent. Show the user the exact template text and its header and body variables. Never write template text of your own.
4. Ask for any variable values you do not have. Do not invent names, dates, order numbers or links.
5. Show the final message with the variables filled in, the number it will be sent from and the recipient. Remind the user that Meta charges for template messages. Ask for explicit confirmation.
6. After confirmation, send:
- Existing chat: `waba_chat_send_template` with `chat_id`, the template `name` and `language` from `waba_template_details`, and `variables` (`header` and `body` lists, in component order).
- New conversation: `waba_start_chat` with `waba_account_id`, `phone`, `name`, `language` and `variables`. The chosen `waba_account_id` must appear both in `waba_accounts` and in the template's `accounts` list. If it does not, tell the user which number the template is available on.
7. Report the result, then check delivery with `waba_message_details`. If it failed, report `failure_reason` as returned.
Sends are real and immediate. Never send without the user's confirmation of the final text and recipient.