Actions32
- Assignment Actions
- Client Actions
- Project Actions
- Report Actions
- Task Actions
- Time Actions
- Timecard Actions
- Webhook Actions
Overview
This node integrates with the Everhour API to manage assignments for users within projects or time off categories. Specifically, the Assignment - Create operation allows you to create a new assignment for a user, specifying details such as the type of assignment (project or time off), associated project ID (if applicable), start and end dates, and scheduled time.
Common scenarios where this node is beneficial include:
- Automatically assigning users to projects with defined schedules.
- Managing time off assignments for users within an organization.
- Scheduling work periods or tasks for team members in project management workflows.
For example, you can use this node to assign a user to a specific project from March 1st to March 31st with a scheduled workload of 40 hours (converted to seconds). Alternatively, it can be used to allocate time off for a user during a vacation period.
Properties
| Name | Meaning |
|---|---|
| User ID | The numeric identifier of the user to whom the assignment will be made. |
| Assignment Type | The category of the assignment; options are: "Project" or "Time Off". |
| Project ID | The identifier of the project for project-type assignments. Required if Assignment Type is "Project". |
| Start Date | The starting date and time of the assignment. |
| End Date | The ending date and time of the assignment. |
| Scheduled Time (Seconds) | The total scheduled time for the assignment expressed in seconds. |
| Force Override | A boolean flag indicating whether to force override existing assignments if conflicts occur. Defaults to false. |
Output
The output of the node is a JSON object representing the newly created assignment as returned by the Everhour API. This typically includes fields such as assignment ID, user ID, type, project ID (if applicable), start and end dates, scheduled time, and other metadata related to the assignment.
No binary data is output by this node.
Example output structure (simplified):
{
"id": 12345,
"user": 67890,
"type": "project",
"project": "abcde12345",
"startDate": "2024-03-01T00:00:00Z",
"endDate": "2024-03-31T23:59:59Z",
"scheduledTime": 144000,
// other fields...
}
Dependencies
- Requires an API key credential for authenticating requests to the Everhour API.
- The node uses HTTP methods (POST) to communicate with the Everhour API endpoint
/assignments. - Proper configuration of the API base URL and authentication credentials in n8n is necessary.
Troubleshooting
- Authentication errors: Ensure that the API key credential is correctly configured and has sufficient permissions to create assignments.
- Validation errors: Missing required fields such as
userId,assignmentType,startDate, orendDatewill cause the API to reject the request. Verify all required inputs are provided. - Project ID requirement: When
assignmentTypeis set to "project", theprojectIdmust be specified; otherwise, the API call will fail. - Date format issues: Dates must be in ISO 8601 format. Incorrect formatting may lead to errors.
- Force override conflicts: If an assignment overlaps with existing ones and
forceOverrideis not enabled, the API might reject the creation. EnableforceOverrideto bypass this.
If the node throws an error, check the error message for clues about missing parameters or permission issues.