Create an Autotask Project with Tasks and Dependencies
This tutorial walks through building a workflow that creates an Autotask Project, adds Tasks to it, and links those Tasks with a dependency so they appear correctly in the Gantt chart. This pattern is useful for automating onboarding projects, recurring maintenance, or any repeatable project structure.
Overview
The workflow creates entities in this order:
- Project: the container with a name, start date, and end date
- Tasks: individual work items linked to the project by Project ID
- Task predecessor: a dependency record that links one task to another (for example, Task B cannot start until Task A is complete)
Each step stores its result in a variable so subsequent steps can reference the IDs.
Related pages:
Before You Start
Decide whether this workflow will be triggered by an inbound email or by a scheduled task. Both work the same way; the only difference is that scheduled tasks do not have email.* variables available.
Step-by-Step Workflow
Action 1: Create the Project
- Click Add New Action, select API: Create an Object, click OK
- Name the step
Create Project - Set Entity Type to
Project - Populate the required fields (fields marked with an asterisk are required):
| Field | Value |
|---|---|
| ProjectName | The project name. For email-triggered workflows, use {{email.subject}} or a custom value. |
| AccountID | The account this project belongs to (unlock the field to enter a variable) |
| Status | New |
| Type | Select the appropriate project type |
| StartDateTime | {{date to_tz="Autotask"}} (today) |
| EndDateTime | {{date add="1 month" to_tz="Autotask"}} (one month from today) |
- In Store results in variable, enter
project
The {{date to_tz="Autotask"}} helper renders the date in the format and timezone Autotask expects. Autotask presents and accepts all API dates in the America/New_York timezone; the special Autotask timezone handles this conversion (including Daylight Saving Time) automatically. Add time offsets with the add parameter: add="1 month", add="2 weeks", add="90 days". See Date Timezones for details.
Action 2: Create Task A
- Click Add New Action, select API: Create an Object, click OK
- Name the step
Create Task A - Set Entity Type to
Task - Populate the required fields:
| Field | Value |
|---|---|
| ProjectID | {{custom.project.id}} (unlock the field) |
| Title | Phase 1: Assessment (or your task name) |
| Status | New |
| TaskType | Select the appropriate type |
| StartDateTime | {{date to_tz="Autotask"}} |
| EndDateTime | {{date add="2 weeks" to_tz="Autotask"}} |
- In Store results in variable, enter
taskA
Action 3: Create Task B
- Click Add New Action, select API: Create an Object, click OK
- Name the step
Create Task B - Set Entity Type to
Task - Populate the required fields:
| Field | Value |
|---|---|
| ProjectID | {{custom.project.id}} (unlock the field) |
| Title | Phase 2: Implementation (or your task name) |
| Status | New |
| TaskType | Select the appropriate type |
| StartDateTime | {{date add="2 weeks" to_tz="Autotask"}} |
| EndDateTime | {{date add="1 month" to_tz="Autotask"}} |
- In Store results in variable, enter
taskB
Action 4: Create the Dependency
Link Task B to Task A so Task B cannot start until Task A is complete.
- Click Add New Action, select API: Create an Object, click OK
- Name the step
Link Task B to Task A - Set Entity Type to
TaskPredecessor - Populate the required fields:
| Field | Value |
|---|---|
| TaskID | {{custom.taskB.id}} (unlock the field; this is the dependent task) |
| PredecessorTaskID | {{custom.taskA.id}} (unlock the field; this is the task that must complete first) |
| LagDays | 0 (or set a delay between tasks) |
- In Store results in variable, enter
dependency
Verify in Autotask
- Open the project in Autotask
- Navigate to the Schedule or Gantt view
- Confirm:
- The project has both tasks
- Task B shows a dependency arrow from Task A
- The date ranges match what you configured
Autotask may adjust the project's end date to match the latest task end date. If the project's end date appears different from what you set, this is expected behavior.
Extending the Pattern
More tasks: Add additional Create Task actions and chain dependencies as needed. Each task references {{custom.project.id}} and each dependency references the predecessor task's ID.
Dynamic task lists: Use the Iterate Through Array action to loop over a predefined list of tasks and create each one dynamically.
Scheduled recurring projects: Use a cron schedule to create the same project structure monthly or quarterly. For example, a cron of 0 8 1 * * creates the project on the 1st of every month at 8:00 AM UTC.
Key Takeaways
- Create entities in order: Project first, then Tasks, then TaskPredecessors
- Store each result in a variable: subsequent steps need the IDs from previous steps
- Use the date helper with
to_tz="Autotask": ensures dates are formatted correctly for the Autotask API (details) - Verify dependencies in the Gantt view: the Gantt chart is the most reliable way to confirm dependency linking
- Project end dates may shift: Autotask adjusts the project end date based on task end dates
Related Documentation
- API: Create an Object: creating any Autotask entity
- Iterate Through Array: looping for dynamic task lists
- Core Concepts: how rules, actions, and variables work together