In this tutorial, we will show you how to set the output file to expire after 5 minutes using PDF.co and Make.

  1. Create a New Scenario
  2. Add PDF.co Module
  3. Setup PDF.co Configuration
  4. Run Scenario Result
  5. Add Delay Tools
  6. Set Delay Time
  7. Add Another Module
  8. Make an API Call Configuration
  9. Deleted File Result

We have here a sample scanned PDF and will convert it into a searchable PDF. We will use the output file and set it to expire after 5 minutes.

Sample Scanned PDF
Sample Scanned PDF

Step 1: Create a New Scenario

  • First, log into your Make account and click on the Create a New Scenario button.

Step 2: Add PDF.co Module

  • Next, search and select the PDF.co app. Then, choose the Make an API Call module.

Add PDF.co Module

Step 3: Setup PDF.co Configuration

Let’s set up the PDF.co configuration.

  • For the API Endpoint Path field, we will use the /v1/pdf/makesearchable endpoint. This endpoint will turn your scanned PDF into a text-searchable PDF.
  • For the Input Type dropdown box, select the Override ‘url’ param with value.
  • For the URL dropdown box, input the direct URL of your source file.
  • Then, type in your desired Output File Name.
  • Under the Body param, type async for the Key and set true for the Value.
  • In the Forcely enable async mode dropdown box, select the No, rely on the async parameter in Body.

Setup PDF.co Configuration
Setup PDF.co Configuration
Setup PDF.co Configuration

After setting up the configuration, let’s run the scenario.

Step 4: Run Scenario Result

  • The scenario runs successfully. We will use this output file and set it to expire after 5 minutes.

Run Scenario Result

Step 5: Add Delay Tools Module

  • Now, let’s add the delay tools. So we can set the expiration time of the output file.

Add Delay Tools

Step 6: Set Delay Time

  • In the Delay dropdown box, set it to 300 in seconds. This is equivalent to 5 minutes before the output file expiration.

Set Delay Time

Once you are done setting up the Delay tools, let’s add another module to delete the expired file.

Step 7: Add Another Module

  • Select the PDF.co app and choose the Make an API Call module.

Add Another Module

Step 8: Make an API Call Configuration

Let’s set up the configuration.

  • For the API Endpoint Path dropdown box, we will add the /v1/delete/file endpoint. This endpoint will automatically delete the temporary file after expiration.
  • For the Input Type dropdown box, select the Upload files and inject as ‘url’ param to automatically input files from PDF.co –  Make an API Call output.

Setup Make an API Call Configuration
Setup Make an API Call Configuration

Since we’re done setting up the configuration, let’s re-run the scenario to see the result.

Step 9: Deleted File Result

  • Great! We successfully set the output file to expire after 5 minutes and delete the expired file automatically.

Deleted File Result

In this tutorial, you learned how to set the output file to expire after 5 minutes using Make. You also learned how to use the PDF.co Web API to delete the expired file.

Related Pages:

Related Samples: