How to Sync Attachments in Asana

    How to Sync Attachments in Asana

    This article describes how to synchronize attachments between Asana and other systems.

    Attachment Sync: Asana supports attachments up to 100MB per file. All file types are supported.

    Outgoing sync (Asana → Remote system)

    To send attachments from Asana to the remote system, use this script in your Outgoing Sync:

    replica.attachments = entity.attachments

    Incoming sync (Remote system → Asana)

    To receive attachments from the remote system and add them to Asana, use this script in your Incoming Sync:

    entity.attachments = attachmentHelper.mergeAttachments(entity, replica)
    What this does: The mergeAttachments helper merges new attachments with existing ones, avoiding duplicates.

    Filter attachments by size

    You can filter attachments to send only files under a specific size:

    // Send only files under 10MB
    replica.attachments = entity.attachments?.findAll { 
        attachment ->
        attachment.filesize < 10485760
    }

    Filter attachments by type

    Have more questions? Ask the community