Use file uploads from the WordPress plugin in webhooks
Webhook connections send all form data to your automation tool. To use file uploads from the WordPress plugin in your automations, there are some additional instructions.
When to use
When you connect your Tripetto responses to automation tools, all the submitted data can be used in your automations right away. If your form responses from the Tripetto WordPress plugin include files from the File Upload block you can also use those in your automations, for example to store in a cloud service. To do so, you can follow the instructions included in this article.
🚧 Warning: Automation tool/webhook knowlegde needed
We assume you know how to configure and use your desired automation tool and/or webhook. Tripetto support can not help you with configuring this and/or the services that you want to connect your Tripetto form to.
File download availability
By default the files that are being uploaded via the File Upload block in your Tripetto forms in your WordPress site, are only available to the owner of the form. You have to be logged in to the corresponding WordPress site (WP Admin) to be able to download the uploaded files. Now, this becomes difficult for automation tools, because those can't login to your WP Admin and thus won't have access to the file downloads.
Therefore there is an extra setting available in the Connections pane in the WordPress plugin to make the uploaded files available to your automation tool. To activate that, open your form in the Tripetto WordPress plugin. At the top menu bar of the form builder click
Connections. The Connections pane will show up on the right side of the form builder.
Now in the webhook that you have connected, activate the setting
Allow access to uploaded files. Now the download links will be available for that automation tool, so you can use it in your automation scenarios from there on.
How to use
File uploads from Tripetto forms can be downloaded via a download link. To use that in your automations, you need an extra step in your automation tool to download the file into your automation scenario. To demonstrate this, we use Make1 as our automation tool. Click here for more general information about connecting Tripetto to other services.
🔖 Ad 1: Make alternatives
There are alternatives to use as your automation tool. For this demonstration we use Make as our automation tool, but you can also use Zapier, Pabbly Connect or even a custom webhook. Of course it's up to you to use your favorite automation tool. Those will have comparable setups available to use files from Tripetto. We assume you know how to configure and use your desired automation tool and/or webhook.
First we will demonstrate how to setup the basic automation to download the file into your automation tool. The basic configuration in Make looks like this:
Step 1 - Watch Tripetto responses
- Add a
Tripettomodule to your Make scenario. As trigger select
- Connect your Tripetto form to this webhook URL.
- Receive a form response to this module, so the scenario learns your Tripetto form structure.
Step 2 - Download file
- Add a
HTTPmodule to your Make scenario. As action select
Make a request.
URLselect the corresponding File Upload block of your form from the Tripetto module you created in step 1.
Now the Make scenario will download the file from the file upload block, assuming the
Allow access to uploaded files setting is enabled and thus the file download is available for Make.
This is the basic setup to download the file data into your automation scenario. From there on you can now use that file data in your follow-ups in your scenario.
Basic automation with file names
If you want to store the downloaded file, you might want to use the original file name of the file that your respondent uploaded in the Tripetto form. Therefore the download link includes a query string parameter
filename with the original file name as value.
The more advanced configuration in Make, including the file name, looks like this:
Step 1-2 - Setup basic configuration
Setup the basic configuration as described in steps 1-2 above.
Step 3 - Get file name
- Add a
Toolmodule to your Make scenario. As action select
Variable nameenter a name, for example
- We now want to extract the filename parameter from the query string of the file download. To do do, as
Variable valuesetup the following:
- Insert a text
splitfunction (see Make documentation).
- As first parameter in the
splitfunction insert the corresponding File Upload block of your form from the Tripetto module.
- As second parameter in the
- Insert a text
Now the Make scenario has stored the original file name of the file that the respondent uploaded to your Tripetto form. From now on you can use that file name in your follow-ups in your scenario.
Example: Store file in Google Drive
An often used scenario will be to store uploaded files to a cloud storage service, for example Google Drive. In this example we will demonstrate a possible setup for that scenario in Make.
The full configuration in Make looks like this:
Step 1-2-3 - Setup basic configuration with file names
Setup the basic configuration with file names as described in steps 1-3 above.
Step 4 - Upload to Google Drive
- Add a
Google Drivemodule to your Make scenario. As action select
Upload a file.
- Grant access to your Google account.
- Optionally select the folder in your Google Drive where the files should be stored.
File nameselect the variable you created in step 3 (
File namein our example). To prevent issues with encoding you can add a
decodeURLfunction to the file name (see Make documentation).
Dataof the HTTP module you created in step 2.
Now the Make scenario will store the file with the original file name to your Google Drive!