This may be a terribly uninformed question, but I see that there is functionality in Integromat to connect Knack to a SOAP service - is there a way to do this directly in Knack instead? I ask because I'd like to have the user press a button to send the data from Knack as opposed to Integromat grabbing every new record. I know there is not a native way within Knack, but perhaps some way of adding code? Thoughts?
After much trial and error I did get this working. Thanks for the assistance.
Thanks Taylor, will take a look at this - never used Integromat so I'm working through their processes, I've only connected apps to Zapier so it's a new experience. Thanks!
Hey Chris,
Rather than using Integromat's "Knack triggers", you can create an Integromat Webhook to expose a url. After the Webhook, you could add the remaining integromat functionality, like you would normally.
In this case, add your SOAP touchpoints. This will still facilitate the data transfer from Knack to your SOAP touchpoint (using integromat), without having to build your own external integration with the Authentication required.
Then, on the Knack side in the Javascript, we'll do a couple of things:
- Create our jQuery document event listener on "scene-render", "view-render", or "form-submit"
- Within the event handler, we'll add an event listener to your button
- Then within the event-listener callback, we'll create an ajax call to send our data to the integromat webhook
Example using "view-render" event:
$(document).on('knack-view-render.__insert-view-key__', function(event, view, record) {
$('#__insert-button-id__').click(function(event){
$.ajax({
url: '__insert-url-from-webhook__',
type: 'POST',
data: '__insert-data-to-send__'
})
})
})
Example using "form-submit" event:
$(document).on('knack-form-submit.__insert-view-key__', function(event, view, records) {
$.ajax({
url: '__insert-url-from-webhook__',
type: 'POST',
data: '__insert-data-to-send__'
})
})
Feel free to reach out if you need further assistance.