Peter Novosel
·SmartSuite Co-Founder

Working with files using Make

We touched on this topic a few posts back, but I just wanted to provide a bit more of a detailed walkthrough on working with binary files using Make. Let me know if you have any additional questions or come up with a scenario that isn't covered.

Downloading Files

There is a known issue with the Make connector that you can’t properly iterate the individual collections in the files and images arrays. We’re looking into this and will update the community soon.

However, that doesn't prevent you from passing the structure to a SmartSuite files and images field. You can do it like this:

To upload that files and images field content to another SmartSuite record:

  1. Create an Update SmartSuite Record action

  2. In the target files and images field:

    1. Select “Map”

    2. Map the trigger record’s files and images field array to the target field

Uploading Files (Binary)

To upload a binary file to SmartSuite from Make, we need to use Make’s HTTP module. Here are the steps:

  1. Search for the “HTTP” module

  2. Add the “Make a request” action

  3. Adjust the settings:

URL: https://app.smartsuite.com/api/v1/recordfiles/{application_id}/{record_id}/{field_slug}/

Method: POST

Headers:

  • Authorization: Token {API_KEY}

  • account-id: {WORKSPACE_ID}

  • Content-Disposition: form-data

Body type: Multipart/form-data

Fields: Add 1 item configured like this:

  • Fild type: File

  • Key: files

  • File:

    • Map

      • Data: {BINARY_DATA}

      • File name: {FILE_NAME}

1
2 replies