Overview
DocuPipe has an extensive API, documented here. This RESTFul API is easy to use from any programming language, and many DocuPipe users rely on it to orchestrate workflows ranging from simple to complex using our flexible and modular set of API functions.
However, for some users, writing code is a hurdle that is best avoided. In that case, we have a solution: DocuPipe has a Make app that allows for simple no-code integrations using drag-and-drop modules. In this article, we will guide you into getting started with Make, connecting it to your DocuPipe account, and dive into an example use-case.
Creating an Account and Adding DocuPipe
Let's assume you already have a DocuPipe account. You will be needing your API key, which you can find by clicking in the top right corner, and going to Settings. Now, we want to create our Make account. Go to their website and create an account here. Once you've gone through their onboarding, you'll find yourself in the dashboard. To get started, click the button Create a new scenario in the upper right hand corner. Now you'll find yourself in a empty block diagram, with a giant "plus" symbol in the middle. Go ahead and click that. Now it will ask you what app you want to use. Type "DocuPipe" in the search. Then click the "Make an API Call" option. This is the most generic option, that let's you execute any DocuPipe API function.
Now that you've clicked that, DocuPipe is added to your Make account. Now it's time to grab that API key from DocuPipe's Setting's page, and copy it into the module as a new connection, like this:
If it accepts without an error, you'll know your API key is valid. If you use an incorrect API key, you'll see an error like this:
Simple Google Drive Example
Now that we've gotten the connection set up, let's try a simple example. Let's set up a scenario so whenever a specific Google Drive folder of mine receives a new PDF uploaded, it automatically sends to DocuPipe for parsing, and then emails the resulting text file to an email address of our choice.
Add Google Drive Import
To start, close the current DocuPipe module window, and click the plus sign at the bottom to add a new module:
Now type Google Drive in the search, and select the option for "Watch Files in a Folder", as seen below.
Once created, go ahead and position it behind your DocuPipe module, so it's logically clear what comes first. Now click on the Google Drive module to set it up. It will prompt us to set up a new connection there as well, as seen below:
Let's click that, connect to our Google Drive. Once we connect, we can select a folder, and tell Make to monitor the addition of any new files, like so:
Now, for a bit of bureaucracy, we need to add another Google Drive module to actually download the file. So click on the "plus" icon to the right of the current Google Drive module, and select Google Drive again, and search for the "Download a File" sub-module, like so:
Configure it to accept file ID like this:
OK, so now we have 3 modules. The left-most Google Drive module "watches the folder" for new files, and then the one to the right of it "downloads the file". They should be connected by a dotted line (if not, drag the left one to the right one to connect). Now we need to connect the File Download module to DocuPipe. Drag the "plus" icon of the File Download module to the DocuPipe module, and once you see the line, click on it to add a filter. Configure it to only pass PDF files, as shown below:
Setting Up DocuPipe Upload
Now for the actual DocuPipe part. To simply upload the PDF for parsing and get the plain-text response, we want to call DocuPipe's POST document endpoint, found here in the documentation. Note that one can simply copy the markdown from the documentation page, and ask an AI (ChatGPT, Gemini, etc.) how to properly fill in the URL and body. See image below for how it should look.
Here is the JSON payload you can copy/paste into the Body, for convenience. Note how the special Make functions like base64 and Make data objects like data and name need special handling. Also notice you need double quotes around Make objects, it doesn't automatically insert those. You can drag and drop using Make's editor, or simply copy the snippet below:
{
"document": {
"file": {
"contents": "{{base64(6.data)}}"
},
"filename": "{{2.name}}",
"fileExtension": "pdf",
"fileType": "pdf"
},
"parseVersion": 3,
"dataset": "Google Drive Test"
}
Setting up Webhooks
OK great, now hit save. This scenario is complete, and will trigger when we add a new file to the Google Drive folder. But what is missing? We need a different scenario to handle what happens when a document finishes parsing, to download the resulting text and save it to a file. So let's save and exit this scenario, and then make a new one. Go back to the dashboard and click again on Create a new scenario in the upper right hand corner. Add a module, and search for "webhook". Select "custom webhook" from the menu, like so:
Once you select it, click "Create a webhook", and then name it something informative like DocuPipe Document Complete. Do not add any API key, press save.
Now, we have a webhook URL we need to copy, and paste into our DocuPipe account. Just a bit of tedious bureaucracy to hook everything up. So copy the URL by clicking "Copy address to clipboard", as seen below, and then hit save.
Now, let's go to our DocuPipe Settings page, and click the "Go to Webhooks Portal" link, as seen below. It's right below where you found your API key.
On the new page, press the "Add Endpoint" button in the top right hand corner, and paste the URL from Make into the Endpoint URL field. Also, click the checkbox for "document.processed.success", which is the thing we want to monitor. When complete, it should look something like the image below. Press create.
We can test that everything is working now by going back to Make, and clicking "Run Once" on our webhook scenario in the bottom left hand side. Now it's running and waiting for an action to trigger it. It should look like this:
Now go back to the DocuPipe webhook portal, enter the "Testing" tab, and select the event we subscribed to, document.processed.success. You can also see exactly what the webhook will return into Make once it receives the response. Hit "Send Example".
Now if we go back to our Make scenario, we will see it caught the example we sent. It should look like the image below. Now we know everything is connected properly.
Emailing the Results
Going back to our webhook scenario, we now need to do the final step of getting the output to email to ourselves. The webhook payload already has the text in it, so we just need to add a module for sending an email. Click the "plus" icon on the right of the webhook module and add a Email module, using the sub-module called Send an Email.
Configure it as shown below, to take the text output and email it back to ourselves.
And just like that, voilà! It works! So for this example, we made two scenarios for handling both the sending of data to DocuPipe, and for doing something with the resulting data.
Complex Parse -> Classify -> Standardize Example
Now that we did a simple example with just parsing, we can try a more complex process to upload a document, classify it, and optionally standardize depending on the classification results. While this sounds very hard, most of the complexity is handled internally via DocuPipe's workflow object.
Setting up Workflow
Currently a workflow can only be created via the API, but we will add this to the website dashboard soon. For now, an easy workaround is to use our documentation page here, which lets you run test API calls through the web UX.
In this case, we want to create a workflow that upon document upload, will trigger a classification with an optional standardization at the end, depending on whether the document was classified into a specific target class or not. That means we need the classifyStandardizeStep
option. In this case, we want to define a workflow that has a classifyStandardizeStep
that looks like this:
{
"includeUnknown": True,
"multiClass": False,
"instructions": None,
"classToSchema": {
"CLASS_ID_1": "SCHEMA_ID_1"
},
"displayMode": "spatial",
"splitMode": "auto",
"effortLevel": "standard",
"stdVersion": 2.2
}
So to create this workflow, we can fill out the fields in the documentation page, something like as you see below:
And that will let you properly trigger that creation by pressing the "Try It!" button, after putting in your API key. This will create the workflow. If it works, the resulting workflowId
will appear below. Copy that ID, you will need it.
You can then verify that everything worked by going to the list workflows
page here. Put your API Key at the top, like before, click "Try It!", and it will list your available workflows. You should see it listed, as shown below:
OK, so we created the workflow object. When a document is uploaded with this workflow passed along with it, it triggers immediately upon the completion of parsing, it will then execute a classification job where the unknown class is included, the document must be issued exactly one class, and there are no additional classification instructions. Afterwards, if the document was assigned CLASS_ID_1, then it will be standardized using SCHEMA_ID_1, and the standardization parameters have a spatial display mode, automatic split mode, and standard effort level. You can also specify what version of standardization you want to use.
Add Google Drive Import
This part is identical to the previous example, so refer to that to see how to set up Make to trigger a document upload from a Google Drive folder.
Setting Up DocuPipe Upload with Workflow
The only difference in the DocuPipe module to the previous example is that we want to add one additional argument in the body of the module: the workflow ID. It should look as follows:
Here is the JSON for convenience:
{
"document": {
"file": {
"contents": "{{base64(6.data)}}"
},
"filename": "{{2.name}}",
"fileExtension": "pdf",
"fileType": "pdf"
},
"parseVersion": 3,
"dataset": "Google Drive Test",
"workflowId": "4c8eb679"
}
Setting up Webhook for Standardization
In the previous example, we set up a webhook to monitor for completed documents, so we can email the text of the document to ourselves. Now, we want to monitor for completed standardizations, where the dataset
parameter matches the one we set (Google Drive Test). So like before, we go back to the dashboard and click again on Create a new scenario in the upper right hand corner. Add a module, and search for "webhook". Select "custom webhook" from the menu, select it, click "Create a webhook", and then name it something informative like DocuPipe Standardization Complete.
As before, we copy the the URL as shown below, and then go to the DocuPipe webhook portal (go to DocuPipe Settings page, click GO TO WEBHOOKS PORTAL
).
Now from the webhook portal, press the "Add Endpoint" button in the top right hand corner, and paste the URL from Make into the Endpoint URL field. Click the checkbox for standardization.processed.success
, which is the thing we want to monitor. When complete, it should look something like the image below. Press create.
We can test that everything is working now by going back to Make, and clicking "Run Once" on our webhook scenario in the bottom left hand side. Now it's running and waiting for an action to trigger it. Now go back to the DocuPipe webhook portal, enter the "Testing" tab, and select the event we subscribed to, standardization.processed.success
. You can also see exactly what the webhook will return into Make once it receives the response. Hit "Send Example". Now if we go back to our Make scenario, we will see it caught the example we sent. It should look like the image below. Now we know everything is connected properly.
Emailing the Results
Going back to our webhook scenario, we now need to do the final step of getting the output to email to ourselves. The webhook payload already has the structured JSON in it, so we just need to add a module for sending an email. Click the "plus" icon on the right of the webhook module and add a Email module, using the sub-module called Send an Email. Configure it as shown below, to take the JSON output and email it back to ourselves.
Now we can also add a filter between the webhook and email modules to only fire in situations where the dataset matches the one we set, "Google Drive Test". So click on the wrench on the dotted lines between the modules, and set it as follows:
Now we're ready to test it! As before, open both the scenarios in different tabs, clear the Google Drive folder, drag a new PDF file into it, and press "Run Once" in both scenarios. Now let's see the data pipe its way through...
And voilà once more! It works! I can see the email sent to myself with the JSON content extracted from the document.
I hope with these two examples, you can get an idea of the complex workflows you can execute using both DocuPipe, and Make's no-code drag and drop modules. You can connect your own data sources, whether they be Google Drive, SalesForce, an ERP, etc., process with DocuPipe, and send the resulting structured data to wherever it needs to go!