> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mileapp.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Task

## Overview

The **Create Task** automation type automatically creates a new task in a specified Flow when an automation event is triggered. This enables automated workflow chains where one task triggers the creation of follow-up tasks, streamlining multi-step processes.

<div align="center">
  <img src="https://mintcdn.com/mileapp-c1584fbc/jvVKvpPwiK1qABos/images/create-task-automation-type.png?fit=max&auto=format&n=jvVKvpPwiK1qABos&q=85&s=dc16f5247ea301a03d0b3f20d05d626f" alt="Create Task automation configuration" width="600" data-path="images/create-task-automation-type.png" />

  <p><i>Create Task automation configuration showing Flow selection and field mapping</i></p>
</div>

## When to Use Create Task

Use this automation type when you need to:

* Automatically create follow-up tasks in a workflow sequence
* Generate inspection or quality check tasks after service completion
* Create documentation or reporting tasks after task completion
* Trigger dependent tasks in multi-stage processes
* Automate task creation based on external data source changes

## Event Availability

Create Task automation type is available for:

* **On Task Created** - Create a new task when another task is created
* **On Task Assigned** - Create a new task when a task is assigned
* **On Task Finished** - Create a new task when a task is completed
* **On Data Source Created** - Create a new task when new data is added to a Data Source

## Configuration Fields

When you select Create Task as the automation type, you need to configure the following:

### 1. Create Task \*

Select the Flow for the new task that will be created.

**Purpose:**

* Defines which type of task will be automatically created
* Determines what fields need to be mapped

**How it works:**

* Choose from any Flow configured in your organization
* Once selected, the Flow's fields will appear for mapping

### 2. Field Mapping (Automation Detail)

After selecting the Flow, you'll see all the fields from that Flow. For each field, you can:

**Option A: Manual Input**

* Type a static value directly into the field
* Useful for default values that don't change

**Option B: Field Reference**

* Click the search icon next to the field
* Select a field from the trigger Flow to map its value
* The value from the trigger task will be copied to the new task

**Option C: Leave Empty**

* Fields can be left empty if they are optional
* Required fields must be filled either manually or via reference

**Field Mapping Options:**

* **Text Input** - Type static values or use field references
* **Component Reference** - Map components from trigger Flow to new task Flow
* **Mixed Approach** - Combine static values and field references as needed

## Use Cases

### 1. Delivery and Pickup Workflow

**Scenario:** Automatically create a pickup task when a delivery task is created.

**Configuration:**

* **Event:** On Task Created
* **Flow (Trigger):** Delivery
* **Automation Type:** Create Task
* **Create Task Flow:** Pickup
* **Field Mapping:**
  * Requester Name → Customer Name (from Delivery)
  * Requester Address → Customer Address (from Delivery)
  * Pickup Point Coordinate → Customer Coordinate (from Delivery)

**Benefit:** Ensures every delivery automatically generates a corresponding pickup task.

### 2. Quality Inspection After Service

**Scenario:** Create an inspection task when a service task is completed.

**Configuration:**

* **Event:** On Task Finished
* **Flow (Trigger):** Home Cleaning
* **Automation Type:** Create Task
* **Create Task Flow:** Quality Inspection
* **Field Mapping:**
  * Customer Name → Customer Name (from Home Cleaning)
  * Service Address → Service Location (from Home Cleaning)
  * Service Date → Completion Date (from Home Cleaning)

**Benefit:** Automatic quality control workflow without manual task creation.

### 3. Follow-up Tasks from Field Canvassing

**Scenario:** Create follow-up sales tasks when canvassing identifies opportunities.

**Configuration:**

* **Event:** On Task Finished
* **Flow (Trigger):** Field Canvassing
* **Automation Type:** Create Task
* **Create Task Flow:** Field Sales
* **Field Mapping:**
  * Prospect Name → Canvassed Name (from Field Canvassing)
  * Prospect Contact → Contact Number (from Field Canvassing)
  * Interest Level → Survey Result (from Field Canvassing)

**Benefit:** Immediate follow-up task creation for hot leads.

### 4. Documentation Task from Data Source

**Scenario:** Create documentation tasks when new data is added to a Data Source.

**Configuration:**

* **Event:** On Data Source Created
* **Flow (Trigger):** Customer Database
* **Automation Type:** Create Task
* **Create Task Flow:** Customer Documentation
* **Field Mapping:**
  * Customer Name → Name (from Data Source)
  * Customer ID → ID (from Data Source)
  * Registration Date → Created Date (from Data Source)

**Benefit:** Ensures every new customer record triggers proper documentation workflow.

## How It Works

1. **Event Occurs:** The specified event is triggered (task created, assigned, finished, or data source created)
2. **Rules Evaluated:** If Rules are configured, they are checked against the triggering data
3. **Automation Triggers:** The Create Task automation is activated
4. **Task Created:** A new task is created in the specified Flow
5. **Fields Populated:** Fields are filled with mapped values (references or static text)
6. **Task Available:** The new task appears in the task list and is ready for assignment

## Field Mapping Best Practices

### Understanding Field Types

When mapping fields from the trigger Flow to the new task Flow:

**Direct Mapping:**

* Map fields with similar data types (text to text, coordinate to coordinate)
* Example: Customer Name → Requester Name

**Cross-Component Mapping:**

* You can map any field from trigger to any field in new task
* Example: Order Number → Invoice Reference

