-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation #67
Comments
hi @yhrchan, you can add your webhook URL under the "Settings" tab in your form's admin dashboard. webhooks are only enabled for Storage mode forms, not for email mode. |
@mantariksh I see the source code has this field, is there anything special that needs to be configured in order for the webhook url field to show up or to enable this feature?
|
hi @yhrchan, yes, you need an environment variable called a quick shortcut would be to:
please let me know if you face any other issues, or have any suggestions. I'd be happy to help iron out any difficulties in the process. I already opened #68 which will remove the need for these extra steps in future. |
@yhrchan out of curiosity, can I also check what you're using webhooks for? |
@mantariksh ah thanks! the webhook url field showed up now so i'll try creating the webhook as a next step. BTW, I am not fluent in Angular so sometimes hard for me to follow the source code. I am only fluent in React but I see in your roadmap that your team is planning to migrate to React, right? Yes I am building a CRM-like system and see the possibility to integrate FormSG as an intake component and within the CRM different workflows could be configured for downstream functionalities. Just curious, would there be a possibility to meet online to have some overview of FormSG from your perspective? I am sure I have some questions to ask in terms of future Roadmap and architecture. Thanks for your help! =) |
@mantariksh I've tried putting in an address in the webhook url field such as http://localhost:3003 but the field validation won't let me. Is there any way to test the webhook where the webhook resides locally without HTTPS? |
@mantariksh so I was able to use ngrok to expose my local server publicly via a HTTPS address and seems like FormSG could establish connection to my local webhook. However, some config might not be right as I am getting a 401 Unauthorized response. webhook source code Webhook Endpoint URL Also in the webhook code, i've entered in the form secret key in the following line: HTTP RequestsPOST /submissions 401 Unauthorized |
Ok got it to work! Have to use set mode = test so that it uses the same public key in the webhook code const formsg = require('@opengovsg/formsg-sdk')({ |
hey @yhrchan, sorry for the late response, we've been caught up with reviews on the main FormSG repo. yes, we are planning to start the migration to React in the next couple of weeks actually. you can see the issues we've scoped out here. sure, happy to meet online! I'm curious about your use case as well. feel free to drop me an email at [email protected] and we can set it up. |
@yhrchan we also introduced retries for webhooks in the main repo, if that's useful for you |
Is there documentation on how to connect Form SG to external applications using this SDK via webhooks? Where in Form SG to configure for the submissions to point to the external application using this Form SG JavaScript SDK?
The text was updated successfully, but these errors were encountered: