> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/xsoar-6-administrator-guide/6.12/configure-cortex-xsoar/customize-and-configure-cortex-xsoar/playbooks/playbook-task-fields/communication-tasks/add-ad-hoc-tasks-to-a-work-plan.md).

# Add Ad Hoc Tasks to a Work Plan

Add ad hoc Work Plan tasks in Cortex XSOAR 6.12.

Within the Work Plan, you can create tasks for a specific iteration of a playbook. The task type can be an automation or another playbook. For example, within a manual task, you might need to enrich some data and run an investigation playbook.

When you create a task, add a name, automation, and description. The name and description should be meaningful so that the task corresponds to the data that you are collecting.

1. In the Work Plan, go to the task where you want to add and click the + sign at the bottom right-hand corner of the task.

   The ad hoc task is added after the task on which you clicked.
2. Select the task type.
   * Standard: Runs a single automation.
   * Playbook: Runs a playbook to enhance the investigation.

     The playbook functions as any playbook would and requires you to define the inputs and outputs, as well as any other details.
3. Click **Save**.
4. To run the Work Plan again, click the Run again icon.

An example use case could be where you have a phishing investigation and the initial playbook run has parsed the email and extracted several indicators, including some email addresses.

As part of the manual investigation, you could use the **Email Address Enrichment - Generic v2.1** playbook as an ad hoc playbook task to get more information about these email addresses.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/xsoar-6-administrator-guide/6.12/configure-cortex-xsoar/customize-and-configure-cortex-xsoar/playbooks/playbook-task-fields/communication-tasks/add-ad-hoc-tasks-to-a-work-plan.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
