The Upload attachment action uploads a file as an attachment to the specified Asana task and returns the details of the uploaded file as the response.
Overview
The action allows you to upload a file available in your local desktop or in the Control Room repository and specify the file name to be displayed in Asana. You can also specify a file variable that is mapped to file. The action returns the details of the uploaded file such as GID, name, resource type, creation time, download URL and the parent task details. Use the Connect action to connect to Asana and create an automation session before you configure the Upload attachment action.
Settings
The following settings are available in the Upload attachment action:
- Session
- Specifies the Asana session that the
Connect action creates. Choose one of the
following options as per the Connect action settings:
- Session name: Select the string variable that stores the session name or enter the session name manually in the text box.
- Variable: Select the Asana session variable that holds the session name.
- Task GID
- Specifies the GID of the Asana task that the action upload the file.
- File path
- Specifies the file path of the file location. You can use one of the
following option to upload the file:
- Variable - Use this option to select a file variable.
- Control Room file - Use this option to select a file from the Control Room file repository.
- Desktop file - Use this option to select a file from local desktop.
- File name
- Specifies the display name for the selected file. You must enter the file name with the appropriate extension. For example: screenshot.jpg
- Assign output to a variable
- Specifies the output variable that stores the response data after the action updates the
task. The response data contains the following keys:
attachmentGid- The unique GID of the uploaded file.name- The updated name of the uploaded file.download_url- The direct download URL of the uploaded file.
Use one of the following options to store the response data:
- Multiple variables: Create and specify
individual variables to store specific response data.
Use the Add variable mapping option to specify the key and corresponding variable type to store the specific response data.
- Dictionary: Create and specify a dictionary variable to store the entire response data.