Can the slack summary be sent to a generic webhook URL endpoint?
is it possible to send the slack summary to a generic webhook such as the public URL provided by microsoft teams?
Hi @kmaqsudi we need to create a new plugin for that, but it should not be too hard. Checkout the Matrix plugin that I guess have most functionality that is needed: https://github.com/sitespeedio/sitespeed.io/tree/main/lib/plugins/matrix
Do you have time @kmaqsudi to give It a try? I can help guide you.
Yes I'll give it a try tonight and let you know how it goes. Thanks
On Wed, Apr 14, 2021, 3:41 PM Peter Hedenskog @.***> wrote:
Hi @kmaqsudi https://github.com/kmaqsudi we need to create a new plugin for that, but it should not be too hard. Checkout the Matrix plugin that I guess have most functionality that is needed: https://github.com/sitespeedio/sitespeed.io/tree/main/lib/plugins/matrix
Do you have time @kmaqsudi https://github.com/kmaqsudi to give It a try? I can help guide you.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sitespeedio/sitespeed.io/issues/3347#issuecomment-819783167, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHZTSQIDHD3TEB3VSFFEY3TIXVUXANCNFSM425XTFBQ .
was not able to get it working
Is there any blog available to use custom generic webhook endpoint?
@kmaqsudi let me have a go tomorrow. I'll start with a simple example and then maybe you can verify that it works for you and then we can add more functionality? For my use case I need only the URL of the result.
@ganeshcpote You mean blog how to use it from sitespeed.io? No not right now, but let me give it a try to see if I can add the functionality first and then some documentation.
Sounds good. Thanks Peter.
On Mon, May 3, 2021, 3:40 PM Peter Hedenskog @.***> wrote:
@kmaqsudi https://github.com/kmaqsudi let me have a go tomorrow. I'll start with a simple example and then maybe you can verify that it works for you and then we can add more functionality? For my use case I need only the URL of the result.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sitespeedio/sitespeed.io/issues/3347#issuecomment-831486635, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHZTSVNV6GMASNDP3TEZ2TTL33ZXANCNFSM425XTFBQ .
@soulgalore for reference, this is what i'm trying to have the output of the sitespeed jobs go to with a link to the summary (same as what you do today for slack).
https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using
@ganeshcpote You mean blog how to use it from sitespeed.io? No not right now, but let me give it a try to see if I can add the functionality first and then some documentation.
Thanks @soulgalore .. I will wait for your response since this is something very interesting and want to use this for my most of the use cases
Hi @kmaqsudi is it easy for you to test a branch? https://github.com/sitespeedio/sitespeed.io/tree/webhook ?
I've made it as simple as possible for now and I've only tested it with https://requestbin.net
I've tested it like this:
bin/sitespeed.js --webhook.url http://requestbin.net/r/ffx4mgqy https://www.sitespeed.io -n 1 --resultBaseURL https://myfiles.com/
It will post a JSON that looks like {"text": "url"} and you can your own parameters like this:
bin/sitespeed.js --webhook.url http://requestbin.net/r/ffx4mgqy --webhook.secret "my secret" https://www.sitespeed.io -n 1 --resultBaseURL https://myfiles.com/
and the post will be:
{"text": "url", "secret": "my secret"}
Let me know how it works out for you + what's the best formatting, is it markdown?
Hi @soulgalore, is this webhook feature released for use?
No @ganeshcpote I need someone to try it first.
Hi @soulgalore, where do I find the docker container image for this webhook branch? I want to try this tomorrow with some of the use cases I have on this.
Hi @ganeshcpote , cool, we auto build every branch so you can try the container: sitespeedio/sitespeed.io-autobuild:webhook
Hi @ganeshcpote , cool, we auto build every branch so you can try the container:
sitespeedio/sitespeed.io-autobuild:webhook
Hi @soulgalore, I was trying with my Jenkins generic webhook and it looks like port number is hardcoded in the file https://github.com/sitespeedio/sitespeed.io/blob/webhook/lib/plugins/webhook/send.js (line no: 13). We need to change the logic to get it from URL instead of. I will try with https://requestbin.net and post you the response

Hi @soulgalore, I was able to successfully test this feature which sent the report URL through webhook.
Is there any chance to optimize this feature to include the following :
- port number to be parameterized
- send json formatted report to webhook (as additional storage if someone wants to read the json and store in their own database)
Hi @ganeshcpote I've fixed the port so it takes it from the URL, it will take X minutes before the container is rebuilt.
About what to send: not sure about what to send, but at least I should start by doing it configurable so you can choose. Lets see if I can find some time this weekend to start doing that.
Good start Peter. If the exact same summary as the default slack one can be sent, it would be amazing
On Fri, May 21, 2021, 8:05 AM Peter Hedenskog @.***> wrote:
Hi @ganeshcpote https://github.com/ganeshcpote I've fixed the port so it takes it from the URL, it will take X minutes before the container is rebuilt.
About what to send: not sure about what to send, but at least I should start by doing it configurable so you can choose. Lets see if I can find some time this weekend to start doing that.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sitespeedio/sitespeed.io/issues/3347#issuecomment-845903505, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHZTSXQJZ5K2AWA7A5EBYLTOZECBANCNFSM425XTFBQ .
So I got stuck with this. I'm working on branch where you can configure if the message will be HTML/Markdown or plain text. I hope to be able to push that late this week.
Thanks Peter. That is great news
On Tue, Jun 15, 2021, 8:03 AM Peter Hedenskog @.***> wrote:
So I got stuck with this. I'm working on branch where you can configure if the message will be HTML/Markdown or plain text. I hope to be able to push that late this week.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sitespeedio/sitespeed.io/issues/3347#issuecomment-861439942, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHZTSQ3AYZIHRWRCJVOBY3TS46QXANCNFSM425XTFBQ .
I pushed a couple of changes today and it would be great if someone can help me try them out and fine-tune the output. I tried first using pug to generate different output (html/markdown/text) to separate the code from the look but no luck.
I used https://webhook.site to try it out it would be great to test them in a real env. I haven't tested all different usecases yet so there are a lot that can be tuned.
Either you checkout the branch webhook and run directly from there:
bin/sitespeed.js https://www.sitespeed.io --webhook.url https://webhook.site/XXXXXXX -n 1 --headless --webhook.messages pageSummary --webhook.style markdown
Or if you use Docker use the container:
sitespeedio/sitespeed.io-autobuild:webhook
You can choose when to send a message:
- on errors - if something goes wrong in your test
- budget - the budget result
- pageSummary - when a page has finished testing. To get a good feel of what it would like you should also set resultBaseURL,
I only did minima<l styling with markdown and HTML so please feel free to fix what's broken and send PRs to that branch I'll merge them ASAP.
I totally forgot about this. I updated the branch and made a PR in https://github.com/sitespeedio/sitespeed.io/pull/4045