Testing / Mock App Life Cycle Events

As far as I have read in the documentation for the Apps Framework I cannot find an easy way to test the App Lifecycle Events listed here.

I am aware of the mock subscription API call you can make in an account to set up a mock subscription but how would I test these webhooks? I have set up the URL in my app configuration and setup an endpoint in my app to receive the webhooks. However when creating a mock subscription it doesn’t send anything to my endpoint. I have tested the endpoint otherwise and it is receiving other requests ok.

Maybe there just isn’t a way to actual test these requests coming from monday without actually installing the app in another account? Is that the only solution?

Any help is appreciated here!

Hello there @christian.lee,

It is not possible to test all of the webhooks without having an app in the marketplace.

But you can use some such as the install or uninstall webhooks (even installing/uninstalling in your own account).

You can also check the format of the different payloads here :grin:

Let me know if you have any other questions!

Cheers,
Matias

So there isn’t a way to test the app event webhooks prior to launching an app? That’s a bit unfortunate.

I’ve prepped my app for the events, but there’s no way for me to know exactly how to access the object if I can’t test. Is there a way to test any of them at all? Just being able to test one of them would work.

Ideally though, the app framework in the future would support some way to test these with mock calls via the playground similar to the setting up of the subscription to ensure apps are bug free when launching to the marketplace :slight_smile:

EDIT:
I see the documentation of the format of the payloads, however how do I confirm where in the request that payload is? For example is it nested inside of another object? Is it inside of the req body as a payload? Is it just the body? This is the piece I’m missing.

Hello again @christian.lee,

You can test the “install” webhook if you want. The response will have the same indentation as that payload :grin:

1 Like

Matias,

In the past I wrote a test utility to generate events, but the problem is there is no good flowchart of the conditions in which each is generated, nor when values are “null” or not. (specifically around some of metadata outside the plan like the account_tier (free/trial is null for example))

I’d love if monday would take it on to even release something we can call locally with command line for different events and payload values. I can help contribute.

Or are other dev are open to starting our own open source repository to contribute without monday’s involvement until they get on board?

Hello there @codyfrisch,

I will pass your feedback for the team in charge of the documentation to see if we can add some more examples and scenarios.

Regarding your request, would you be able to please add it here?

Cheers,
Matias

@Matias.Monday
Further to my original point regarding these events.
For an event like this where clearly the user wouldn’t have a valid subscription any longer: app_subscription_renewal_failed
Would it be my apps responsibility to reject any requests that come in? Or, would monday stop sending requests in to my app’s url?
Context: I’m building an app with custom actions. So, would monday still send requests to my actions even if they don’t have a valid subscription? Or would I need to block the request and return an error message back to the user in this case?

If you don’t have a free plan, once a subscription expires (which there is a 45 day grace period for payment issues, just to be aware that you’ll get events on the plan for up to 45 days after the renewal date has passed if there is a payment failure) monday stops sending events. Or it downgrades them to the free plan.