Automate document creation (PDF, PPTX, DOCX, XLSX) using an n8n workflow and Anthropic Claude AI skills. Automatically download files and upload them to Google Drive.
Download this n8n workflow template and start using it instantly.
This powerful n8n workflow demonstrates how to leverage advanced Large Language Model (LLM) capabilities—specifically Anthropic’s Agent Skills—to perform complex, multi-format document generation. The system initiates when a user submits a prompt via the initial n8n trigger form, specifying the desired output format (PDF, DOCX, PPTX, or XLSX). The workflow routes the request to the relevant Claude skill with detailed system prompts ensuring professional formatting, clear structure, and readability.
Once the document is generated by the AI, the n8n workflow automatically handles the technical steps: parsing the response to extract the unique file ID, downloading the binary data, and finally uploading the resulting file to Google Drive. This n8n node combination creates a seamless, automated pipeline, saving substantial manual effort involved in AI interaction, file handling, and cloud storage management. This complete n8n template provides a robust solution for advanced document generation.
This n8n workflow operates in three main stages:
On form submission n8n trigger node, where the user inputs their Prompt and selects the File Type. The data is then passed to the Switch n8n node, which dynamically routes the request to the specific generation branch (PPTX, PDF, DOCX, XLSX) based on the user's selection.HTTP Request n8n node (Create PPTX, Create PDF, etc.) sends the user's prompt to the Anthropic Messages API, utilizing a powerful system prompt and the respective proprietary skill (pdf, docx, pptx, xlsx). Once the file is created by Claude, the resulting JSON response is processed by a custom Code n8n node (e.g., Extract PDF file_id). This crucial step uses custom logic to recursively search for and extract the file ID required for downloading.HTTP Request n8n node (e.g., Download PDF) to fetch the binary file content from the Anthropic API. Finally, the binary file data is passed to the Google Drive n8n node, which performs the final action: uploading the generated file to a predefined folder in Google Drive, completing the entire n8n automation.To deploy this powerful n8n template, follow these steps:
x-api-key as the header name and your Anthropic API key as the value. Apply this credential to all HTTP Request nodes (Create..., Download..., and Get All Skills). Ensure the Anthropic API is configured to allow Agent Skills and file API access.Google Drive n8n nodes (Upload...).Upload... n8n node, verify and set the desired target Folder ID where the generated documents should be stored.On form submission n8n trigger to start testing the document generation. On form submission (n8n trigger):
Function: Starts the n8n workflow upon receiving a submission from a public web form.
Key Configuration: Captures two inputs: Prompt (the content request) and File Type (a dropdown allowing selection of PPTX, PDF, DOCX, or XLSX).
Switch (n8n node):
Function: Routes the execution path based on the user's selected File Type input.
Key Configuration: Four distinct output branches corresponding to the four possible file types.
Create PPTX / PDF / DOCX / XLSX (HTTP Request n8n node):
Function: Communicates with the Anthropic /v1/messages API to generate the document using specialized Agent Skills.
Key Configuration: Uses a detailed system prompt describing professional formatting requirements and dynamically injects the user's prompt using the expression {{ $('On form submission').item.json.Prompt }}.
Extract ... fileid (Code n8n node):
Function: Parses the complex JSON output from the Anthropic API response using custom JavaScript logic to reliably locate and output the critical fileid needed for download.
Download ... (HTTP Request n8n node):
Function: Downloads the generated file content from the Anthropic files API endpoint.
Key Configuration: Uses the file ID extracted in the previous n8n node (=https://api.anthropic.com/v1/files/{{ $json.file_id }}/content) and is configured to return the response in file (binary) format.
Upload ... (Google Drive n8n node):
Function: Takes the binary data from the Download step and uploads it to Google Drive.
* Key Configuration: Sets the filename dynamically using data from the binary object (={{ $binary.data.fileName}}) and specifies a target Folder ID.
Automate document creation using n8n. Trigger an n8n workflow when a new PDF is uploaded to Google Drive, extract data using OpenAI, and generate a professional draft document with email notifications.

Use this comprehensive n8n workflow template to automatically generate professional construction quotes from JotForm submissions, integrate leads into Supabase CRM, and send personalized HTML emails. Speed up your sales process with n8n.

Use this robust n8n workflow to automate professional changelog generation. It uses the n8n GitHub trigger, retrieves commits, sends them to OpenAI, and creates polished GitHub releases.

Use this powerful n8n workflow to automatically generate professional HTML email signatures, convert them to PDF, and deliver them instantly via Gmail. A perfect n8n template for HR automation.

Generate professional emails instantly using this powerful n8n workflow. Select the recipient, context, and tone (formal, friendly, casual) for perfect AI-driven communication using the OpenAI n8n node.

Full-stack Web Developer based in Italy specialising in Marketing & AI-powered automations. For business enquiries, send me an email at [email protected] or add me on Linkedin.com/in/davideboizza







































