#how to setup webhooks?

53 messages · Page 1 of 1 (latest)

glossy ferry
#

Hey guys I'm looking for how to setup a deploy webhook similar to vercel for my website with sanity.io?
I'm following this tutorial ( https://www.freecodecamp.org/news/how-to-build-a-portfolio-site-with-sanity-and-nextjs/#step-7-deployment ) any ideas would be amazing!

freeCodeCamp.org

Knowing how to handle content is important when creating a personal website for yourself or a client. This is because maintaining and updating a site can result in substantial expenses if you don't do it correctly. This is even more the case if you're building for someone with a

onyx schoonerBOT
#

Project ID: N/A

amber haloBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

glossy ferry
#

N/A

queen fractal
#

You mean like webhooks that automatically trigger a redepoy? because that's done automatically for you on railway

glossy ferry
#

ok cool but where do I a) get the webhook from railway? 🙂

#

in my dashboard

#

I'm here atm

#

I'm on my project settings page of my app on railway

#

my project id is 4e9575d2-24bb-4039-9954-12f128b13bfd

#

@queen fractal hey? @onyx schooner

queen fractal
#

Oh, I guess that's something else then, I've never used sanity.io so not quite sure what that webhook would do or what fields it requires

glossy ferry
#

I can explain: They just neeed the webhook with is generated from railway. I can't see an automatic webhook generation button or something. So to iterate. they just need the automatic webhook url generated from railway. Did that answer your Q?

#

Much appreciated for the help @queen fractal as its for my portfolio and I misspelled my github handle hehe

queen fractal
#

well, I don't think railway has any generated webhook urls, not 100% sure on that though
but last case scenario, you can make a proxy between railway and sanity.io

glossy ferry
#

Do does one setup a proxy? and do i have to use railway project to do so or on my local machine?

#

What do you think if I just do https://tenkaklet.com/webhook and put that into the railway webhook input and then add that to the sanity.io webhook. that sound maybe like a plan? @queen fractal

queen fractal
#

like a proxy? I mean assuming it's set up correctly - maybe, idk
I've never used sanity.io before so I have no idea what specifically is needed for it to work accurately

someone who knows more than I do on this topic will probably be able to help you

glossy ferry
#

sure I understand. Sanit.io just needs an endpoint to communicate with thats it 🙂

#

I'll try it

#

No that didn't work

#

Is there anyone you could get on this @queen fractal ?

queen fractal
#

vin or brody probably could, but don't ping them - pinging conductors is against the rules of this server

glossy ferry
#

ok, I understand thanks

#

i'll try on my own¨

magic nacelle
#

so you want railway to call a webhook url when what happens?

#

you have to explain this so that someone who knows nothing about sanity but does know about railway can still help you

glossy ferry
#

if you go to https://tenkaklet.com/studio you'll see that I can make changes in the backend (though I know you need a password, nvm that part just meaning its a cms ) and then when a change is made in /studio the changes would reflect on tenkaklet.com. Is that ok info? 🙂

magic nacelle
#

nope lol

glossy ferry
#

is there a way to auto generate a webhook url from railway?

#

ah damn 😛

magic nacelle
#

what do you want this webhook from railray to do

glossy ferry
#

just need a custom webhook to make the changes. that's it 😛

magic nacelle
#

what changes

glossy ferry
#

in sanity.io a cms, It needs an endpoint to be able to send the changes to

#

so if railway can it make a custom or auto generated webhook?

#

that is connected to my project on railway

magic nacelle
#

why wasnt it good enough

glossy ferry
#

cause next.js sees it as a page and gives a 404 😦

#

click it and you'll see :p

magic nacelle
#

then you need to implement an api route to do what you want

glossy ferry
#

Ok then I'll do that. Just thought that railway does a auto generate webhook url?

#

does the CLI do that maybe?

magic nacelle
#

i still dont know how a railway webhook would help you here

glossy ferry
magic nacelle
#

this is something that happens inside your app, thus you need to be doing the webhook, not railway

glossy ferry
#

ok aight I'll do that then I guess. thanks man

magic nacelle
#

railway has no control over the code once its running

glossy ferry
#

ok ok