accelo_create_activity
Create a new activity (note, email, call, or meeting).
Instructions
Create a new activity (note, email, call, or meeting).
Owner vs recipients: owner_type/owner_id set the activity's SENDER
(the from/author interaction). The to/cc/bcc arguments set the RECIPIENT
interactions and are independent of the owner. Naming a recipient under
to now addresses the activity TO them — this fixes the previous
behaviour where a non-owner recipient was recorded as bcc.
Each of to/cc/bcc is an object keyed by one or more of: - staff: list of staff ids (ints) - affiliation: list of affiliation ids (ints) - emails: list of raw email address strings For example: to={"staff": [10]}, cc={"affiliation": [13, 14]}, bcc={"emails": ["person@example.com"]}.
Supplying any of to/cc/bcc sends the request to Accelo as a single JSON
body (the normal activity fields plus the recipient objects). Raw emails
passed under emails create no interact object on the Accelo side (this
is expected). When none of to/cc/bcc is supplied the activity is sent via
the existing form-encoded path, unchanged.
Args: subject: Activity subject (required) against_type: Object type to create against (required). E.g. company, job, issue, staff, task against_id: ID of the object to create against (required) body: Activity body/content medium: Type — 'note', 'meeting', 'email', or 'call' (default: note) priority_id: Priority ID class_id: Activity class ID owner_type: Owner type ('staff' or 'affiliation'). Sets the SENDER (from/author), not a recipient. owner_id: Owner ID (staff_id or affiliation_id). Sets the SENDER. billable: Billable time in seconds nonbillable: Non-billable time in seconds task: Task ID to log the activity against. To log time against a task, set against_type/against_id to the task's PARENT (job/milestone/issue) and pass the task ID here (sent to Accelo as task_id). visibility: Activity visibility — 'private' (default), 'confidential', or 'all'. MUST be 'all' to log billable/non-billable time; the Accelo default of 'private' silently prevents time logging. date_started: Start date as a unix timestamp (seconds since UTC). For meetings this is the scheduled start; for other activities it sets the logged date (date_logged derives from date_started, falling back to date_created when unset). to: TO recipients — object keyed by staff/affiliation/emails, e.g. {"staff": [10]}. Addresses the activity TO these recipients. cc: CC recipients — object keyed by staff/affiliation/emails, e.g. {"affiliation": [13, 14]}. bcc: BCC recipients — object keyed by staff/affiliation/emails, e.g. {"emails": ["person@example.com"]}. fields: Additional fields to return
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | ||
| to | No | ||
| bcc | No | ||
| body | No | ||
| task | No | ||
| fields | No | ||
| medium | No | ||
| subject | Yes | ||
| billable | No | ||
| class_id | No | ||
| owner_id | No | ||
| against_id | Yes | ||
| owner_type | No | ||
| visibility | No | ||
| nonbillable | No | ||
| priority_id | No | ||
| against_type | Yes | ||
| date_started | No |