Email assistant: Turn starred emails into Asana tasks with AI
Star a Gmail email and AI turns it into Asana tasks with due dates, attached files and a Slack notification.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/create-asana-tasks-from-starred-gmail-emails-with-ai/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Personal Productivity · Task management
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/create-asana-tasks-from-starred-gmail-emails-with-ai
Set it up with the CLI
- Add it. Copies the folder into
zaps/create-asana-tasks-from-starred-gmail-emails-with-ai/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/create-asana-tasks-from-starred-gmail-emails-with-ai - Fill in the values in
config.ts, and in any other file the list marks. Replace each one as its comment and SKILL.md say. - Deploy it. Asks for any value still left, signs you in to Zapier if you aren't, then publishes it to your account.
npx zap-pack deploy create-asana-tasks-from-starred-gmail-emails-with-ai - Check it. Its recent runs, with status and errors.
npx zap-pack logs create-asana-tasks-from-starred-gmail-emails-with-ai
zaps/create-asana-tasks-from-starred-gmail-emails-with-ai/
- README.mdWhat it does, for people
- SKILL.mdHow an agent sets it up: what to ask you, and how to test it
- config.tsIts settings 4 to fill in
- connections/ai.tsThe
aiaccount it uses - connections/asana.tsThe
asanaaccount it uses - connections/gmail.tsThe
gmailaccount it uses - connections/slack.tsThe
slackaccount it uses - triggers/new-starred-email.tsWhat starts it:
gmailstar_message - workflow.tsThe code; each
ctx.stepis a step in the Zap
Agents: add --yes to any command so it never prompts. When it needs an answer only the user can give, it stops and names the flag that supplies it.
SKILL.md
View MarkdownWhat it does
- Trigger: the user stars an email in Gmail (
gmail,star_message). - Workflow skips the email if it has no subject, or if the sender's address contains
noreply. - AI by Zapier (
ai,get_completion) reads the email body and returns the actions the user must complete, each with a short name, a description and a due date inYYYY-MM-DDform. Tasks for other people are ignored. With no date in the email, the due date is three days from today. - Asana (
asana,create_task_v2) creates one task per action in the chosen workspace and project. The task description holds the action's details, the email body and a link to the email. - Asana (
asana,attach_file) attaches the email's files to each new task, when the email has any. - Slack (
slack,direct_message) sends a message with a link to each new task.
Ask the user
Each REPLACE_… value is set per person. Resolve names to IDs with the user's own connections; don't ask them to paste an ID you can look up.
| Setting | Where | What goes there |
|---|---|---|
ASANA_WORKSPACE_ID |
config.ts |
The Asana workspace for the tasks: pick it from the workspace list on the user's Asana connection |
ASANA_PROJECT_ID |
config.ts |
The project for the tasks, inside that workspace: pick it from the project list on the user's Asana connection |
ASANA_ASSIGNEE_ID |
config.ts |
The person the tasks are assigned to, usually the user: pick them from the assignee list on the user's Asana connection |
SLACK_CHANNEL |
config.ts |
Where the notification goes, a channel or the user's own @username: look it up with the user's Slack connection |
The defaults AI_MODEL and NO_REPLY_MARKER in config.ts can stay as they are unless the user asks for a different model.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/create-asana-tasks-from-starred-gmail-emails-with-ai, replace each REPLACE_… value as this file says, then run npx zap-pack deploy create-asana-tasks-from-starred-gmail-emails-with-ai, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. No Zapier MCP tools? Read https://docs.zapier.com/mcp/get-started/quickstart.md and follow the page for the app you are running in to get the user connected, then continue with this build.
- Accounts: bind
gmailto the user's Gmail connection for the mailbox whose starred emails should become tasks. Bindasanato the user's Asana connection,slackto their Slack connection, andaito their AI by Zapier connection. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/new-starred-email.tsandconnections/are settings, not code: set the workflow's trigger and connection bindings from them. The trigger file names the app by its slug; for the trigger'sselected_api, callsearch_triggerswith that slug, find the row whosekeyis the trigger'sevent, and use<app_key>@<app_version>from it. - Build guide: load Zapier's build guide with
get_zapier_skill("zapier:build-workflows")and follow it to create and publish the workflow. Build only: do not test-run or enable it without asking the user first. - Fields: inspect the Asana
create_task_v2andattach_fileactions, the Slackdirect_messageaction and the AIget_completionoutput with the user's connections before the first run, and fix any key inworkflow.tsthat doesn't match. In particular, confirm that the AI step returns its array underresult, and that the Gmail trigger output hasmessage_id,subject,body_plain,message_url,fromandall_attachments.
Test it
Test only with the user's approval, and only with a Gmail message they sent to themselves, a test Asana project and a Slack channel they own. Run this sample as a draft test (run_workflow_draft in Zapier MCP):
{
"message_id": "18c0example",
"subject": "[install-test] Send the Q3 numbers by Friday",
"body_plain": "Please finalize the Q3 report by Friday and confirm the venue for next week's client meeting.",
"message_url": "https://mail.google.com/mail/u/0/#inbox/18c0example",
"from": { "email": "test@example.com" },
"all_attachments": []
}
Confirm that one or two tasks appear in the test project with due dates, and that the Slack message links to them. If run-status tools aren't available, check the project and the channel directly. The user deletes the test tasks, not the agent.
Notes
- Every starred email runs the AI step, so each one uses AI credits.
- Gmail's starred-email trigger fires for an email starred within two days of arriving.
- AI can misread a due date or miss an action. The task description keeps the email body and link so the user can check.
- Never commit a real workspace, project, channel or email address.