I wanted to experiment a bit with supabase a serverless api backed by Postgres. Supabase has more features that are not used here, like Auth, Edge functions and Postgres extensions. To use supabase I chose to use it to save webhooks with text generated by the AX Platform.
The flask code checks if the signature in the header is valid and matches the body of the webhook (not shown here). After this check the dataset is saved in the table "generated" with this code:
To use supabase the URL and the secret-key are needed. Both are given in the api settings in your supabase project. Supabase-py simplifies the handling of a datastore extremely but keeps the possibility to use the PostgreSQL features in the future.
The saved datasets can later be used by another service to show and use the text somewhere.