Create Asana tasks from GitHub issues
A GitHub + Asana agent flow
Engineering files issues in GitHub. The people planning the sprint, a PM, a designer, an ops lead, live in Asana and rarely open the repo. So work gets done that the roadmap never reflects, and the roadmap holds items engineering closed last week. This recipe keeps the two in sync in one direction: your agent reads new GitHub issues and opens matching Asana tasks in the project your team actually plans against. It calls list_issues with a label or state filter, then batches them through create_tasks, carrying the title, a description that links back to the issue, and any assignee or due date you map. The GitHub server doesn't push, so the agent reads on a schedule, hourly or each morning, and only issues that match your filter become tasks.
The flow
list_issuesLists issues in a repository with filters.
create_tasksCreates up to 50 tasks with assignments, dates, and custom fields.
Step by step
- Scope which issues cross over
Name the repo, the state (open), and a label that marks planning-relevant work, like 'roadmap' or 'needs-triage', so internal chores don't all spawn Asana tasks. Point the agent at one Asana project.
- Read the GitHub side
The agent calls list_issues with your filters. GitHub paginates, so it walks the pages, and note that this endpoint can return pull requests too unless you exclude them.
- Create the tasks in a batch
It maps each issue to a task and calls create_tasks, which takes up to 50 at once, with the title, a description quoting the issue body and linking its URL, plus an assignee or due date if you mapped one.
- Record what's already mirrored
Store each GitHub issue number against the Asana task it created. Next run, the agent skips issues that already have a task, so re-running doesn't duplicate the board.
Tell your agent
Each morning, list open GitHub issues in acme/web labeled 'roadmap'. For any that don't already have an Asana task, create tasks in the Q3 Roadmap project with the issue title, a description that quotes the body and links the issue URL, and a due date two weeks out. Don't recreate tasks for issues you've already mirrored.
Setup
This flow needs both servers connected to your agent. Follow each install guide:
Worth knowing
- list_issues returns pull requests alongside issues in GitHub's API. Tell the agent to skip anything with a pull_request field so PRs don't land on the Asana board as tasks.
- create_tasks needs a target project or workspace GID and, for assignees, a user GID, not a name. Resolve those once with get_projects and get_users and pass the IDs.
- The batch caps at 50 tasks per call. On a first backfill of a busy repo, have the agent page through GitHub and chunk the creates so it doesn't exceed the limit.
Questions
- Does closing a GitHub issue close the Asana task?
- Not in this recipe. It's create-only, GitHub to Asana. To mirror status back you'd add an update step keyed on the issue number you stored, and decide which side wins when both change.
- How does it avoid creating the same task twice?
- By storing the GitHub issue number next to the Asana task ID it created. On each run it lists current issues, drops the ones already mapped, and only creates tasks for the remainder.
- Can it run on its own?
- It runs when you schedule it. The GitHub server responds to the agent's call, it doesn't notify Asana on its own, so you pick the cadence and the agent reads then writes on that beat.