Search code examples
webhookseventtriggerhasura

Hasura Event trigger include foreign key data sent to webhook


I have a case management system that uses Hasura and would like to add the case number to the users record in a separate crm via a Zapier webhook.

I have two tables, Cases and Users.

The cases table has a foreign key (userID) to the users table. When a new case gets added to the cases table, I would like an event trigger to send the Zapier webhook the contents of both the new cases table record as well as the related users record. Is that possible with Hasura v2.6.1?


Solution

  • Unfortunately the ability to include data from foreign key relationships as part of the event trigger is not currently supported by Hasura.

    You'd have to implement your own backend which would process the webhook first and then query extra data before sending it off to Zapier.

    I imagine that since you're using Zapier you are probably trying to avoid having a backend in this case to begin with but there's no other option right now