https://linen.dev logo
Composio triggers filtering of data
# 🖥│support-forum
j
hi we have been integrating triggers and there is alot of data that we get for each event which we do not want to show to the user, is there a way we can dynamically do this?
@Uday @Abhishek
u
Hey @jareer123. , Could you elaborate on the additional payload that you don’t want the user to see? Currently our payload contains:
data
,
log_id
,
timestamp
,
type
.
j
{ "ts": "1764944078.885799", "text": "fix duplicate issues in composio triggers\nadd slug in trigger events\nadd verification token for slack when creating slack oauth\n\nover the weekend @User", "user": "U09G9DZLSHK", "bot_id": null, "channel": "C09HFPQ2PCM", "team_id": null, "user_id": "LHdLI0UqgwHP0hnzRkvllBKcaR96BnRr", "trigger_id": "9d2a459e-6fb6-4614-bc6b-ffd30500a521", "attachments": null, "channel_type": "channel", "connection_id": "05f53cbe-7b50-48d0-8fa0-c2ade7f087fa", "trigger_nano_id": "ti_5kpH_Rbp1TGs", "connection_nano_id": "ca_ZYOJWeVsWQbb" } for eg I am getting these in the data using slack_receive_thread_reply, is there a way we can make it even concise, so we can show user only output that matters
u
Yes, you can extract what you want to be used in a payload. Example:
Copy code
event_data = payload.get("data", {})
channel = event_data.get("channel")
j
is there a way we can do it efficiently, or we have to do for each trigger?
u
Each trigger has a different payload output schema, you have to configure your expected payload for each trigger accordingly.
2 Views