2 templates found
Category:
Author:
Sort:

Auto document your n8n workflows

Who is this for? This workflow is designed for n8n users and developers who need to automate the documentation process of their n8n workflows. It's particularly useful for teams looking to streamline their documentation efforts and ensure consistency across their workflow documentation. What problem is this workflow solving? / Use case The primary problem this workflow addresses is the manual and time-consuming process of creating documentation for n8n workflows. It automates the generation of concise, clear, and comprehensive documentation directly from the workflow's JSON, making it easier for both technical and non-technical users to understand what the workflow does and how it operates. What this workflow does Upon receiving a form submission with the workflow title and JSON, this workflow automatically generates documentation that includes: A brief introduction to the workflow. The trigger mechanism (webhook URLs for test and production environments, or cron schedules). Setup requirements, including necessary credentials and external dependencies. Setup Credentials Setup: Ensure you have OpenAI API credentials configured in n8n to use the GPT model for generating documentation text. Form Submission: Users must submit the form with the workflow title and JSON. The form is accessible via: Test URL: domain/form-test/{webhookId} Production URL: domain/form/{webhookId} How to customize this workflow to your needs Modify Trigger URLs: Adjust the webhook or form URLs based on your domain and specific n8n setup. Customize Documentation Template: Edit the OpenAI node's prompt to change the structure or details of the generated documentation. Extend Functionality: Add nodes to integrate with other systems (e.g., automatically publishing the documentation to a wiki or sending it via email). This workflow simplifies the documentation process, making it accessible and manageable for teams of all sizes and technical abilities. By automating documentation, it ensures that all workflows are properly documented, enhancing understanding and efficiency within teams.

Marvin WuBy Marvin Wu
11062

Automate Chinese to English translation in Google Slides with Openrouter AI

--- Overview of the n8n Workflow This n8n workflow automates the translation of text in Google Slides presentations from one language to another using AI. It retrieves a specified presentation from Google Drive, extracts text from the slides, translates it in batches, and updates the presentation with the translated text. The workflow includes sticky notes with setup instructions and guidance on editable fields, formatted in Markdown for clarity. --- Step-by-Step Execution of the Workflow Here’s how the workflow operates, node by node, based on the JSON and image descriptions: Manual Trigger Node: "When clicking ‘Execute workflow’" Function: Initiates the workflow when the user manually clicks "Execute workflow" in n8n. Search for Google Slides Presentation Node: "Google Drive" Function: Searches Google Drive for a presentation file. Retrieve Presentation Data Node: "Google Slides2" Function: Fetches the full presentation data from Google Slides. Extract Text from Slides Node: "Code" Function: Extracts text from the presentation using JavaScript. Split Text Array Node: "Split Out" Function: Breaks the extracted array into individual items. Process Text in Batches Node: "Loop Over Items" Function: Loops over the text items in batches for efficient processing. Translate Text with AI Node: "AI Agent" Function: Translates text from Chinese to English using an AI model. Provide AI Model Node: "OpenRouter Chat Model" Function: Supplies the AI language model for the "AI Agent". Replace Text in Slides Node: "Replace text" Function: Updates the Google Slides presentation with translated text. Delay Between Batches Node: "Wait" Function: Adds a delay to prevent overwhelming the system. --- Sticky Notes: Setup and Customization Guidance The workflow includes three sticky notes with Markdown formatting, providing essential instructions: --- How to Set Up the Workflow To use this workflow in n8n: Import the JSON: Copy the provided JSON into n8n to load the workflow. Configure Credentials: Google Drive: Set up OAuth2 credentials ("Google Drive Auth") with access to the folder containing your presentation. Google Slides: Set up OAuth2 credentials ("Google Slides Auth") with edit permissions for the presentation. OpenRouter: Create an account at openrouter.ai and add the API credentials to the "OpenRouter Chat Model" node. Customize the Google Drive Query: Update the "Google Drive" node’s queryString to match your presentation’s name or ID (default is "slides"). Test the Workflow: Click "Execute workflow" to run it manually and verify each step. --- Potential Customizations You can adapt the workflow for different needs: Change Language Pair: Modify the "AI Agent" node’s system message, e.g., replace "convert all of them into English" with "convert all of them into French" to translate Chinese to French. Use a Different AI Model: Replace the "OpenRouter Chat Model" node with another AI provider (e.g., OpenAI) by updating the node type and credentials. Expand Text Extraction: Edit the "Code" node’s JavaScript to extract text from tables or other elements, not just shapes. Adjust Batch Processing: Change the "Loop Over Items" node’s batchSize (e.g., to 10) or the "Wait" node’s amount (e.g., to 1 second) for performance tuning. Process Multiple Presentations: Remove the limit: 1 in the "Google Drive" node and add a loop to handle multiple files. --- Considerations and Improvements Error Handling: The workflow lacks explicit error handling. Add "If" nodes or error outputs to manage failures (e.g., if no presentation is found). Text Coverage: The "Code" node may miss text in non-shape elements (e.g., tables). Test with your presentation to confirm coverage. Performance: For large presentations, the 2-second wait per batch of 5 may slow things down. Adjust based on your needs and API limits. Permissions: Ensure your Google credentials have edit access to the presentation, or replacements will fail. --- Conclusion This n8n workflow efficiently automates the translation in Google Slides, leveraging Google Drive, Google Slides, and AI via OpenRouter. It’s well-documented with sticky notes and easy to set up with proper credentials. While robust for its purpose, it could benefit from error handling and broader text extraction. You can customize it for different languages, models, or file types by tweaking the relevant nodes as outlined. If you have a specific question or need help with a modification, let me know! OptiLever

Sebastian/OptiLeverBy Sebastian/OptiLever
166
All templates loaded