> 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/cortex-agentix/configure-cortex-agentix/automations/playbooks/build-your-playbook/add-objects-from-the-task-library/add-manual-tasks-and-blank-tasks/create-a-communication-task.md).

# Create a communication task

Communication tasks enable you to send surveys to users, both internal and external, to collect data for an issue. The collected data can be used for issue analysis, and also as input for subsequent playbook tasks. For example, you can send a scheduled survey requesting analysts to send specific issue updates or send a single (stand-alone) question survey to determine how an issue was handled.

There are two types of communication tasks:

* **Ask tasks**: A conditional task that sends a single-question survey. The answer is used to determine how the playbook proceeds.
* **Data collection tasks**: A data collection task sends a survey of one or more questions. The answers are recorded in context data and can be used as input for subsequent tasks.

<details>

<summary>About ask tasks</summary>

An ask task is a type of conditional task that sends a single question survey, the answer to which determines how a playbook proceeds. If you send the survey to multiple users, the first answer received is used, and subsequent responses are disregarded. For more information about ask task settings, see [Create a conditional task](/cortex-agentix/configure-cortex-agentix/automations/playbooks/build-your-playbook/add-objects-from-the-task-library/add-manual-tasks-and-blank-tasks/create-a-conditional-task.md).

Because this is a conditional task, you need to create a condition for each of the answers. For example, if the survey answers include, **`Yes, No, and Maybe`**, there should be a corresponding condition (path) in the playbook for each of these answers.

Users interact with the survey directly from the message, meaning the question appears in the message and they click an answer from the message.

The survey question and the first response is recorded in the issue context data. This enables you to use this response as the input for subsequent playbook tasks.

For all ask conditional tasks, a link is generated for each possible answer the recipient can select. If the survey is sent to more than one user, a unique link is created for each possible answer for each individual recipient. These links are visible in the context data of the issue's Work Plan. The links appear under Ask.Links in the context data.

