Request files
As a very simple example let us create an app that allows the user to pick some files from a folder in your Google Drive and send the selected files by email.
Topics
- Create a very simple first app
Prerequisites
- You have already added Ultradox to your account so that you can create new Ultradox files from Google Drive
Goals
- Get your first app up and running
Instructions
Please note that this example will allow all users to pick files from the selected folder on your Google Drive. Make sure to select a folder that does not contain any sensitive information!
Visit https://www.ultradox.com to launch Ultradox. If you are not signed in to Ultradox, you'll be redirected to a page that introduces Ultradox. Click on the Login
button to login with your Google account. Select Blank
and wait until the blank project opens. A welcome wizard will ask what kind of app you want to create.
Create a new Ultradox file
Create a new Ultradox file from Google Drive and create a blank app.
Click on the document title and enter a reasonable name and description.
Note that the name and description of the file will be displayed to the user accessing your app on the login screen.
Let user pick files
|
Add a Pick file(s)
building block from the Google Drive
section in the sidebar to your flow.
Click on the bold text in the title of the building block to open the configuration dialog.
You can then enter a title and prompt that will be displayed to the user.
Leave the buttons field blank for now and the default submit button will show up.
Click on one file to switch to multiple files and click on given folder to pick the folder containing the documents that the user can then select.
Make sure that the files are in a format that can be attached to an email, e.g. PDF files or images.
Your building block should now look like this:
|
Send requested files by email
|
Next we want to send out the selected files by email to the user.[a][b][c][d][e][f]
Add a Plain text email
block from the Email section in the sidebar to your flow.
Enter ${currentUser.email}
into the to
field as we want to send the files to the user who is accessing the app.
Enter a subject and body to your email and make sure the checkbox for the attachments is checked.
Note that we can access the email and the given name of the current user only if our app requires a login.
If you create an app that is open for all (anonymous access), the users will have to enter the email address as we then do not have that information.
Autocompletion
Ultradox only knows the variables that are listed under the output variables. In our case, only the output variables of the Pick file(s)
building block are selected.
To display the variable currentUser.email and all other runtime variables in the autocompletion, add an Environment variables
building block to the beginning of your automation.
Test your app
The app is complete and you can test your flow by clicking on the Run
icon in the main toolbar. You will be prompted to select some files and will receive an email then.
But let’s now publish the app!
Configure and activate the app
Click on the settings icon in the main toolbar to activate the app.
Enable the app and restrict it to signed in users, pick a theme and a background image of your choice.
Now we are ready to go! Click on run app
to open the app in a new browser tab.
Share the URL of this new tab with the users of your app.
Run app
Login
When opening the link you / they will land on the login page.
As we have restricted the app to logged in users, they will have to login user their Google account.
When allowing anonymous access the login page will never show up, but the app will be launched right away.
Note that the Submit button with the email icon will be active, even if you have not selected any files.
Checkout the Improve your buttons section to learn how to enable the button only if a file is selected.
Improving your app
You have learned that you can build a powerful app by just using two building blocks!
Now let’s add some icing to the app to improve the user experience even more.
Notifications
Add a Notification
block from the User Interaction
section right after the Pick file(s)
block.
This will display a notification at the bottom of the browser window when running the app.
In our example we want to notify the user once the files are downloaded from Google Drive.
Improving your buttons
You can define a number of buttons and optionally a condition when this button will be active.
In this tutorial we will use an Email
button that will be active if one or more files are selected by the user (more than zero).
Open in the Pick file(s)
block the let user pick dialogue and enter the button
email("Get files by email")[>0]
Expert tip: The name of the picked button will be stored in a variable called button
that you can use in subsequent building blocks. You can then activate different blocks depending on the button that has been clicked by using this variable in condition of a building block.
If you want to execute a building block only if the user has clicked on the Email
button use the following condition: "${button}" == "email"
Display confirmation message
Finally we want to display a customized confirmation message once the app has completed.
Add a Stop
block from the Control flow
section to the end of your flow, click on the user interaction icon to enter a useful message that replaces the default message when the app has finished.
Enter the prompt
An email with files attached has been sent to your email address [email protected].
You should find it in your inbox shortly.
The app is complete!
The improved app is complete and should look like this:
|
|
|
|
Launch your app again by reloading it or by clicking on the run app
button once again.
You should see a nice notification that looks great on desktop and mobile devices after selecting the files to be downloaded and you will find the customized success message after the app is complete.
What you have learned
- You have created a simple yet powerful app by combining just two building blocks: Downloading files from Google Drive and sending them by email
- You have improved the app by sending notifications to the user using a comment and by adding a custom success message
Learn more
To continue learning about Ultradox, take a look at the following resources:
Quickstarts
Create contract | Calculate values | Request files | Contact form
[a]Next we want to send out the selected files by email to the user.
[b]_Marked as resolved_
[c]_Re-opened_
[d]N
[e]_Marked as resolved_
[f]_Re-opened_
Questions and Feedback
If you have any comments on this page, feel free to add suggestions right to the Google document that we are using to create this site.
If you are not yet member of the Ultradox community on Google+, please join now to get updates from our end or to provide feedback, bug reports or discuss with other users.
Last Updated: 9/19/19