{"id":20487121,"url":"https://github.com/bear-in-mind/sentry_notion","last_synced_at":"2025-04-13T15:25:50.417Z","repository":{"id":56711984,"uuid":"371564670","full_name":"bear-in-mind/sentry_notion","owner":"bear-in-mind","description":"A simple app built with Roda that allows basic integration between Sentry and Notion","archived":false,"fork":false,"pushed_at":"2021-05-30T05:25:26.000Z","size":26,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T06:22:18.449Z","etag":null,"topics":["notion","notion-api","notion-data","roda","ruby","sentry-integration"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bear-in-mind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-28T03:05:32.000Z","updated_at":"2023-12-29T05:10:44.000Z","dependencies_parsed_at":"2022-08-16T00:00:18.090Z","dependency_job_id":null,"html_url":"https://github.com/bear-in-mind/sentry_notion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bear-in-mind%2Fsentry_notion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bear-in-mind%2Fsentry_notion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bear-in-mind%2Fsentry_notion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bear-in-mind%2Fsentry_notion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bear-in-mind","download_url":"https://codeload.github.com/bear-in-mind/sentry_notion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248734148,"owners_count":21153157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["notion","notion-api","notion-data","roda","ruby","sentry-integration"],"created_at":"2024-11-15T16:39:58.269Z","updated_at":"2025-04-13T15:25:50.398Z","avatar_url":"https://github.com/bear-in-mind.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sentry \u003c=\u003e Notion integration\n\nA simple app built with [Roda](https://github.com/jeremyevans/roda) that allows basic integration between Sentry and Notion.\n\nOnce deployed and configured, each new Sentry issue will trigger a page insertion in the Notion database of your choice, while solving an issue will mark the ticket as done. Properly scheduled through an available rake task, tickets marked as done inside of Notion will sync back to Sentry to mark the corresponding issues as solved.\n\n## Use\n\n### From Sentry to Notion\n\n1. In Sentry, inside `Settings`, head to `Developer Settings`. You can then add a `New Internal Integration`.\nLeave the webhook URL empty for now (it will be your future production URL), but fill out a name, allow `Issues and Events` with `Read and Write` and check the `issues` in the webhooks section.\nGrab your token and your client secret\n2. Head to https://www.notion.so/my-integrations\n3. Add your new (internal) integration and note your Client secret.\n4. Now in Notion, go to your target database. Hit the `Share` button, click on the field to add someone, and you'll see your integration appear in the list.\n5. Now, click on the `Copy link` button, paste the link somewhere and extract the database id like so :\n```\nhttps://www.notion.so/myworkspace/a8aec43384f447ed84390e8e42c2e089?v=...\n                                  |--------- Database ID --------|\n```\n6. Now if you haven't done so already, fork this repo. Open the `create_page.rb` and the `update_page.rb` files, and change the value of the variables accprding to the fields you actually use in your database. By default, these are set to what I personally use in my backlog DB that looks like this :\n\u003cimg width=\"500\" alt=\"board_view\" src=\"https://user-images.githubusercontent.com/38864576/120089450-c1295300-c0fa-11eb-8813-c9f94a32aa85.png\"\u003e\n\u003cimg width=\"500\" alt=\"ticket_example\" src=\"https://user-images.githubusercontent.com/38864576/120089452-c4bcda00-c0fa-11eb-9ae5-78dc37f882b4.png\"\u003e\n7. Deploy in production, and set the following environment variables : `SENTRY_SECRET`, `SENTRY_TOKEN`, `NOTION_SECRET`, `NOTION_DB`\n\n8. Back to Sentry, go to your integration and set the Webhook URL to `https://your-app.com/issues`.\n9. Create an alert rule in Sentry's Alerts section, choosing your own integration, and leaving filters blank\n10. Check out your bugs appear and disappear 🦟\n\u003cimg width=\"500\" alt=\"Capture d’écran 2021-05-30 à 04 03 07\" src=\"https://user-images.githubusercontent.com/38864576/120089556-f2565300-c0fb-11eb-878d-d7b3697f855c.png\"\u003e\n\n### From Notion to Sentry\n1. In Sentry, still in `Settings`, create an `Auth token` in the API section and add it as an environment variable in production as `SENTRY_API`\n2. The task is available through the command `rake resolve_issues`. Just a use any scheduler/cron job to launch it as often as you wish. Basically, this will look at the issues marked as done in the last 24 hours and will mark them as `resolved` in Sentry.\n\n## Development\n\nTo run the server, run `rerun rackup`\n\nTo be able to route Sentry's webhook to your localhost, you'll need something like https://webhookrelay.com/ to run alongside your server. You'll also have to either add a new Sentry Integration with the webhookrelay URL as `Webhook URL`, or temporarily change the one in your current integration.\n\nAdd your environment variables in a `.env.rb` file like so :\n```ruby\nENV[\"SENTRY_TOKEN\"] = \"YOUR_TOKEN_HERE\"\nENV[\"SENTRY_SECRET\"] = \"YOUR_SECRET_HERE\"\nENV[\"NOTION_SECRET\"] = \"NOTION_SUPER_SECRET_TOKEN\"\nENV[\"NOTION_DB\"] = \"NOTION_DB_ID\"\n```\n\n## Resources\n[Roda's home](https://roda.jeremyevans.net/)\n\n[*Mastering Roda* handbook](https://fiachetti.gitlab.io/mastering-roda/)\n\n[Notion documentation](https://developers.notion.com/docs)\n\n[Sentry documentation](https://docs.sentry.io/api/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbear-in-mind%2Fsentry_notion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbear-in-mind%2Fsentry_notion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbear-in-mind%2Fsentry_notion/lists"}