{"id":24333689,"url":"https://github.com/fulldecent/freescout-sidebar-webhook","last_synced_at":"2025-09-27T21:31:54.736Z","repository":{"id":147413673,"uuid":"397052746","full_name":"fulldecent/freescout-sidebar-webhook","owner":"fulldecent","description":"Sidebar Webhook asynchronously injects HTML from your server into conversation sidebars","archived":false,"fork":false,"pushed_at":"2025-05-20T15:40:41.000Z","size":685,"stargazers_count":23,"open_issues_count":2,"forks_count":15,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-20T16:49:15.875Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fulldecent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-17T01:56:38.000Z","updated_at":"2025-05-20T15:40:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"be4b5dd8-093f-4c83-98a7-c125e2b4d8b0","html_url":"https://github.com/fulldecent/freescout-sidebar-webhook","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/fulldecent/freescout-sidebar-webhook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2Ffreescout-sidebar-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2Ffreescout-sidebar-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2Ffreescout-sidebar-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2Ffreescout-sidebar-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fulldecent","download_url":"https://codeload.github.com/fulldecent/freescout-sidebar-webhook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2Ffreescout-sidebar-webhook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277295918,"owners_count":25794402,"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","status":"online","status_checked_at":"2025-09-27T02:00:08.978Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-01-18T03:33:44.647Z","updated_at":"2025-09-27T21:31:54.723Z","avatar_url":"https://github.com/fulldecent.png","language":"PHP","funding_links":["https://www.paypal.com/paypalme/fulldecent/10usd"],"categories":[],"sub_categories":[],"readme":"# FreeScout Sidebar Webhook\n\nSidebar Webhook asynchronously injects HTML from your server into conversation sidebars.\n\nThis screenshot shows what it does: you can load any content on a per-customer, per-message basis from your own web server, asynchronously, every time a conversation is loaded on the screen.\n\nIn this picture, the kittens and text were loaded from an external server based on the customer's email address.\n\n![with title](sidebar-with-title.png)\n![without title](sidebar-without-title.png)\n\n## Use cases\n\n- Directly link to your customer management system\n- Show details about order status live from your fulfillment system\n- Quickly ship changes to your FreeScout system UI without updating modules\n- Connect to backends using PHP/Node.js/Ruby/Perl/Rust/Go/Bash/Haskell and even Java\n\n## Installation\n\nThese instructions assume you installed FreeScout using the [recommended process](https://github.com/freescout-helpdesk/freescout/wiki/Installation-Guide), the \"one-click install\" or the \"interactive installation bash-script\", and you are viewing this page using a macOS or Ubuntu system.\n\nOther installations are possible, but not supported here.\n\n1. Download the [latest release of FreeScout Sidebar Webhook](https://github.com/fulldecent/freescout-sidebar-webhook/releases).\n2. Unzip the file locally.\n3. Copy the folder into your server using SFTP. (ℹ️ Folder is renamed in this process.)\n   ```sh\n   scp -r ~/Downloads/freescout-sidebar-webhook root@freescout.example.com:/var/www/html/Modules/SidebarWebhook/\n   ```\n4. SSH into the server and update permissions on that folder. \n   ```sh\n   chown -R www-data:www-data /var/www/html/Modules/SidebarWebhook/\n   ```\n5. Access your admin modules page like https://freescout.example.com/modules/list.\n6. Find **Sidebar Webhook** and click ACTIVATE.\n7. Configure the webhook URL in the mailbox settings. The webhook secret is optional and will be sent as part of the payload if set.\n8. After everything works, purchase a license code by sending USD 10 at https://www.paypal.com/paypalme/fulldecent/10usd\n\n## Your webhook server\n\nYour webhook server will receive a POST request with this kind of JSON body:\n```json\n{\n    \"customerId\": 123,\n    \"conversationSubject\": \"Testing this sidebar\",\n    \"conversationType\": \"Phone\",\n    \"customerEmail\": \"hello@example.com\",\n    \"customerEmails\": [\n      \"hello@example.com\",\n      \"welcome@example.com\"\n    ],\n    \"customerPhones\": [{\n\t    \"n\": \"\",\n      \"type\": 1,\n      \"value\": \"\"\n    }],\n    \"mailboxId\": 1,\n    \"secret\": \"0C7DA918-E72C-47B2-923B-0C5BB6A6104E\"\n}\n```\n\nYour webhook server shall respond with content to be injected into the sidebar. The document should be a complete, well-formed HTML document like so:\n\n```html\n\u003chtml\u003e\n    \u003cbody\u003e\n        \u003ch1\u003eHello world\u003c/h1\u003e\n    \u003c/body\u003e\n\u003c/html\u003e\n```\n\nYou can optionally set a title in the document and it will be used as the panel title in the sidebar:\n\n```html\n\u003chtml\u003e\n    \u003chead\u003e\n        \u003ctitle\u003eMy panel title\u003c/title\u003e\n    \u003c/head\u003e\n    \u003cbody\u003e\n        \u003ch1\u003eHello world\u003c/h1\u003e\n    \u003c/body\u003e\n\u003c/html\u003e\n```\nSetting CORS headers is not required, as the document is requested by the FreeScout server (not by the user's browser).\n\n## Project scope\n\nOur goal is to have a very simple module to allow vast extensibility in the conversation sidebar.\n\nAnything that makes it simpler (removes unneded code) or more extensible for most people (adding a couple post parameters in `boot()`) will be a welcome improvement.\n\n## Troubleshooting\n\nHints\n\n* \u003e  Class \"Modules\\SidebarWebhook\\Providers\\SidebarWebhookServiceProvider\" not found\n\n  Did you rename the folder as per step 3?\n\nIf something is not working, please try these steps so we can see what's wrong.\n\n1. Update FreeScout to the latest version (even if the new version doesn't have any relevant changes, the process of updating can sometimes fix problems that would prevent freescout-sidebar-webhook from running).\n2. Use `chown -r` to ensure the module has the same owner/permissions as other files in your FreeScout installation.\n3. Try to disable and reenable freescout-sidebare-webhook from your system/modules page.\n4. To confirm the module file is actually activated and readable you might add a line like this above the `private const MODULE_NAME` line. The code to add is: `file_put_contents(\"/tmp/sidebartmp\", \"is running\");` And then you can confirm it is running by seeing if that file is created when you load the page.\n5. Next check for system logs. It will be helpful to note any warnings, errors or notices as they may instruct where the problem is coming from.\n6. Check your PHP version, is it a version supported by FreeScout?\n\nAfter you have checked all these things, please create an issue and detail how you tried each of these steps.\n\n## Inspiration\n\n* This project was inspired by [Sidebar API](https://github.com/scout-devs/SidebarApi).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulldecent%2Ffreescout-sidebar-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffulldecent%2Ffreescout-sidebar-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulldecent%2Ffreescout-sidebar-webhook/lists"}