Skip to main content
##Explanation: Trigger and Function: The SQL code creates a trigger that calls the notify_generate_pdf_change function whenever the generate_pdf column is updated. If the new value is true, it sends a notification on the generate_pdf_channel with the proposal ID. Edge Function: The edge function listens for notifications on the generate_pdf_channel. When it receives a notification, it logs the proposal ID and can send data to Gumloop (you’ll need to implement the actual integration logic). [https://pkjljvknmdozvzwnwprq.supabase.co/functions/v1/watch-generate-pdf] supabase functions download watch-generate-pdf
Edge Function for generate_pdf boolean