Use this reliable n8n workflow to create a public HTTP endpoint that fetches an external file (like a PDF) and forces a download response. Learn how to handle binary files using n8n templates.
Download this n8n workflow template and start using it instantly.
Developers building microservices or custom APIs.
Teams needing to provide temporary or controlled download links for documents.
Users looking to understand how to handle binary data and custom headers within an n8n workflow.
Automation specialists utilizing n8n for file delivery solutions.
When building complex applications, it is often necessary to serve files from a custom endpoint without exposing the original source URL. This powerful n8n workflow solves that problem by acting as a proxy and delivery service. It uses an n8n trigger to initiate the process upon a GET request. The automation fetches an external PDF document, converts it into binary data, and then immediately responds to the original requester, forcing a download with a custom, dynamically dated filename. This reliable n8n template is essential for creating secure, branded, and temporary download links without writing complex backend code. Every step, using specialized n8n node configurations, ensures high performance and correct binary file handling.
This n8n workflow operates sequentially, ensuring the file is fetched before the response is sent:
/download-pdf.respondToWebhook capability to immediately send this binary file back to the client that initiated the original request. It also includes a custom content-disposition header, ensuring the client's browser downloads the file with a specific name, dynamically generated using the current date via n8n's expression capabilities.To start using this specific n8n workflow, follow these steps:
YOURN8NURL/webhook/download-pdf) in your browser or using a tool like Postman. On GET request (Webhook):
Function: Serves as the primary n8n trigger, waiting for external activation.
Key Configuration: Configured for a GET method on the path /download-pdf. Response mode is set to 'Respond with Response Node' to ensure it waits for the final 'Respond with attachment' n8n node.
Fetch binary file (HTTP Request):
Function: Retrieves the external PDF document.
Key Configuration: The URL is hardcoded to the target PDF. The crucial setting is 'Response Format' under the 'Options' tab, which is set to File to correctly handle the binary content.
Respond with attachment (Respond to Webhook):
Function: Sends the received binary data back to the user who triggered the n8n workflow.
* Key Configuration: Responds using the 'Binary Data' option. A custom header, content-disposition, is added to force the file download and set the filename dynamically using an n8n expression: mydocument{{ $now.toFormat('yyyy-MM-dd') }}.pdf.
Automate personalized video outreach for inbound leads using this advanced n8n workflow. Integrate Heygen AI for video generation and GPT-4 for dynamic email scripting, boosting conversions.

Use this advanced n8n workflow to automate content generation. It combines LangChain agents, AI research tools, and structured parsing to draft and publish high-quality, localized social media posts to Facebook.

Build comprehensive, high-quality, research-backed articles using an advanced n8n workflow. This n8n template uses OpenAI, web search for RAG, and section-by-section generation for peak SEO performance.

Use this powerful n8n workflow to automate daily restaurant performance reporting. Extract sales, waste, and customer feedback from Google Sheets, analyze the data using a Gemini AI agent, and send a concise, actionable summary via Gmail. Start with this n8n template today.

Use this powerful n8n workflow to scrape restaurant leads from Google Maps using Apify, store data in Airtable, and automatically generate and send a promotional AI newsletter via Gmail.








































