Install
openclaw skills install comonyx-adminAdmin skill to sign into Cosmonyx, fetch companies, filter/export (PDF or Excel), optionally email the export, or send reminder emails to filtered companies.
openclaw skills install comonyx-adminThis skill lets an admin sign in to Cosmonyx, fetch all company records using the same endpoints as the Cosmonyx gateway API, then choose to export those records as PDF or Excel, or send reminder emails. Email is sent by this skill’s own script (scripts/send-email.py); see TOOLS.md.
You must run all HTTP requests yourself (no external repos). For structured config (endpoints, run order) you can also load SKILL.yaml from this directory if present, but this SKILL.md is the source of truth for behavior.
Before calling any API:
If the user has already given both an email and password in their initial request, reuse those and do not ask again.
https://gateway-dev.cosmonyx.co/auth/signinContent-Type: application/json{"email":"<ADMIN_EMAIL>","password":"<ADMIN_PASSWORD>"}accessToken, token, data.token, or data.accessTokenIf sign-in fails (4xx/5xx or missing token), stop, explain the error briefly, and ask the user to correct the credentials instead of proceeding.
https://gateway-dev.cosmonyx.co/companiesAuthorization: Bearer <TOKEN> where <TOKEN> is from Step 1.page, totalPages, links.next, etc.data, companies, or the root.If there are zero companies, still continue to the export choice but clearly state that the dataset is empty.
After fetching all companies, prompt the admin to choose what they want to do:
"What would you like to do with the Cosmonyx company records?
- List records where complianceStatus is
Not Started- List records with
riskType=Low- List records where the primary user’s
sumsubVerificationStatusisunder_review- Send reminder emails to records where
complianceStatusisNot Started- Send reminder emails to records whose
expiryDateis before a given date- Work with all records (no filter)"
Apply filters in memory over the full company list from Step 2:
company.complianceStatus === "Not Started".company.riskType === "Low".company.primaryUser?.sumsubVerificationStatus === "under_review".expiryDate earlier than this date will be selected."expiryDate is non-null and < cutoff.If the filter results in zero records, report that to the user and stop (no export and no emails).
For actions 1, 2, 3, or 6, after filtering:
"I selected N matching companies. How would you like to export these records?
- PDF file
- Excel (.xlsx) file"
Interpret the user’s reply:
If the user selected PDF:
id, name, status, country, and any other key fields returned.$HOME/Downloads/comonyx-companies.pdfWhen done, reply with:
$HOME/Downloads/comonyx-companies.pdf) so the user (or tools) can retrieve it.Then proceed to Step 4D – Optional: Email the exported file.
Do not ask what to do next.
If the user selected Excel:
.xlsx file listing all filtered company records in a sheet named Companies.id, name, status, country, email, and any other important fields present in the API response.$HOME/Downloads/comonyx-companies.xlsxWhen done, reply with:
$HOME/Downloads/comonyx-companies.xlsx).Then proceed to Step 4D – Optional: Email the exported file.
Do not ask what to do next.
After Step 4B or 4C (once the export file path is known):
EMAIL_TO to the address they gave and ATTACHMENT_PATH to the exact path of the generated file (e.g. $HOME/Downloads/comonyx-companies.pdf or $HOME/Downloads/comonyx-companies.xlsx). Expand $HOME to the actual home path if needed (e.g. /home/musawir).echo "Cosmonyx companies export attached." > /tmp/companies_body.txtEMAIL_TO and ATTACHMENT_PATH set). Use the script in this skill’s scripts/send-email.py (TOOLS.md uses <skill-dir> for the path; resolve that to this skill’s directory).Do not ask what to do next after sending (or after declining).
If the admin chose option 4 or 5 in Step 3:
company.email if non-empty.company.primaryUser?.email if present.{companyName}, {status}, {expiryDate} – you can do simple string replacements for these placeholders per company./tmp/comonyx-admin-email-body.txt).scripts/send-email.py and the SMTP/recipient settings in this skill’s TOOLS.md. Set EMAIL_TO to that company’s recipient address (and no attachment for reminder emails) before running the send command.If sending fails due to SMTP issues, report the error and remind the user to configure SMTP_* environment variables (host, port, user, password).
After completing the chosen action (export or sending emails), send one final reply that includes:
$HOME/Downloads/comonyx-companies.pdf."$HOME/Downloads/comonyx-companies.xlsx."Do not add follow-up offers like "let me know if you need anything else" or questions about next steps. End after confirming the outcome.