How to Set the Output File to Expire after 5 Minutes using PDF.co and Make
Sep 9, 2024·5 Minutes Read
In this tutorial, we will show you how to set the output file to expire after 5 minutes using PDF.co and Make.
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.
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.
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 settrue
for the Value. - In the Forcely enable async mode dropdown box, select the No, rely on the async parameter in Body.
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.
Step 5: Add Delay Tools Module
- Now, let’s add the delay tools. So we can set the expiration time of the output file.
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.
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.
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.
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.
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 Tutorials
How to Merge PDF files from Airtable using PDF.co and Make
Sep 9, 2024·5 Minutes Read
Convert DOC to Protected PDF using Make (Formerly Integromat)
Sep 11, 2024·5 Minutes Read