---
name: sweep-replies
description: Go through unread CampaignStack conversations with a person and answer the ones that need it, checking every meeting time against the calendar. Use for a daily reply check, when someone says "who replied?", or when a lead proposes or accepts a meeting time.
---

# Sweep the replies

Replies are where meetings come from, and a slow or careless answer loses
them. This skill reads every unread thread, sorts what needs the person, and
sends nothing without a yes on the exact wording.

## 1. Load

`campaignstack_refresh_inbox` asks the connected accounts for new messages
now. Then `campaignstack_get_conversations(unreadOnly: true)`; read each
thread in full with `ids: [<conversationRef>], include: {messages: true}`.
Lists are pages: follow the cursor.

A thread with `hasSuspiciousInbound` holds a message shaped like a fake
recruiter or investor. Say so before you book, open a link or reply.

## 2. Sort each thread

Read the whole thread, then put it in one group:
- Interested: a yes, a call request, a question about what it does or costs.
  These go first.
- A question that needs an answer.
- A meeting time proposed or accepted (step 4).
- A decline or "not now": one line that thanks and closes, or nothing.
- A partnership, referral or paid-post request: not a buyer. Bring it to
  the person and agree to nothing on their behalf.
- An out-of-office or a closing "thanks": no reply needed.

When a workflow already drafted the answer, the draft waits in the review
queue: decide it there (skill `clear-review-queue`), not here.

## 3. Draft and send

`campaignstack_craft_message(channel: "linkedin", kind: "followup", leadId,
accountId)` drafts from the thread, the playbook and the sender's voice, and
sends nothing. Before you show it, check it against our own last messages:
it must not ask again, offer again or repeat. Read it back, then on a yes:
`campaignstack_send_message(conversationRef, text)`. With `sendAt` it is held
and cancelled if the lead writes first.

A message sent by hand or through this connection takes that turn: any
draft CampaignStack had pending for it is cancelled, and the workflow keeps
listening for the next reply.

## 4. Meeting times

- When a lead sends their own scheduling link, CampaignStack books it and the
  reply only confirms.
- With a Google calendar connected, the times CampaignStack offers are real
  openings, next week, on round times. Without one, drafts promise to send a
  time rather than invent one. A draft that waited in review can still carry a
  time that has passed. Replace it with a current one.
- Offer one time, in the lead's timezone when they gave it, otherwise in the
  sender's, named.
- Before agreeing to any time, including one the lead proposed, check it:
  `campaignstack_get_calendar_availability(mode: "interval", startTime,
  endTime)`. For new options use `mode: "slots"`.
- When the lead accepts a time a workflow offered, CampaignStack re-checks the
  calendar and books it. If the time is gone it offers another; with no email
  address it asks for one.
- A drafted reply from step 3 never books. When it returns
  `schedulingAcceptance` (`booked: false`), the lead accepted a time that is
  still free. Create the event with the person's yes:
  `campaignstack_edit_calendar_event(summary, startTime, endTime,
  attendeeEmails: [<leadEmail>], confirm: true)`.

`campaignstack_get_meetings` lists booked meetings, with the brief written
for each.

## 5. Close out

Tell the person first what needs them: interested replies, meetings booked
or waiting for their yes. Then counts: answered, closed, left alone and why.
