# Create custom quest tasks

## Video

{% embed url="<https://www.loom.com/share/25ecb2d65a014a309bb16d13bf51619c>" %}

{% hint style="info" %}
**Prerequisites**

* You need a Domino account with access to the Quests section
* Basic understanding of Domino's [automation system](https://docs.domino.run/docsv2/automations/building-your-first-automation)
* An idea of what specific task validation you want to implement
  {% endhint %}

## Overview

While Domino offers many built-in task types, your community might need specialized validation logic. Custom quest tasks let you define exactly how submissions are verified, giving you complete control over the user experience and validation criteria.

## Understanding Task Types in Domino

Domino's [quest system](https://docs.domino.run/docsv2/quest-management/launching-your-first-quest) supports different types of tasks to engage your community.

### Built-in Tasks

These are pre-configured tasks with standard validation:

* Submit URL
* Submit Text
* Upload File
* Tweet/Retweet/Reply
* Quiz
* Visit Link
* And more

<figure><img src="https://1542229437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu8TrWRyvdpP97AjvHh9W%2Fuploads%2Fgit-blob-4c687f9b7b1795c08eb16292ba6bf96f4c0aa895%2Fscreenshot%20(16).png?alt=media" alt=""><figcaption><p><em>Built-in tasks provide quick setup for common community activities</em></p></figcaption></figure>

### Task Templates

These are reusable tasks published to the task library, usually built on top of built-in tasks with custom validation logic.

### Custom Tasks

When you need specific validation logic not covered by existing options, custom tasks give you complete control using Domino's [automation system](https://docs.domino.run/docsv2/automations/building-your-first-automation).

{% hint style="success" %}
**Custom tasks are perfect for:**

* Verifying complex user actions across multiple platforms
* Creating unique interactive experiences
* Implementing community-specific validation rules
* Building verification logic that spans multiple steps
  {% endhint %}

## Creating Your First Custom Task

### Adding a Custom Task to Your Quest

1. In your [quest setup](https://docs.domino.run/docsv2/quest-management/launching-your-first-quest) page, click **Add Task**
2. Select **Custom** from the task options
3. Give your task a descriptive name and add instructions in the description field

{% @supademo/embed demoid="cmawi5ilu6j7jho3r971fxrsq" url="<https://app.supademo.com/demo/cmawi5ilu6j7jho3r971fxrsq>" %}

### Setting Up Task Validation

Every custom task requires a validation automation that determines whether a user has successfully completed the task.

1. Navigate to the **Validation** tab in your task configuration
2. Click **Create new** to set up a validation automation

## Building the Validation Automation

### Automation Structure Requirements

A valid task automation must include:

* A **Task Submitted** trigger that activates when a user attempts the task
* A flow that evaluates the user's submission
* A **Task Completed** action for successful validation
* A **Task Failed** action for unsuccessful validation

{% hint style="warning" %}
Your automation **must** include both "Task Completed" and "Task Failed" actions, or users might get stuck when their submission doesn't meet your criteria.
{% endhint %}

### Designing the Validation Logic

1. In the automation editor, start with the pre-configured **Task Submitted** trigger
2. Add conditions to evaluate the user's submission
3. Connect the conditions to either "Task Completed" or "Task Failed" endpoints

### Crafting Conditional Logic

Use the conditional step to determine if the task should be marked as complete:

1. Click on the **Set the task condition** step
2. Configure your validation rules based on user input or external data
3. Make sure successful paths lead to "Task Completed" and failed paths to "Task Failed"

{% hint style="info" %}
The automation receives all user input from the task UI. Access these inputs using [variables](https://docs.domino.run/docsv2/automations/managing-data-with-variables-and-inputs) in your conditions.
{% endhint %}

{% @supademo/embed demoid="cmawj0htx6kjhho3r83jjb8jx" url="<https://app.supademo.com/demo/cmawj0htx6kjhho3r83jjb8jx>" %}

## Configuring User Requirements

### Required Accounts & Wallets

You can specify what connected accounts users need to complete your task:

1. Navigate to the **User identification** tab
2. Select which social accounts users need (Twitter, Discord, etc.)
3. Choose any wallet requirements for blockchain-related tasks

<figure><img src="https://1542229437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu8TrWRyvdpP97AjvHh9W%2Fuploads%2Fgit-blob-370bbacd9044ab8e12b2f13dac0c0a412b9c72b1%2Fscreenshot%20(17).png?alt=media" alt=""><figcaption><p><em>Configure which connected accounts users need to complete your task</em></p></figcaption></figure>

## Advanced Configuration

### Custom Input Fields

If your task requires user input beyond the built-in options:

1. Base your custom task on an appropriate built-in task (e.g., "Submit Text" for text input)
2. Configure the input fields in the **Config** tab
3. Access these inputs in your validation automation

### Custom Success Messages

Configure what users see when they complete the task:

1. In your validation automation, use the **Task Completed** action
2. Add a custom success message in the "reason" field
3. Enable "Use success message as claim success message" to display this to users

## Creating Reusable Task Templates

Once you've created a useful custom task, you can convert it to a template for reuse across multiple [quests](https://docs.domino.run/docsv2/quest-management/launching-your-first-quest).

### Converting a Task to a Template

1. Click the three dots menu (⋮) on your task card
2. Select **Create task template**
3. Confirm the conversion

{% hint style="success" %}
Task templates can be reused across quests and optionally published to the Domino task library for anyone to use.
{% endhint %}

## Testing Custom Tasks

Before publishing your quest:

1. Save your quest as a draft
2. Use the preview feature to test the task from a user's perspective
3. Verify that your automation correctly validates both successful and failed attempts

## Troubleshooting

{% hint style="warning" %}
**Common Custom Task Issues**

* **Stuck in processing**: Make sure your automation has both "Task Completed" and "Task Failed" endpoints
* **Validation not working**: Check that your conditional logic correctly evaluates user submissions
* **Missing user input**: Ensure you've configured appropriate input fields in the Config tab
  {% endhint %}

### Debugging Custom Task Automations

If your task validation isn't working as expected:

1. Test your automation directly in the automation editor
2. Check the automation runs for failed validations to understand what's happening
3. Verify that all connections between steps are correctly configured
