How to Get a Sample Payload from a Trigger Using the API?

This topic was automatically generated from Slack. You can find the original thread here.

Hi - Is there a way to get a sample payload from a trigger when using the API?

Not unless you send the sample event yourself.

Or trigger the trigger from the app.

The structure of payloads can change over time (as the API evolves), so providing a sample is a tricky thing.

It’s difficult to maintain and could confuse users.

Are you deploying the trigger from the API? Or you just want the sample event from the API? (or both I suppose)

I’m using the API. I am just looking for a sample at the time I’m building it. For example triggering from a new email in gmail.

Yea we don’t have schemas ahead of actually receiving a real event post-deploy right now, but it’s something we’re thinking about.

What’s your use case?

What are you building?

I don’t need the schema, just a way to generate a test event. I’m building an AI agent builder

It’s just so you can test your agent while you’re building it instead of waiting for the trigger to fire

Got it. A lot of triggers have a mechanism to emit events immediately upon deploy, for that exact reason. So they won’t fire without deploying but we do that to avoid requiring the end user to go generate events in the relevant app.

https://pipedream.com/docs/connect/components/#handling-test-events

Ah got it. Thanks, Danny

Do you think that works for you / satisfies your use case?

The only concern I have with it is that I need to deploy the trigger to get the example payload. I haven’t looked closely but I’m not sure if it can be deployed in a disabled state?

You can’t, no. Right now you would have to deploy the trigger in order to get a test event, but I think the general ask makes sense.