Trigger Refresh When Integromat Completes

Using Ably you can create a 'websocket' to tell your app to do specific actions when an event outside of the your app occurs.

  • Not yet re-checked
  • Classic builder

Moved from our previous help site and not yet re-checked against the current product. Last edited Sep 20, 2024.

On this page
  1. Header Code
  2. Javascript Code
  3. Integromat HTTP Module
  4. Here’s a video of this in action:

Using Ably you can create a 'websocket' to tell your app to do specific actions when an event outside of the your app occurs.

realtime-notification

Header Code #

Text
<script src="https://cdn.ably.com/lib/ably.min-1.js"></script>
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
 
<script>
  const ably = new Ably.Realtime('PUT_YOUT_ABLY_API_KEY_HERE');
</script>

Javascript Code #

javascript
//Subscribe to a channel. "quickstart" can be anything you wish. But make note of it, you'll need it when creating the Integromat Scenario. 
const channel = ably.channels.get('quickstart');

//Here we are listening for a new message to the channel. Specifically messages with the the key of "scenario-completed" - again, this can be anything you wish but will be necessary in the Integromat phase. 
channel.subscribe('scenario-completed', (message) => {
  Swal.fire('Awesome!', 'Data has been updated! Please refresh your page. ', 'success')
});

Integromat HTTP Module #

Text
https://rest.ably.io/channels/YOUR_CHANNEL_NAME/messages

The method should be POST. Add a custom Header called “Authorization” and set the value to ‘Basic’ with the base64(YOUR_ABLY_API_KEY).

  • Body type = Raw
  • Content Type = JSON
  • Request Content =
Text
{ "name": "scenario-completed", "data": "example"}

Make sure to update the name in content to whatever you put in your JS of the page.

Screenshot for “Trigger Refresh When Integromat Completes”

Here’s a video of this in action: #

YouTube video player

Original Community Post: https://community.tadabase.io/t/use-javascript-to-trigger-a-page-or-component-refresh-when-an-integromat-scenario-is-completed/2061

Was this page helpful?

Something wrong or missing on this page? Tell us.