**Static Values:**

* Use for fields that should always have the same value
* Example: Priority → "High" (always set to High)

**Optional vs Required:**

* Required fields (marked with \*) must be filled
* Optional fields can be left empty

### Field Mapping Strategies

1. **Complete Mapping:** Map all relevant fields for full context transfer
2. **Partial Mapping:** Map only essential fields, leave others for manual input
3. **Hybrid Approach:** Map some fields automatically, add static defaults for others

## Important Notes

### Task Creation Behavior

* **Immediate Creation:** New tasks are created as soon as automation triggers
* **No Assignment:** Created tasks are unassigned by default (use Create and Assign Task if assignment is needed)
* **Hub Inheritance:** New tasks are created in the same hub as the trigger task (for task events)
* **Independent Tasks:** Created tasks are separate entities, not linked to trigger task

### Rules and Filtering

* **Use Rules to Control When Tasks Are Created:** Add conditions to create tasks only when specific criteria are met
* **Example:** Only create inspection tasks when service rating is below 4 stars
* **Multiple Automations:** Create different automation rules for different scenarios

### Performance Considerations

* **Avoid Circular References:** Don't create automation loops (Task A creates Task B, Task B creates Task A)
* **Use Rules Wisely:** Too many automations without Rules can create excessive tasks
* **Monitor Task Volume:** Review automation logs to ensure tasks are created as intended

## Best Practices

1. **Clear Flow Selection:** Choose the appropriate Flow that represents the next step in your workflow.

2. **Meaningful Field Mapping:** Map fields that provide context and reduce manual data entry.

3. **Use Field References:** Prefer field references over manual input to ensure data consistency.

4. **Test Thoroughly:** Create test tasks to verify field mapping works correctly.

5. **Document Automation Purpose:** Use clear automation names that describe the workflow (e.g., "Create Pickup Task when Delivery Created").

6. **Leverage Rules:** Combine with Rules to create tasks only when specific conditions are met.

7. **Monitor and Adjust:** Regularly review created tasks to ensure automation is working as expected.

8. **Consider Assignment Needs:** If tasks need immediate assignment, use Create and Assign Task instead.

## Troubleshooting

**Issue:** New task is not being created when event triggers

**Possible Causes:**

* Automation is not set to Active
* Event Flow does not match automation configuration
* Rules exclude the triggering task/data
* Required fields in new task Flow are not mapped

**Solution:**

* Verify automation toggle is ON
* Check Event and Flow settings match trigger
* Review Rules for conflicts
* Ensure all required fields have values (mapped or static)

**Issue:** New task has empty fields

**Possible Causes:**

* Field reference is mapped to an empty field in trigger
* Incorrect field mapping
* Field types don't match

**Solution:**

* Verify trigger task has values in referenced fields
* Check field mapping configuration
* Re-map fields if necessary

**Issue:** Too many tasks are being created

**Possible Causes:**

* No Rules configured to filter when tasks should be created
* Multiple overlapping automation rules

**Solution:**

* Add Rules to create tasks only when needed
* Review all active automations for the same event
* Consolidate or refine automation rules

**Issue:** Wrong Flow is being created

**Possible Causes:**

* Incorrect Flow selected in "Create Task" field
* Multiple automations with different Flows

**Solution:**

* Edit automation and verify correct Flow is selected
* Review all automations for the same event

## Related Documentation

* [Automation Events - On Task Created](/pages/automation/automation-event/on-task-created)
* [Automation Events - On Task Assigned](/pages/automation/automation-event/on-task-assigned)
* [Automation Events - On Task Finished](/pages/automation/automation-event/on-task-finished)
* [Automation Events - On Data Source Created](/pages/automation/automation-event/on-data-source-created)
* [Create and Assign Task](/pages/automation/automation-type/create-and-assign-task)
* [Automation Introduction](/pages/automation/introduction-to-automation)
* [Flow Management](/pages/flow/introduction)

## Frequently Asked Questions

**Q: Can I create multiple tasks with one automation?**

A: No, each Create Task automation creates one task. To create multiple tasks, set up multiple automation rules or use API integrations.

**Q: Will the created task be assigned to anyone?**

A: No, Create Task automation creates unassigned tasks. If you need automatic assignment, use Create and Assign Task automation type instead.

**Q: What happens if a required field is not mapped and has no value?**

A: The automation will fail to create the task. All required fields (marked with \*) must have either a mapped value or a static value.

**Q: Can I create a task in a different Flow than the trigger?**

A: Yes, that's the primary use case. The trigger event happens in one Flow, and you create a new task in a different Flow.

**Q: How is this different from Create and Assign Task?**

A: Create Task creates an unassigned task. Create and Assign Task creates a task AND immediately assigns it to a specific user. Choose based on whether immediate assignment is needed.

**Q: Can I use Create Task for routing events?**

A: No, Create Task is not available for routing events (On Routing Finished, On Routing Dispatched, On Start Trip, On Finish Trip). It's only available for task and data source events.

**Q: Will field validation rules from the Flow be applied?**

A: Yes, all Flow field validation rules apply to automatically created tasks. If validation fails, the task creation will fail.

**Q: Can I create tasks in multiple hubs?**

A: For task events, created tasks inherit the hub from the trigger task. For data source events, you can configure hub assignment through field mapping if the target Flow has a hub field.
