FlowmageDocs

Upload file

BetaChanges data

Puts a file in the HubSpot file manager.

Settings

SettingWhat it is
ConnectionRequiredThe HubSpot connection the step signs in with.
File nameRequiredThe file's name, extension included. Pick the file, then paste its base64 below.
File contentsRequiredBase64 of the file — {{ file("name").base64 }}.
Who may open itA private file needs a signed URL before anything can read it back. Public files are readable by anyone who has the address.
FolderWhere in the file manager it lands. HubSpot creates the folder if it is not there yet.
Folder idAn existing folder's id instead of a path. HubSpot takes one or the other — fill this in and clear the Folder above.
Delete it again afterLeave empty to keep the file. Otherwise HubSpot's own duration, between one day and one year, written the way its Files API documents it.
Technical details
KeyValue
connectiontexta connection id from `requires.connections` (provider `hubspot`)
nametexta file name, listed in `requires.files`
contentBase64textits `{{ }}` must give a string
access"PRIVATE" or "PUBLIC_INDEXABLE" or "PUBLIC_NOT_INDEXABLE", by default "PRIVATE"
folderPathtext, by default "/flowmage"
folderIdtext
ttltext

Output

FieldType
fileobject
fileIdstring
urlAddressstring
accessWho may open itstring
Sample output, and the expression for each field
  • access"PRIVATE"
  • file
    • id"1"
  • fileId"1"
  • url"https://example.hubspotusercontent.net/hubfs/1/report.pdf"

Errors

When a step of this node stops a run, the run page shows a code. Look it up:

Example step

The step as a flow file holds it. Replace each value in <…>.

{
  "config": {
    "access": "PRIVATE",
    "connection": "<connection id>",
    "contentBase64": "<file contents>",
    "folderId": "",
    "folderPath": "/flowmage",
    "name": "<file name>",
    "ttl": ""
  },
  "label": "Upload file",
  "type": "hubspot.uploadFile",
  "version": 1
}