Skip to content

My workflow 3

A GitHub webhook-triggered workflow that monitors pull request events on the educate-sifa repository and executes system commands for credential management.

Purpose

No business context provided yet — add a context.md to enrich this documentation.

How It Works

This workflow operates as a simple GitHub webhook listener:

  1. GitHub Event Detection: The workflow listens for pull request events (opened, closed, synchronized, etc.) on the GaturaN/educate-sifa repository
  2. Command Execution: When triggered, it executes a complex shell command that exports n8n credentials in a decrypted format, processes them through Node.js to extract credential data, and cleans up temporary files

The workflow appears to be designed for credential auditing or backup purposes, triggered by repository activity.

Mermaid Diagram

graph TD
    A[GitHub Trigger<br/>Pull Request Events] --> B[Execute Command<br/>Export & Process Credentials]

    style A fill:#e1f5fe
    style B fill:#f3e5f5

Trigger

GitHub Trigger - Webhook-based trigger that activates on pull request events in the GaturaN/educate-sifa repository. This includes events like: - Pull request opened - Pull request closed - Pull request synchronized - Pull request reopened

Nodes Used

Node Type Purpose
GitHub Trigger Listens for pull request events on the specified repository
Execute Command Runs shell commands to export and process n8n credentials

External Services & Credentials Required

GitHub Integration

  • Service: GitHub API
  • Credential: Francis Educate Fine Grained Tokens (GitHub API credential)
  • Permissions: Repository webhook access for the educate-sifa repository

System Requirements

  • n8n CLI: Must be available in the system PATH
  • Node.js: Required for JSON processing in the command
  • Shell Access: Unix-like shell environment with mktemp, timeout, and rm commands

Environment Variables

No specific environment variables are configured for this workflow. The Execute Command node relies on system-level access to n8n CLI tools.

Data Flow

Input: GitHub pull request webhook payload containing event details, repository information, and pull request metadata.

Processing: The workflow extracts and processes n8n credentials, transforming them into a structured JSON format that includes credential names, types, and data.

Output: JSON-formatted credential information output to the console/logs, with temporary files automatically cleaned up.

Error Handling

The workflow includes basic error handling mechanisms: - Timeout Protection: The credential export command has a 30-second timeout to prevent hanging - File Cleanup: Temporary credential files are automatically removed with rm -f $F - Command Chaining: Uses shell command chaining with proper error propagation

No explicit error handling nodes are present in the workflow structure.

Known Limitations

  • The workflow executes system commands that require elevated permissions for credential access
  • Temporary file creation may fail if /tmp directory is not writable
  • The 30-second timeout may be insufficient for large credential exports
  • No validation of the GitHub webhook payload before command execution

No related workflows identified in the current context.

Setup Instructions

1. Import the Workflow

  1. Copy the workflow JSON
  2. In n8n, go to Workflows → Import from JSON
  3. Paste the JSON and import

2. Configure GitHub Credentials

  1. Create a GitHub API credential in n8n
  2. Use a fine-grained personal access token with webhook permissions
  3. Assign the credential to the GitHub Trigger node

3. Set Up Repository Webhook

  1. Ensure the GitHub credential has access to the GaturaN/educate-sifa repository
  2. The workflow will automatically create the webhook when activated
  3. Verify webhook creation in the repository's Settings → Webhooks

4. System Prerequisites

  1. Ensure n8n CLI is installed and accessible
  2. Verify Node.js is available in the system PATH
  3. Test shell command access and permissions

5. Activate the Workflow

  1. Save the workflow configuration
  2. Click "Active" to enable the GitHub webhook
  3. Test by creating a pull request in the target repository

6. Monitor and Validate

  1. Check workflow execution logs for successful credential exports
  2. Verify temporary file cleanup is working properly
  3. Monitor for any permission or timeout errors