MOCO icon

MOCO

Consume MOCO API

Overview

This node integrates with the MOCO API to create a new activity record. It allows users to specify details such as the date of the activity, the associated project and task, the time spent in seconds, and a description. Additional optional fields include whether the activity is billable, tags, remote service identifiers, and URLs. This node is useful for automating time tracking and activity logging within project management workflows, enabling seamless recording of work done on specific tasks and projects.

Use Case Examples

  1. Automatically log time spent on a project task each day by creating an activity with the date, project ID, task ID, and seconds spent.
  2. Create an activity with a description and tag for billing purposes, linking it to a specific project and task.
  3. Use the impersonate user option to create activities on behalf of different users in the system.

Properties

Name Meaning
Impersonate User Name or ID Specifies the user on whose behalf the activity is created, either by selecting from a list or providing a user ID via expression.
Date The date of the activity being created, formatted as YYYY-MM-DD.
Project Name or ID The project to which the activity belongs, selectable from a list or specified by ID.
Task Name or ID The specific task within the project for the activity, selectable from a list or specified by ID.
Seconds The amount of time spent on the activity, in seconds.
Description A textual description of the activity.
Additional Fields Optional fields to provide extra details about the activity, such as billable status, remote service info, tags, and remote URLs.

Output

JSON

  • id - The unique identifier of the created activity.
  • date - The date of the activity.
  • project_id - The ID of the project associated with the activity.
  • task_id - The ID of the task associated with the activity.
  • seconds - The time spent on the activity in seconds.
  • description - The description of the activity.
  • billable - Indicates if the activity is billable.
  • tag - Tag associated with the activity.
  • remote_service - The external service linked to the activity.
  • remote_id - The external identifier for the activity.
  • remote_url - The external URL for the activity.

Dependencies

  • Requires an API key credential for authenticating with the MOCO API.

Troubleshooting

  • Ensure the date is provided in the correct YYYY-MM-DD format to avoid validation errors.
  • Verify that the project ID and task ID exist and are correctly specified; otherwise, the API may return errors.
  • If impersonating a user, confirm the user ID is valid and that the API key has permission to create activities on behalf of that user.
  • Check network connectivity and API credentials if requests fail with authentication or connection errors.

Links

Discussion