Adding webhooks to a form

How can I add webhooks on a form? I read somewhere that it can be done from the settings section of a form and I have checked my installation and cannot find it.

ODK Aggregate (which is no longer maintained, Central is now the ODK server) had the functionality for "publishing" data, maybe that is what you are remembering? Central has an OData feed and a robust API (API documentation here) - what is your desired use case?

1 Like

I would like to have the data submitted from a form to be stored in a separate database upon submission. For example, I have a form with three fields "Name", "Address", and "Phone". At the same time within another database (not the ODK central DB), I have a table with the same columns, so whenever the form is submitted the table is updated with the entries submitted via the form. This is what I want to achieve.

Have you looked at the OData feed? You can download submissions with Python, R, and more. Using Python, you should be able to download using pyODK and then push to your other database. You could set a script to run regularly using some sort of automation such as a cron job.

For an example, you can check out the code @mathieubossaert released to move data from Central to PostgreSQL. And he notes that "pyODK offers now the possibility to create pl/python function within your own PostgreSQL database or python autonomous routines":

1 Like

Hi @ibrahim_i3 and @danbjoseph ,

We have the same needs and I am close to talk about this pl/python successor of central2pg in the showcase, but you can already take a look at it here :

I am actually the only user of it so please report any issue on github if you use it and raise any problem or question.

3 Likes

@danbjoseph @mathieubossaert thank you very much for the recommendations. I will have a look and see what works for me.