See llms.txt for all machine-readable content.

GitHub and OpenCTI integration

Save yourself the work of writing custom integrations for GitHub and OpenCTI and use n8n instead. Build adaptable and scalable Development, workflows that work with your technology stack. All within a building experience you will love.

How to connect GitHub and OpenCTI

Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

GitHub and OpenCTI integration: Create a new workflow and add the first step

Process incoming files and notify via email with GitHub storage

File Processing Pipeline with Email and GitHub This workflow automatically ingests newly-uploaded files, validates and transforms their contents, stores the processed files in a GitHub repository, and sends email notifications upon completion. It is ideal for teams that regularly receive data drops and need an auditable, automated pipeline to clean, version, and distribute those files. Pre-conditions/Requirements Prerequisites n8n instance (self-hosted or n8n cloud) GitHub and SMTP credentials with appropriate permissions Basic understanding of JavaScript for custom validation/transform code Required Credentials | Credential | Purpose | Minimum Scope | |------------|---------|---------------| | GitHub OAuth2 | Commit transformed files to a repository | repo | | SMTP (Email Send) | Dispatch success/failure notifications | send | Repository & Email Setup Requirements | Item | Example | Notes | |------|---------|-------| | GitHub Repository | [email protected]:org/data-pipeline.git | Branch must exist (default: main) | | Email Recipients | [email protected], [email protected] | Comma-separated list | How it works This workflow automatically ingests newly-uploaded files, validates and transforms their contents, stores the processed files in a GitHub repository, and sends email notifications upon completion. It is ideal for teams that regularly receive data drops and need an auditable, automated pipeline to clean, version, and distribute those files. Key Steps: Schedule Trigger: Executes the pipeline on a defined schedule (e.g., hourly). HTTP Request: Pulls a file manifest or fetches file blobs from an upstream service. SplitInBatches: Iterates over each file individually for isolated processing. Code (Validate): Runs custom JavaScript to ensure file integrity and schema compliance. If (Validation Pass?): Routes good files forward and diverts failures. Code (Transform): Performs any data re-formatting, enrichment, or cleansing. Set: Prepares commit metadata (file path, commit message). GitHub: Creates or updates a file in the target repository/branch. Email Send: Notifies stakeholders of overall job status, including summary metrics. Set up steps Setup Time: 10-15 minutes Clone the Workflow: Import the JSON file or copy from the n8n community templates gallery. Configure Schedule Trigger: Set your desired cron expression (e.g., 0 * * * * for hourly). HTTP Request Node: Enter the endpoint that lists or returns your new uploads. Add authentication headers if required. Adjust Validation Code: Open the first Code node and replace the schema rules with your own logic. Modify Transformation Logic: In the second Code node, apply formatting (e.g., CSV → JSON) or enrichment steps. GitHub Node: Select your GitHub OAuth2 credential. Specify repository, branch, and file path template (e.g., processed/{{ $json.filename }}). Email Send Node: Set SMTP credential. Add recipients and customize subject/body with variables. Test Run: Click “Execute Workflow” to ensure end-to-end success. Activate: Toggle workflow to “Active” for autonomous execution. Node Descriptions Core Workflow Nodes: Sticky Note – Documentation and inline comments for maintainers. Schedule Trigger – Initiates the automation on a fixed timetable. HTTP Request – Retrieves incoming file list or contents. SplitInBatches – Paginates large manifests to conserve memory. Code (Validate / Transform) – Custom JS powering data quality checks and format conversion. If – Branching logic for pass/fail handling. Set – Crafts commit metadata and email summaries. GitHub – Commits each transformed file to the repository. Email Send – Dispatches completion notices or error alerts. Data Flow: Schedule Trigger → HTTP Request → SplitInBatches → Code (Validate) → If true → Code (Transform) → Set → GitHub false → Set (Error) Both branches converge → Email Send Customization Examples Custom Validation Rule // Reject files larger than 5 MB or missing required columns if (items[0].binary.data.size > 5 * 1024 * 1024) { throw new Error('File exceeds 5MB limit'); } const required = ['id', 'email', 'created_at']; required.forEach(col => { if (!items[0].json.headers.includes(col)) { throw new Error(Missing column: ${col}); } }); return items; Dynamic Commit Path Based on Date const date = new Date().toISOString().split('T')[0]; // YYYY-MM-DD item.json.gitPath = archive/${date}/${item.json.filename}; return item; Data Output Format The workflow outputs structured JSON data: { "filename": "orders_2023-10-01.csv", "status": "committed", "commitSha": "a1b2c3d4", "linesProcessed": 523, "errors": [] } Troubleshooting Common Issues GitHub authentication error – Ensure OAuth app is approved and the token has repo scope. Email not delivered – Verify SMTP host, port, and that “less secure apps” are allowed (if using Gmail). Performance Tips Batch large manifests (e.g., 100 records) to avoid memory spikes. Enable n8n queue mode for parallel processing on self-hosted instances. Pro Tips: Use environment variables ({{ $env["VAR_NAME"] }}) for endpoints and secrets. Configure branch protection in GitHub to enforce pull requests instead of direct commits. Aggregate success vs. failure counts in the Email body for quick health checks. This is a community n8n workflow template provided “as-is.” Always review and adapt the workflow to meet your security, compliance, and operational requirements.