![](https://docs-cortex.paloaltonetworks.com/api/khub/maps/2iKvnhFnGXeKYHSA2AFcVw/resources/eu5T_w~zbyPoEZjglb4k6Q-2iKvnhFnGXeKYHSA2AFcVw/content?v=1a7ca3cd9c24b294\&Ft-Calling-App=ft/turnkey-portal)<br>

![](https://docs-cortex.paloaltonetworks.com/api/khub/maps/2iKvnhFnGXeKYHSA2AFcVw/resources/0UP7eUSQ0KoAOKLHNT5BPg-2iKvnhFnGXeKYHSA2AFcVw/content?v=fd28f60fe02fcbad\&Ft-Calling-App=ft/turnkey-portal)<br>

</details>

<details>

<summary>Create a data collection task</summary>

The data collection task is a multi-question survey (form) that survey recipients access from a link in the message. Users do not need to log in to access the survey, which is located on a separate site.

All responses are collected and recorded in the issue context data, whether you receive responses from a single user or multiple users. This enables you to use the survey questions and answers as input for subsequent playbook tasks. If responses are received from multiple users, data for multi-select fields and grid fields are aggregated. For all other field types, the response received most recently will override previous responses as it displays in the field. All responses are always available in the context data.

For all data collection tasks, a single link is generated for each recipient of the survey. These links are visible in the context data of the issue's Work Plan. The links appear in the context data under the Links section of that survey.

You can include the following types of questions in the survey.

* Stand alone questions. These are presented to users directly in the message, and from which users answer directly in the message (not an external survey).
* Field-based questions. These are based on a specific issue field (either system or custom), for example, an Asset ID field. The response (data) received for these fields automatically populates the field for this issue. For single-select field based questions, the default option is taken from the field’s defined default.

How to create a Data Collection task

1. From the Task Library pane, click the task you want, for example Blank Task.
2. In the Task Details pane, select the Data Collection Task Type.
3. Enter a meaningful name in the Task Name field for the task that corresponds to the data you are collecting.
4. Select the communication options you want to use to collect the data.

</details>

<details>

<summary>Message</summary>

* Ask by: The method for sending the message and survey. Options are:
  * Task (can always be completed directly in the Workplan)
  * Generated link (appears in the context data): A link to the data collection survey is available in the context data of the task.
  * Email: If you select this option, enter below the subject and message of the email and the email addresses of the users who should receive this message or survey.
* To: The message and survey recipients. You can define by:
  * Selecting from a predefined drop down list.
  * Manually typing email addresses for users and/or external users.
  * Clicking the context icon to define recipients from a context data source.
* CC of the email: A CC email address.
* Subject of the email: The message subject that displays to message recipients. You can write the survey question in the subject field or in the message body field.
* Message body: The message question body to be used in the notification sent to the given users along with the reply options.
* Require users to authenticate: Enable this option to have your SAML or AD authenticate the recipient before allowing them to answer. You must first set up an authentication integration instance and check Use this instance for external users authentication only in the integration instance settings.

</details>

<details>

<summary>Questions</summary>

* **Web Survey Title** sets the title shown on the survey.
* **Short Description** appears above the survey questions. Select **Preview** to review it.
* **Question** sets the question for recipients.
* **Answer Type** supports:
  * Short text
  * Long text
  * Number
  * Single Select
  * Multi select/Array
  * Date picker
  * Attachments
* **Mandatory** requires recipients to answer before submitting.
* **Help Message** appears when recipients hover over the help icon.
* **Placeholder** displays an example value until users enter a value.

Drag questions to change their display order.

</details>

<details>

<summary>Timing</summary>

* Retry interval (minutes): Determines the wait time between each execution of a command. For example, the frequency (in minutes) that a message and survey are resent to recipients before the response is received.
* Number of retries: Determines how many times a command attempts to run before generating an error. For example, the maximum number of times a message is sent. If a reply is received, no additional retry messages will be sent.

  Retries are not supported for data collection tasks that have errors sending emails (indicated by a server timeout). This is because retries only work on automation execution failures, not on email delivery issues.
* Task SLA: Set the SLA in granularity of weeks, days, and hours.
* Set task Reminder at: Set a task reminder in granularity of weeks, days, and hours.
* Complete automatically if:
  * Reached task SLA (with or without a reply): This option is grayed out.
  * Received \<enter a number> reply

</details>

<details>

<summary>Details</summary>

* Tag the result with: Add a tag to the task result. You can use the tag to filter entries in the War Room.
* Task description (Markdown supported): Describe what this task does. You can enter objects from the context data in the description. For example, in a communication task, you can use the recipient’s email address. The value for the object is based on what appears in the context every time the task runs.

</details>

<details>

<summary>Advanced</summary>

* **Register as case timeline record**: If enabled, the results of the task execution appear as a record in the case timeline. If enabled, you must enter a **Record name.** You have the option of adding an **Effective time**, **Description**, **Tags**, and marking the record as evidence and adding an evidence comment.\
  NOTE: Only enter an **Effective time** if you want the same exact time recorded every time the playbook task executes.**Using** selects an integration instance. Leave it empty to use all instances.
* **Extend context** appends action results to context data.
* **Ignore outputs** prevents output storage, except extended outputs.
* **Execution timeout (seconds)** sets the command timeout.
* **Indicator Extraction mode** controls extraction:
  * **None** disables indicator extraction.
  * **Inline** extracts indicators before other playbook tasks.
  * **Out of band** extracts indicators while other tasks run.
* **Mark results as note** adds results as a note.
* **Mark results as evidence** adds results as evidence.
* **Run without a worker** runs the task without a worker.
* **Skip this branch if this script/playbook is unavailable** skips unavailable work.
* **Quiet Mode** hides inputs, outputs, and extracted indicators. Errors and warnings remain visible.

</details>

5. Optional: Select **Preview** to customize the email's colors, text, and submit button.

   You can determine the color scheme and how the text in the message header and body appear, as well as the appearance and text of the button the user clicks to submit the survey.

   If you configured a custom logo in server settings, it will appear in the preview.

{% hint style="info" %}
When customizing HTML for data collection emails, do not apply CSS styles directly to the **`<body>`** tag. Cortex AgentiX injects your HTML as a fragment into an existing email template and removes the **`<body>`** tag to ensure valid HTML structure. Any styles applied to the **`<body>`** tag will be lost. To ensure your formatting renders correctly, wrap your content in a container element such as a **`<div>`** or **`<span>`** and apply your styles to that container.<br>

```
<body>
    <div style="font-family: sans-serif;">Content</div>
</body>
```

{% endhint %}

5. Select **Save**.

   The task is added to the playbook editor. A user icon indicates that it requires manual input.
6. Connect tasks in their logical order by dragging a wire between them.
7. Save the playbook.

<details>

<summary>Data collection task examples</summary>

![](https://docs-cortex.paloaltonetworks.com/api/khub/maps/2iKvnhFnGXeKYHSA2AFcVw/resources/WbVQ8ziiDZZMq6pXhF5c8A-2iKvnhFnGXeKYHSA2AFcVw/content?v=5d88ad644d2dee03\&Ft-Calling-App=ft/turnkey-portal)

![](https://docs-cortex.paloaltonetworks.com/api/khub/maps/2iKvnhFnGXeKYHSA2AFcVw/resources/VVsY2Uq_O5ysbZsl55SIlg-2iKvnhFnGXeKYHSA2AFcVw/content?v=6c08233e427661e6\&Ft-Calling-App=ft/turnkey-portal)

</details>

<details>

<summary>Configure communication task authentication</summary>

When sending a form in a communication task, you can configure user authentication to ensure only authorized users gain access to the form.

The authorized users are usually external users not in Cortex AgentiX, and they will not be able to access anything else in Cortex AgentiX.

1. Set up your SSO if it is not already configured. See [Authenticate users using SSO](/cortex-agentix/configure-cortex-agentix/users-and-roles-management/set-up-authentication/authenticate-users-using-sso.md) for more details.
2. In the Task details of your playbook communication task, check Require users to authenticate to have your SAML or AD authenticate the recipient before allowing them access to the form.

![](https://docs-cortex.paloaltonetworks.com/api/khub/maps/2iKvnhFnGXeKYHSA2AFcVw/resources/SrjK7c78UJWlx1WQTmdPSA-2iKvnhFnGXeKYHSA2AFcVw/content?v=d913ac2050c4b630\&Ft-Calling-App=ft/turnkey-portal)

<br>

</details>

<details>

<summary>Configure NGINX as a reverse proxy to access data collection links in emails</summary>

If you are using NGINX as a reverse proxy with SSL termination, configure the NGINX configuration file to enable accessing data collection links in emails.

1. Navigate to `/etc/nginx/sites-available/` and open the NGINX configuration file.
2. Update the file with the following configurations:

   ```
   server {
   	listen 443 ssl;
   	server_name <PROXY DOMAIN>;


   	ssl_certificate <path to CRT file>;
   	ssl_certificate_key <path to KEY file>;
   	ssl_protocols TLSv1.2 TLSv1.3;
   	ssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384';
   	ssl_prefer_server_ciphers on;


   	location / {
   		proxy_pass https://<XSOAR DOMAIN>;
   		proxy_cookie_domain <XSOAR DOMAIN> <PROXY DOMAIN>;
   		proxy_pass_header Set-Cookie;
   		proxy_set_header X-Real-IP $remote_addr;
   		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
   		proxy_set_header X-Forwarded-Proto $scheme;
   		}

   	} 
   ```

<br>

</details>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-agentix/configure-cortex-agentix/automations/playbooks/build-your-playbook/add-objects-from-the-task-library/add-manual-tasks-and-blank-tasks/create-a-communication-task.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
