Opening Problem Statement
Meet Sarah, a developer at a mid-sized software company that depends heavily on open source components hosted on GitHub. Every week, Sarah’s team needs to stay updated on new upstream releases to assess if the codebase must be patched or dependencies updated. Unfortunately, this process is manual: Sarah spends hours each week cross-checking the latest GitHub releases against outstanding GitLab issues. Sometimes new releases get missed, resulting in delayed patches and increased bug risk. Other times, duplicate issues are accidentally created, cluttering the tracking board. This wastes valuable developer time and can lead to errors that cost both effort and credibility.
Sarah’s exact pain is clear: monitoring new GitHub releases and ensuring a unique corresponding GitLab issue exists without duplicates or misses is tricky and time-consuming. She needs a reliable, automated way to generate GitLab issues only when a new GitHub release does not have one already — saving hours and preventing errors.
What This Automation Does
When you run this n8n workflow, it performs the following tasks automatically:
- Fetch the latest GitHub release for a specified repository (using the GitHub node).
- List all open issues from a related GitLab repository.
- Compare release tags with issue titles to identify whether an issue for the latest release already exists.
- Create a new GitLab issue if no matching issue is found, including release details and a link.
- Run weekly on a schedule automatically checking for new releases without manual intervention.
- Prevent duplicate issues with smart filtering in a function node.
Thanks to this, Sarah and her team save several hours weekly by eliminating manual monitoring while ensuring no release-related issue is missed or duplicated.
Prerequisites ⚙️
- n8n account (cloud or self-hosted) to run workflows. (Self-hosting option available)
- GitHub account with access to the desired repository.
- GitLab account with project permissions to list issues and create new issues.
- API credentials for both GitHub and GitLab set up and configured in n8n.
- Basic understanding of n8n workflow editor.
Step-by-Step Guide
Step 1: Set Up the Cron Trigger to Run Weekly
Navigate to Triggers → Cron node. Set the mode to everyWeek so that this workflow checks automatically on a weekly basis. You should see the Cron node trigger every 7 days. This replaces Sarah’s manual checking sessions on Mondays, for example.
Common mistake: Forgetting to save or activate the Cron node might prevent automation from running.
Step 2: Configure the GitHub Node to Fetch Latest Release
Click +Add Node → GitHub. Select Resource: Release and Operation: getAll. Limit the results to 1 to fetch only the most recent release. Configure credentials connected to your GitHub account.
You should see the release data including tag_name, body, URL, and assets after running this node.
Common mistake: Not limiting to 1 result leads to unnecessary data and complicates logic downstream.
Step 3: Configure the GitLab Node to List All Issues
Add a GitLab node configured to list issues from your target repository. Select Owner, Repository, and ensure filters are set to fetch relevant issues.
After running, the node shows issues with titles, descriptions, and states.
Common mistake: Incorrect owner or repository names causing no issues to return.
Step 4: Merge Latest Release and Issues Data
Add the Merge node to combine outputs from both the GitHub and GitLab nodes. This lets us refer to both data sources simultaneously.
You should see two distinct input streams appearing in the merge node when connected.
Common mistake: Connecting nodes in the wrong order or choosing wrong merge mode can cause data mismatch.
Step 5: Filter Releases Without Matching Issues Using a Function Node
Add a Function node with the provided JavaScript code that:
const _ = require('lodash')
const releases = _.filter(items, i => _.has(i, 'json.assets'))
if (releases.length != 1) throw new Error(`Invalid release count: ${releases.length}`)
const release = releases[0]
const issues = _.without(items, release)
const matchingIssue = _.find(issues, i => i.json.title.includes(release.json.tag_name))
if (matchingIssue) return []
else return [release]
What this does: It checks if any GitLab issue title includes the latest GitHub release tag. If yes, it ends the workflow. If not, it passes forward the release data to create an issue.
Common mistake: Missing lodash import or incorrect property names lead to runtime errors.
Step 6: Create a New GitLab Issue for the Release
Add a GitLab node set to Operation: create. Map the issue title as “Upstream release: {{tag_name}}” and the body to include the release URL and content. Leave labels and assignee as needed.
On successful run, you should see the new issue created with the release info. This ensures no duplicate issues exist.
Common mistake: Mapping fields incorrectly or missing required permissions cause failure to create issues.
Customizations ✏️
1. Change the Check Frequency
Modify the Cron node to run daily or monthly by adjusting the mode parameter. This controls how often your releases are checked.
2. Customize Issue Content
In the Create Issue GitLab node, change the issue body template to include additional info like release author or changelog sections by referencing JSON properties from GitHub.
3. Add Notifications
Add a Slack or Email node after issue creation to notify your team automatically when a new issue is generated.
4. Filter by Release Tag Prefix
Modify the JavaScript in the Function node to only consider releases with specific tag name patterns, useful if you track multiple projects in one workflow.
Troubleshooting 🔧
Problem: “Invalid release count: 0” error in Function node.
Cause: GitHub node returned no releases, or API call failed.
Solution: Check GitHub repository permissions and API credentials. Execute the Get latest release node standalone to verify data.
Problem: No issues fetched from GitLab node.
Cause: Wrong project owner or repository name, or insufficient permissions.
Solution: Verify inputs and API credentials, test the List issues node directly.
Pre-Production Checklist ✅
- Confirm GitHub credentials have access to repository releases.
- Verify GitLab credentials can list and create issues in the target repo.
- Test each node independently to ensure proper data retrieval.
- Ensure the Cron node is properly configured and enabled.
- Run full workflow with debug to monitor outputs.
Deployment Guide
Enable and activate the Cron node to allow weekly automated triggers. Make sure the workflow is set to “Active” and monitor executions in n8n’s execution list. If issues occur, enable detailed logging or add error nodes for better debugging. This workflow does not require complex infrastructure and scales well for most team sizes.
FAQs
Can I use other Git platforms besides GitHub or GitLab?
This workflow specifically uses GitHub for release data and GitLab for issue tracking. You would need to customize nodes if using alternatives like Bitbucket or Jira.
Does this workflow consume API credits?
Yes, each API call to GitHub and GitLab counts towards your account’s rate limits. Adjust Cron frequency accordingly.
Is my data safe?
API credentials stored in n8n are encrypted. Keep your n8n instance secure and use secure credential storage.
Conclusion
By following this guide, you automated an otherwise tedious weekly process: checking new GitHub releases and creating GitLab issues only when necessary. This saves you hours every week, reduces human error, and keeps your project management clean.
Next, you can extend this workflow to include notifications via Slack or email, add changelog parsing to auto-label issues, or integrate testing automation triggered by new releases.
Implementing this exact workflow empowers teams like Sarah’s to stay focused on development instead of manual update tracking. Happy automating!