# Task Creation Failed → Backup Task Behavior

When the integration cannot create the primary Asana task, the plugin
follows a predictable fallback flow so you don’t lose context.

#### Event Flow

1.  **Plain-text retry.** If the task was rejected because of its rich-text
    description, the plugin automatically retries once with the description
    sent as **plain text**. Most description-related failures recover here
    and a normal task is created — no backup task is needed.
2.  **Error recorded for admins.** If creation still fails, the technical
    error is saved to the entry (`task_creation_error`) and added as an
    **entry note**, and the failure is listed in the **Asana Integration
    dashboard widget**. This happens whether or not the backup task below
    succeeds.
3.  **Backup task attempted** in Asana.
4.  **If backup succeeds:**
    - An **entry note** is added with a direct link to the backup task.
    - Any **notifications** tied to *Backup Task Created* are sent.
5.  **If backup fails:**
    - An **entry note** is added with the backup attempt error.
    - Any **notifications** tied to *Backup Task Creation Failed* are
      sent.

#### Backup Task — Exact Details

- **Name:** `Task Creation Failed`
- **Project:** the **Fallback project** configured on the **Settings tab**
  (GravityOps → Asana → Settings). Putting the backup in a fixed project
  keeps it findable. If no fallback project is set, the task is created in
  the connected user’s workspace context without a project.
- **Assignee:** the **Fallback assignee** configured on the Settings tab.
  If none is set — or the configured user has since been removed — it
  falls back to the **connected Asana user**.
- **Due date:** **today** (same day as the failed attempt)
- **Description (plain text):**
  - Includes **all mapped task values** the original task would have
    received (name, description, assignee, due date, project/section,
    tags, custom fields, etc.) so you can recreate it manually.
  - The description is kept user-friendly; the technical API error is
    **not** placed on the task (see "Where to See the Details").

> The backup task is created defensively: if the fallback project or
> assignee no longer exists, the plugin degrades gracefully and still
> creates the notice (assigned to the connected user, with no project)
> rather than losing it.

#### Where to See the Details

- **Gravity Forms → Entries → (Entry)**: review the **entry notes** for
  the technical error and the backup result (with a link if created).
- **Dashboard → Asana Integration widget**: shows a **Recent task
  creation failures** list with the error and a link to the entry.
- **Asana**: open the backup task (if created) for the copied payload to
  recreate the task manually.

#### What to Do Next

1.  **Read the error** — it will appear either in the **entry note** (if
    the backup also fails) or in the **backup task description** (if the
    backup succeeds).
2.  **If you can fix the issue**, manually create the desired task in
    this one‑time instance based on the backup task or entry data.
3.  **If the problem can’t be resolved or persists**, enable **Gravity
    Forms logging** (Forms → Settings → Logging) and contact support
    with:
    - The error text from the entry note or backup task and logs from
      the Asana Integration plugin.

**Common Causes to Check**

- **Permissions / Access:** connected user lacks access to the selected
  **project/section/assignee/tag/custom fields**
- **Malformed rich‑text / merge tags** in the task description
- **Invalid field values** (e.g., wrong enum option, date formats,
  custom field mismatch)
- **Disconnected / expired OAuth** or **API limits**
