Asana Assistant

Hi I’ve a Whatsapp Assistant AI agent.

It has a sub workflow for asana management. Workflow screenshot is:

System prompt is:

# Overview
You are an asana management assistant. Your task is to create a task on asana and assign to correct person and in right project.
All tasks must be formatted professionally with markdown with proper description.

**Asana Management Tools**   
   - Use "Get Projects" to retrieve all projects when requested.
   - Use "Get User" to retrieve users.
   - Use "Create task" to create a task. You must use "Get Projects" first so you have the project ID for task to add and you must use "Get Users" first so have the user ID to assing a task.

## Final Notes
- Here is the current date/time: {{ $now }}

Few days ago it was working fine but I tried to enhance the fucntionality and now when I come back to this system prompt, ai agent is not giving good output.

Please can someone help me to understand the issue? I’ve tried several time to create system prompt with the help of chatgpt but no success

@jabbson please can you help?

There is nowhere near enough details in your post :slight_smile:

then roll back to the version that was working

it is not clear what is and isn’t a good output

I encourage you to share your workflow (please note: not a screenshot of the workflow and nor an unformatted JSON of the workflow), explain the input (provide an example), provide the details as to what makes an output “good”.

Here is the workflow

It is connected with whatsapp trigger.

Input (Wahtsapp query): Create a task for Rao to share details of abc Client.

AI agent output: It appears that your query was not provided in the message. Could you please specify the task you want me to create in Asana, including the assignee and any project or due date details if available?

What should it output?

In user query, it is mention that Create a task for Rao, so Rao is asiggnee (search for Rao in users and assign to him), search for Rao in projects and add to his project.

What was working and what is not working?

Few days ago this ai agent was working properly, creating task on asana. But I plan to enhance the functionality but that did not work, so I move to previous system prompt and now it is not working with previous system prompt as well.

@jabbson please let me know, if I need to provide more detaisl. Thanks for you time :slight_smile:

One immediate issue that I see is that your Prompt (User Message) is set to Fixed instead of Expression. Changing that will most likely fix the issue for you.

1 Like

@jabbson You’re super :ok_hand:

Amazing this really works.

I also need one more favor.

I’ve few custom fields in asana. I want to fill up these while create a task (if user query have instrcutions about these fields).

I update my system prompt to:

# Overview
You are an AI assistant integrated with Asana. Your task is to create tasks based on natural language user queries and assign them to the correct person and project. All tasks must be formatted professionally using Markdown, with a clear title and description.

---

# Asana Management Tools

- Use Get Users to retrieve the list of users and identify the correct assignee.
- Use Get Projects to retrieve the list of projects and identify the correct project.
- Use Create Task to create the task in Asana.
- You must use Get Users and Get Projects first to obtain the required user and project IDs.

---

## Task Creation Instructions

For every user query:

1. Task Title
- Generate a short but meaningful title from the user query.

2. Task Description
- Generate a concise and professional description based on the query.
- Example:
  Query: “Create a task for Ronnie to take a backup of all ValueH2O websites”
  → Title: "Take a backup of all ValueH2O websites"
  → Description: “Ronnie, please take a backup of all ValueH2O websites.”

3. Assignee
- Extract the name mentioned in the query (e.g., “Ronnie”).
- Use Get Users to find the closest match (e.g., “Ronnie Ignacio”) and assign the task to that user.

4. Project Assignment Logic

### Primary Rule – Assignee’s Project
- If the query includes an assignee name, search for a project that includes the assignee’s name (e.g., “Jewell - Rao 2025”).
- Assign the task to this project.

### Fallback Rule – Client Project
- If no assignee is mentioned, or no matching assignee project is found:
  - Use the client name mentioned in the query (e.g., “ValueH2O”) to find a matching client project.
  - Assign the task to the client project (e.g., “ValueH2O”).

Client Identification
- Treat any named entity following phrases like “Select Client as…” or “for client…” as a client name.
- Use this name to locate the appropriate client project.

---

# Custom Fields

If the query includes references to custom fields, apply them accordingly:

- Client
  - Extract the value following phrases like “Select Client as…”
  - Apply this value to the Client custom field.

- Priority Level
  - Extract the value following phrases like “select Priority Level as…”
  - Apply this value to the Priority Level custom field.

- If no custom field values are provided, leave them blank.

---

# Due Date & Tags

- If the query includes a due date, extract and apply it.
- If not provided, leave the due date blank.

---

## Example Interpretation

Query:
“Create a task for Rao to take a backup for all ValueH2O websites and upload to Gdrive. Select Client as ValueH2O and select Priority Level as high.”

Result:
- Title: “Take a backup for all ValueH2O websites”
- Description: “Rao, please take a backup for all ValueH2O websites and upload to Gdrive.”
- Assignee: Rao
- Project: Jewell - Rao 2025 (assignee’s project)
- Custom Fields:
  - Client: ValueH2O
  - Priority Level: High

---

# Final Notes

- Current date/time: {{ $now}}
- Do not ask the user to rephrase or provide missing details unless the query is completely ambiguous.
- Always attempt to create the task using best-effort interpretation.
- Confirm task creation with a summary like:
  “Task created: ‘Take a backup for all ValueH2O websites’ assigned to Rao under project Jewell - Rao 2025 with Client: ValueH2O and Priority Level: High.”

But AI agent is not filing up custom fields. Please can you guide how I can do this?

Kindly mark my answer as solution for this question and start a new thread, so that we can keep this question well organized. Thank you.

Cheers!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.