Timeclock Clock Out icon

Timeclock Clock Out

Clock out a user in the timeclock system

Overview

This node allows users to clock out a timeclock entry in a time tracking system via a GraphQL API. It is useful for scenarios where you need to programmatically mark the end of a work period or shift for a user, optionally adding a message and updating related ticket data. For example, it can be used in automated workflows that track employee hours or integrate with ticketing systems to update ticket statuses when a user clocks out.

Properties

Name Meaning
Timeclock ID The unique numeric identifier of the timeclock entry to clock out of (required).
Message An optional string message to include with the clock out action, such as notes or reasons for clock out.
Ticket Update Data Optional JSON object containing data to update the associated ticket with upon clock out.
Data Selection A multiline string specifying which fields to return in the response. If left empty, default fields are returned. Example fields include: id, start, end, ticketId, message.

Output

The node outputs an array with one item per input item. Each output item contains a json object representing the clocked-out timeclock entry. The structure of this object depends on the selected fields in the "Data Selection" property but typically includes:

  • Identifiers (id, ticketId, todoId, etc.)
  • Timestamps (start, originalStart, end, originalEnd, lastActive)
  • User-related fields (coreUserId, autotaskUserId)
  • Status flags (isDispatchedTicket, ticketCompleted, isSynced)
  • Messages and updates (message, ticketUpdateData, fromRole, mergeFromTicketId)

If binary data were involved, it would be summarized here, but this node only returns JSON data.

Dependencies

  • Requires connection to a GraphQL API endpoint of the timeclock system.
  • Needs an API key credential for authentication.
  • The node expects credentials configured in n8n for accessing the external service.
  • Uses a base GraphQL client class internally to perform the mutation.

Troubleshooting

  • Common issues:

    • Invalid or missing Timeclock ID will cause the mutation to fail.
    • Malformed JSON in "Ticket Update Data" may result in errors.
    • Insufficient permissions or invalid API key will cause authentication failures.
    • Incorrect field names in "Data Selection" might lead to incomplete or failed responses.
  • Error messages:

    • Errors from the GraphQL API will be caught and either thrown or returned as error objects if "Continue On Fail" is enabled.
    • Typical errors include authorization errors, validation errors for input parameters, or network connectivity issues.
  • Resolutions:

    • Verify the Timeclock ID exists and is correct.
    • Ensure JSON syntax is valid for ticket update data.
    • Confirm API credentials are correctly set up and have necessary permissions.
    • Use default or verified field names in "Data Selection".

Links and References

Discussion