Asana and Twilio integrate through the Asana Webhooks API and Asana REST API to send SMS when tasks are assigned to a team member, when due dates arrive, or when a project section transitions to a milestone state, keeping team members informed on their phones without relying on Asana's native notification emails. This integration suits teams that manage client deliverables or operational checklists in Asana and need SMS as a higher-urgency channel for time-sensitive assignments and deadline alerts. The setup uses an Asana webhook subscription on a project or task resource, your middleware to interpret the event payload, and the Twilio Messages API to send the notification to the right phone.
What You Need Before You Start
Generate an Asana personal access token from your Asana profile settings under Apps, then Developer apps, then Personal access tokens, and note the token value as it is only shown once. Your Asana API base URL is https://app.asana.com/api/1.0/ and all requests require the Authorization header set to Bearer {yourToken}. From Twilio, collect your Account SID, Auth Token, and an SMS-capable phone number, and build a phone directory mapping Asana user GIDs to mobile phone numbers, since Asana's user objects do not include phone numbers and you will need to manage this mapping separately. Your middleware endpoint must respond to the Asana webhook handshake by echoing the X-Hook-Secret header value back in the response within 10 seconds of the registration call, which is a required one-time handshake before Asana begins delivering real events.
Step-by-Step Integration Guide
Register an Asana webhook by calling POST https://app.asana.com/api/1.0/webhooks with a JSON body containing data.resource set to the GID of the project you want to monitor and data.target set to your middleware endpoint such as https://yourapp.com/asana/webhook. Asana responds with HTTP 201 and simultaneously sends a handshake request to your endpoint with a X-Hook-Secret header containing a random value. Your middleware must return HTTP 200 with the same X-Hook-Secret value in the response header and an empty body on that first request, after which Asana marks the webhook active and begins delivering events. When real events arrive, Asana POSTs a payload containing an events array where each object has fields action, resource.gid, resource.resource_type, and resource.resource_subtype. For task assignment events, filter for action equal to changed and look for parent.resource_type equal to task, then fetch the full task by calling GET https://app.asana.com/api/1.0/tasks/{taskGid}?opt_fields=name,assignee.gid,assignee.name,due_on to get the assignee GID and due date, look up the phone from your directory, and send the SMS via POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages.json.
Common Issues and How to Fix Them
The Asana webhook handshake fails when your middleware does not echo the X-Hook-Secret header in the response, causing Asana to retry the handshake and then mark the registration as failed after several attempts. Implement handshake handling as the very first logic in your webhook route, checking whether the incoming request contains an X-Hook-Secret header and immediately returning it in the response header if present, before any other processing occurs. Asana sends duplicate events when the same task is updated multiple times in rapid succession, such as when an automation rule fires multiple field updates, causing your middleware to send duplicate SMS to the same assignee. Add deduplication by recording each event GID in a short-lived cache with a 60-second TTL, and skipping processing for any event whose GID is already in the cache. Webhook subscriptions on Asana expire after several hours of repeated delivery failures, which can cause your integration to silently stop working. Implement a health check job that calls GET https://app.asana.com/api/1.0/webhooks/{webhookGid} and verifies the active field is true, re-registering the webhook if it shows as inactive.
How to Get More from This Integration
Build a daily deadline reminder by running a scheduled job every morning that calls GET https://app.asana.com/api/1.0/tasks?project={projectGid}&due_on=today&completed=false&opt_fields=name,assignee.gid,due_on to retrieve all tasks due today, then sends each assignee an SMS listing their due tasks for the day using your phone directory mapping. Create a project milestone SMS by subscribing to story creation events on your project, filtering for story.resource_subtype equal to assigned and story.text containing milestone, then sending an SMS to all project members to celebrate or acknowledge the milestone without requiring everyone to check Asana. Extend the integration to two-way communication by routing inbound Twilio SMS from team members to your middleware, which accepts commands like DONE {taskGid} and calls POST https://app.asana.com/api/1.0/tasks/{taskGid} with a JSON body setting completed to true, letting team members complete Asana tasks by SMS reply without opening the app. Use Asana's custom fields feature to add a Phone field to your user-facing task forms, and read that custom field via opt_fields=custom_fields when fetching the task to get the external contact phone directly on the task without a separate directory lookup.
Conclusion
Asana and Twilio together make sure task assignments and deadlines reach your team on their phones in real time, turning project management events into direct mobile notifications that actually get read. Reach out to Telphi Consulting to build and maintain this integration for your Asana workspace.
Ready to Transform Your Business Communications?
Get a free consultation with our VoIP experts and discover how we can help you save costs, improve efficiency, and scale your business.
Comments (0)
Join the discussion and share your thoughts (AI-moderated for quality)
Be the first to comment
No comments yet. Share your thoughts below.