HelloSign Dropbox Bot

HelloSign Dropbox Bot

We will be looping recursively over each file in the folder and also looping over each folder member for each file. We need access to any folder on an account, so the token will be linked to a user and use Dropbox's full account access. HelloSign can use a Dropbox shared link with the downloadable flag set to true.

Awhile back I was a guest on the Postman web stream along with Marcel Ribas from Dropbox. Our task was to build something live using the Dropbox and HelloSign APIs. So obviously, me being me, we set out to create a bot.

Dropbox acquired HelloSign but their products, and their APIs, are not integrated with each other yet, so the sky was the limit on what functionality we wanted to create.

I like to think about a high-level user perspective, so in my head:

“A hiring manager wants to remind new hires to sign important documents stored in Dropbox. All they need to do is add the new hires to the shared Dropbox folder and add the documents they want to be signed. The bot will send a HelloSign signature request email every day at 8am. They can sign the documents and the hiring manager can download the signed documents from HelloSign.”

As easy as this seems there are a few things to consider in this workflow collection:

  1. We will be looping recursively over each file in the folder and also looping over each folder member for each file.
  2. We need access to any folder on an account, so the token will be linked to a user and use Dropbox’s full account access
  3. HelloSign can use a Dropbox shared link with the downloadable flag set to true

Understanding this makes the collection a lot easier to understand.

I am going to gloss over the Dropbox and HelloSign app creations. The former is the hardest but by reading the Dropbox documentation or by the Response errors you will know what you permissions you need to add. You do need to make sure to give access to the Full Dropbox Access and create a non-expire access token to pass into the Authorization header for Dropbox requests. For HelloSign, it is very easy to generate a user token but you will need to add it in Postman as Basic Auth and give the access token as the user and leave password blank.

Be sure to use Auth tab and have username set to the token and password is blank

Be sure to use Auth tab and have username set to the token and password is blank

HelloSign needs to have the token as the username and password blank in the Auth tab

First, we are going to grab the folder’s contents’ file paths and the parent folder’s shared ID. We are going to save the file paths array which we will be looping over and the shared ID as environment variables.

We are going to save the file paths array which we will be looping over and the shared ID as environment variables

We are going to save the file paths array which we will be looping over and the shared ID as environment variables

Grab file paths that we will be looping over and the shared folder ID as environment variables

This next tidbit is starting to get into the meat of Postman Workflows, we are going to conditionally choose which Postman request in the collection to run after the results of the current request!

Second, we are going to go and get the Dropbox shared links. These links are generated every time you want to share files amongst users. Dropbox share links can be generated in the UI so they might exist. We will check if the file already has a public share link we can use.

Postman collections always run in order but by using _postman.setNextRequest _we can actually change which request to run after the execution of the current one. In this case, if we do have a link then let’s skip over _Create Shared Link _and use _List Folder Members _instead. OMG! BRANCHING REQUESTS!

postman-collections postman dropbox api integration

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

API Integration Practices and Patterns

From on-prem-to-cloud integrations to custom application-to-cloud integrations, the questions are the same: What is the integration experience you need to offer and who will own it?

Public ASX100 APIs: The Essential List

The method used for this initial research was to obtain a list of the ASX100 (as of 18 September 2020). Then work through each company looking at the following

Top 10 API Security Threats Every API Team Should Know

Learn what are the most important API security threats engineering leaders should be aware of and steps you can take to prevent them

An API-First Approach For Designing Restful APIs | Hacker Noon

I’ve been working with Restful APIs for some time now and one thing that I love to do is to talk about APIs.

Next steps in API integration testing from pipelines with Postman

In this tutorial video we'll explore Next Steps in Pipeline API integration testing with Postman 2:27:34 Next steps in API integration testing from pipelines with Postman