Build your own GitHub and OpenCTI integration

Create custom GitHub and OpenCTI workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

GitHub supported actions

Supported methods for OpenCTI

Delete
Get
Head
Options
Patch
Post
Put

To set up OpenCTI integration, add the HTTP Request node to your workflow canvas and authenticate it using a predefined credential type. This allows you to perform custom operations, without additional authentication setup. The HTTP Request node makes custom API calls to OpenCTI to query the data you need using the URLs you provide.

Requires additional credentials set up

Use n8n's HTTP Request node with a predefined or generic credential type to make custom API calls.

GitHub and OpenCTI integration details

GitHub

GitHub is the number one platform for developers. It boosts their software development and enhances their collaboration options. The tools offered by Github help you automate your tasks and facilitate your work, that is why it is preferred by millions of developers around the world.

OpenCTI

OpenCTI is an open-source platform designed for cyber threat intelligence management. It facilitates the collection, analysis, and sharing of threat intelligence data, helping organizations proactively defend against cyber threats by providing insights into vulnerabilities, indicators of compromise, and attacker tactics.

Other integrations with GitHub and OpenCTI

The SOAR platform you want

Mountains of monotonous tasks make building and monitoring your workflows a chore. Not anymore.

Learn more

Save engineering resources

Reduce time spent on customer integrations, engineer faster POCs, keep your customer-specific functionality separate from product all without having to code.

Learn more

FAQ about GitHub integrations

Need help setting up your GitHub and OpenCTI integration?

Discover our latest community's recommendations and join the discussions about GitHub and OpenCTI integration.

  • DupervalAI

    How do I download a binary file using the GitHub node?

    DupervalAI

    Hi, How am I supposed to download a binary file that I fetch with the “Get a file” feature of the GitHub node? I see the file in my execution but it has a downlad button in it that I need to click manually, it seems. I…

    Open topic
  • Семен Буров

    Github Node Error: Could not get the SHA of the file, when try edit file with # or Emoji in name

    Семен Буров

    Describe the problem/error/question I try to use many templates for N8N Backup to github. For example: Github N8N Backups: How to backup workflows with folder structure instead of tags? And in my case i have an error w…

    Open topic
  • Piotr Sikora

    Github List Files Node - How to change branch?

    Piotr Sikora

    Describe the problem/error/question I’m using Github List node. I want to list files and directories from specific branch. As you can see above - there is no option to change the branch. Do you have any option to do…

    Open topic
  • Ammar Aamir

    Environements Control

    Ammar Aamir

    Is environmental control only available for the Enterprise subscription? Is N8N planning to make it available for the community version? This is literally an essential feature.

    Open topic

Looking to integrate Slack and VirusTotal in your company?

Three colleagues talking around laptops at a shared desk

Trusted by teams building smarter workflows.

Why

Why use n8n to integrate GitHub with OpenCTI

Handle branching, merging and iteration easily. Pause your workflow to wait for external events.

Re-run single steps to test changes in no time. And pin your data to avoid generating trigger events every time you execute.

Your data is displayed alongside your settings, making edge cases easy to track down.

Use 1000+ workflow templates available from our core team and our community.

Copy and paste, easily import and export workflows.

Simple enough to 
understand + sophisticated 
enough to ship

Man in a brown jacket working at his desk by a window