Custom Action - endpoint not receiving request - mIddleware question

I am working through my first integration feature and trying to test a custom action. However, I am not seeing anything in the access log on my endpoint.

Feature Setup:

Recipe:

Custom Action:


Postman Post Response:

Endpoint Access Log:

However, when I add the integration to a board to test it, I do not see anything in the endpoints access log.

Searching the forum lead me to this discussion where @basdebruin indicates that middleware might be part of the solution.

Custom action - endpoint not working - monday Apps & Developers - monday Community Forum

It looks like the middleware example is decrypting a short-lived token to use with the API. My app will not need to interact with the API at this point and I already have a CORS middleware running on my endpoint. Is there something else that the middleware is doing that I am missing? My backend is running FASTAPI so it would take a bit to figure out the short-lived token middleware.

hi @drescheg

Can you share the setup of your route? router.post. Do you have access to a log from your webserver where it shows the endpoint ia actually called by monday?

@basdebruin my backend is running FastAPI rather than node.js but here are the relevant code snippets of that.

https redirect and CORS MIddleware:
image

InspectionRequest pydantic class:
image

Endpoint Post Router:
image

And my access log does not show anything being called from monday just my postman attempts.

A postman options request also returns ok so CORS is working.

I am not even sure the backend that sends the payloads for integrations makes CORS requests to be honest. Its not a browser, no cookies, nothing like that.

have you tried using something like webhook.site just to see if its actually sending?

I assume you are actually changing a status to something like the recipe on a board? Stupid to ask but I am not going to assume anything after the week I’ve had with myself.

@codyfrisch thanks for the suggestion to try webhook.site. I did not know that service existed. When I changed the base url to point to webhook.site, and the custom action endpoint to ‘/’, webhook.site showed the request.

So, it seems it might be something blocking the request at the network level, but a request from codepunker.com also shows in my access log…

Make Simple HTTP POST And GET Requests Online (codepunker.com)

By chance is your server using a self-signed certificate? Its possible monday is rejecting the cert if its not signed by a public CA. Thats where things like ngrok come in, since they are signed by a trusted CA.

@codyfrisch It uses a Let’s Encrypt certificate. I have other endpoints that item/board view apps are using fine but those are client side I guess.

Very strange.

On the off chance, try setting the CORS allowed methods to only POST. I’m just grasping at straws, pulling from my own config. Assuming that wont interfere with your other endpoints.

Setting the CORS allowed methods to only POST had no effect.

However, I deleted the feature and recreated it from scratch and now it is working.

That is extremely weird that you needed to delete the feature. Definitely not normal!

Hello there @drescheg,

If you are still having an issue, please send us an email to appsupport@monday.com and we will take a look :grin:

Cheers,
Matias

1 Like

Thanks @Matias.Monday. I think I have narrowed it down. It seems that modifying a custom action does not always (ever?) propagate to the recipe if it has already been built and that I have to replace the custom action with itself whenever I make a change.

2 Likes

This is what it is. Though if the Base URL changes that does apply to everything without replacing the action with itself.