Working with files

Axiom offers the following file operations:

  • Download files to your computer
  • Upload files to a website from your computer
  • Download files to your Google Drive account
  • Upload files to a website from your Google Drive account

# Download files to your local computer

To download files, you will need to run the axiom desktop application, which you can find here (opens new window).

If you are running in cloud, via API or via the cloud scheduler, these steps will not work. Use the desktop app and the local scheduler instead.

First, select the "Interact with a page's interface" step from the step finder.

When downloading files, duplicates are automatically renamed by appending a number to the end of the filename.

If you would like to refer to the downloaded files later in your automation, the names of the downloaded files (including those that were renamed due to duplication) will be available in the "all-interaction-data" variable.

Inside the "Interact with a page's interface" step, select either "Download files" or "Download File" sub-step from the step finder.

The desktop application must be running before you can add this step. If it is not running you will be redirected to the download page so that you may download and start the application.

Download files

  1. Click the "Select" button to open the selector interface. Select all of the links to the files you would like to download - they should be highlighted in orange. Click "Confirm" to confirm your selection.
  2. Click the "Click to select" button and choose a folder on your computer. The downloaded files will be placed here when they are complete.
  3. Optionally, you can set a file name to use for the download. If this is omitted, the bot will attempt to use the filename provided by the website. In the cases where it can't figure this out, it will just use the filename "download" instead.

The "Force download" toggle can be tried if there are cases when the file will only open in the browser and will not download; for some download links, this behaviour is set by the web developer. "Force download" will not always work, but it can be helpful in rare occasions - if in doubt, leave it switched off.

# Download files from a URL directly

Inside the "Interact with a page's interface" step, select the "Download files from a URL" sub-step from the step finder.

The desktop application must be running before you can add this step. If it is not running you will be redirected to the download page so that you may download and start the application.

Download file from URL

  1. Enter the URL to the file you wish to download. You can specify this in a variable by using the "Insert Data" dropdown to the right of the step.
  2. Click to select a folder on your computer. The downloaded files will be placed here when they are complete.
  3. Optionally, you can set a file name to use for the download. If this is omitted, the bot will attempt to use the filename provided by the website. In the cases where it can't figure this out, it will just use the filename "download" instead.

The "Force download" toggle can be tried if there are cases when the file will only open in the browser and will not download; for some download links, this behaviour is set by the web developer. "Force download" will not always work, but it can be helpful in rare occasions - if in doubt, leave it switched off.

# Upload files to a website from your local computer

To upload files, you will need to run the axiom desktop application, which you can find here (opens new window).

If you are running in cloud, via API or via the cloud scheduler, these steps will not work. Use the desktop app and the local scheduler instead.

First, select the "Interact with a page's interface" step from the step finder.

Inside the "Interact with a page's interface" step, select the "Upload a file" sub-steb from the step finder.

Upload a file

  1. Click the "File Input Field" button to open the selector tool. Here, you need to select the element on the page which handles the upload. Usually, this is a button or a dropzone.
  2. Click "Click to select" to select a file on your computer. This will be the file that gets uploaded.

It's common to want to upload a number of files, particularly files that were downloaded in a previous step. To do this, use the "Insert Data" button.

There are two main ways this feature is used:

  • To load a list of file paths that are loaded from a Google Sheet or other external source, specify the file paths in your sheet, add a "Read Google Sheet" step, and then select the "read-google-sheet" data variable.
  • To upload previously downloaded files, enter the file path you used in the "Download Files" step, and use the "Insert Data" dropdown to select the "all-interact-data" variable. You will be able to choose the column for your filename from the table interface that is displayed.

To learn more about using data, please see our documentation on Using data

# Download files to your Google Drive account

To download files to your Google Drive account, you will need to run your automations using our Cloud runner. This step does not work with the desktop application as it requires a specific filesystem to work.

If you are running on desktop, these steps will not work. Use the "Run in cloud" button, an external trigger, or the cloud services instead.

First, select the "Interact with a page's interface" step from the step finder.

Inside the "Interact with a page's interface" step, select the "Download a file to Google Drive" sub-step.

Download a file to Google Drive

  1. Click the "Select" button to open the selector interface. Select all of the links to the files you would like to download - they should be highlighted in orange. Click "Confirm" to confirm your selection.
  2. Enter the folder URL of the Google Drive folder you wish to download the image to. The folder URL can be found by double clicking the folder in your Google Drive account. When the page loads, showing all the files present, copy and paste the URL into the axiom builder.
  3. Optionally, you can set a file name to use for the download. If this is omitted, the bot will attempt to use the filename provided by the website. In the cases where it can't figure this out, it will just use the filename "download" instead.

The "Force download" toggle can be tried if there are cases when the file will only open in the browser and will not download; for some download links, this behaviour is set by the web developer. "Force download" will not always work, but it can be helpful in rare occasions - if in doubt, leave it switched off.

Please note that you can only use this feature with files up to a maximum of 250MB. If you need to work with larger files, you should use your local machine.

# Upload files to a website from your Google Drive account

To upload files to a website from your Google Drive account, you will need to run your automations using our Cloud runner. This step does not work with the desktop application as it requires a specific filesystem to work.

If you are running on desktop, these steps will not work. Use the "Run in cloud" button, an external trigger, or the cloud services instead.

First, select the "Interact with a page's interface" step from the step finder.

Inside the "Interact with a page's interface" step, select the "Upload a file from Google Drive" sub-step.

Upload a file from Google Drive

  1. Click the "File Input Field" button to open the selector tool. Here, you need to select the element on the page which handles the upload. Usually, this is a button or a dropzone.
  2. Enter the URL of the Google Drive file you wish to download the image to. The file URL can be found by double clicking the file in your Google Drive account. When the page loads, showing all the files present, copy and paste the URL into the axiom builder.