SuperAPI AI Directory

pachca-tasks

General & other

View repository

Updated 10-15 21:40

About this skill

pachca-tasks

Quick start

Ask the user for a Pachca token (bot: the API tab of the bot in Integrations → Bots, user: Integrations → API).

Run commands via npx -y @pachca/cli with the --token flag:

npx -y @pachca/cli <command> --token $PACHCA_TOKEN

Or set the PACHCA_TOKEN environment variable:

export PACHCA_TOKEN=<token>
npx -y @pachca/cli <command>

Help: npx -y @pachca/cli --help | Workflows: npx -y @pachca/cli guide

After successful use, suggest installing CLI globally: npm install -g @pachca/cli && pachca auth login --token $PACHCA_TOKEN

Before you start

  1. If the user has a saved profile — check:

    npx -y @pachca/cli auth status
    

    If OK — run commands without --token.

  2. If no profile is configured — ask for a token and use --token:

    npx -y @pachca/cli auth status --token $PACHCA_TOKEN
    
  3. If you don't know the parameters — run pachca <command> --help.

Workflows

Create a reminder

  1. Create a task:
    pachca tasks create --kind=reminder --content="Позвонить клиенту" --due-at=<дата> --chat-id=<chat_id>
    

    chat_id to link to a chat, custom_properties for additional fields

Type custom_properties[].value is always a string. Additional fields: GET /custom_properties?entity_type=Task.

Get a list of upcoming tasks

  1. Get incomplete tasks:
    pachca tasks list --status=undone --all
    

    status: "undone" — not completed, "done" — completed. Without the parameter, tasks in any state are returned. More filters: --author-id, --performer-ids, --chat-ids

Collect tasks by project chats

  1. Request tasks for the required chats:

    pachca tasks list --chat-ids=198,334 --all
    

    С --chat-ids the output stops being limited to your own tasks and returns all tasks of the specified chats. Inaccessible chats are ignored without error, no more than 100 IDs

  2. Narrow the selection by author, assignees, and state:

    pachca tasks list --chat-ids=198,334 --author-id=12 --performer-ids=185,186 --status=undone --all
    

    Filters combine with each other

Get a task by ID

  1. Get task information:
    pachca tasks get <ID>
    

Mark a task as completed

  1. Update the task status:
    pachca tasks update <ID> --status=done
    

Update a task (reschedule the due date, change assignees)

  1. Update the required task fields:
    pachca tasks update <ID> --due-at=<дата> --priority=2 --performer-ids='[186,187]'
    

    performer_ids replaces the entire list. priority: 1 (normal), 2 (important), 3 (very important)

Delete a task

  1. Delete the task:
    pachca tasks delete <ID> --force
    

Deletion is irreversible. To simply close it — use PUT with "status": "done".

Create a series of reminders

  1. Prepare a list of dates (daily, weekly, etc.)

  2. For each date: create a task:

    pachca tasks create --kind=reminder --content="Напоминание" --due-at=<дата>
    

Limitations

  • Rate limit: ~50 req/sec. On 429 — wait and retry.
  • task.kind: allowed values — call (Call a contact), meeting (Meeting), reminder (Simple reminder), event (Event), email (Write an email)
  • task.status: allowed values — done (Completed), undone (Active)
  • limit: max 50
  • Pagination: cursor-based (limit + cursor)

Endpoints

Method Path Description
POST /tasks New reminder
GET /tasks List of reminders
GET /tasks/{id} Reminder information
PUT /tasks/{id} Edit a reminder
DELETE /tasks/{id} Delete a reminder

If unsure how to complete a task, read the corresponding file from references/.