# Real-time changes from Xano

**URL:** <https://community.weweb.io/t/real-time-changes-from-xano/628>\
**Category:** Ask us anything\
**Tags:** xano\
**Created:** [June 3, 2022, 7:59am UTC](https://community.weweb.io/t/real-time-changes-from-xano/628 "2022-06-03T07:59:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicolatoledo.dev](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/nicolatoledo.dev/32/10522_2.png) [@nicolatoledo.dev](https://community.weweb.io/u/nicolatoledo.dev)\
**Post date:** [June 3, 2022, 7:59am UTC](https://community.weweb.io/t/real-time-changes-from-xano/628/1 "2022-06-03T07:59:16Z")

</div>

HI, is it possible to receive data in real time from xano, like a chat app?

now I fetch the collection again at the end of the workflow

or i need to create a plugin and install some lib for real-time data?

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [June 9, 2022, 8:00am UTC](https://community.weweb.io/t/real-time-changes-from-xano/628/2 "2022-06-09T08:00:57Z")

</div>

Hi @nicolatoledo.dev !

Receive realtime data in a web application require websocket (web protocol for setting up a bidirectionnel canal between a client and a server so the server can inform the client when a new message is posted in the chat for example)  
We do not support websocket on weweb for now, you will need to implement your own plugin with websocket capability.

I see Xano has a plugin to enable an external chat service : [Xano - Ably Realtime Chat Extension - YouTube](https://www.youtube.com/watch?v=lEW1pLO1yTk)  
But it looks like its only to do a public chat, and I see no mention of websocket 🤔

Another solution to exploit this Xano plugin would be to perform a request to the xano database every x seconds to refresh the messages list. But I think we miss an action to setup this type of workflow but you can probably do it with javascript.

Do not hesitate if you have any other questions!

---

<div class="post-metadata">

**Author:** ![Dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Dom](https://community.weweb.io/u/Dom)\
**Post date:** [December 28, 2022, 11:11am UTC](https://community.weweb.io/t/real-time-changes-from-xano/628/3 "2022-12-28T11:11:16Z")

</div>

Hi, is it possible to get an example of how to setup the collection refresh every x seconds, with step by step instructions of what Javascript to use and where to put it. Thanks.

---

<div class="post-metadata">

**Author:** ![patopt](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@patopt](https://community.weweb.io/u/patopt)\
**Post date:** [December 31, 2022, 2:01am UTC](https://community.weweb.io/t/real-time-changes-from-xano/628/4 "2022-12-31T02:01:10Z")

</div>

I think you can just do this with a Workflow and a basic loop, basic example here.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/3/33d348c38d63ae1b4b488c3d64cc6fa0f66a9233.png)

---

<div class="post-metadata">

**Author:** ![Dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Dom](https://community.weweb.io/u/Dom)\
**Post date:** [January 3, 2023, 3:00am UTC](https://community.weweb.io/t/real-time-changes-from-xano/628/5 "2023-01-03T03:00:47Z")

</div>

Hi patopt - yep, I’ve tried this. The issue is it runs for all the elements in the array which is finite and therefore it will eventually stop. WeWeb doesn’t allow you for a function to to call itself (recursion). So the issue is, how do you get it to keep running once it’s iterated through the array?

---

<div class="post-metadata">

**Author:** ![gbeaudoin](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/gbeaudoin/32/3221_2.png) [@gbeaudoin](https://community.weweb.io/u/gbeaudoin)\
**Post date:** [January 3, 2023, 7:36pm UTC](https://community.weweb.io/t/real-time-changes-from-xano/628/6 "2023-01-03T19:36:38Z")

</div>

Haven’t tried, but maybe you could create 2 workflows (A & B) where A calls B and B calls A?

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [January 3, 2023, 8:26pm UTC](https://community.weweb.io/t/real-time-changes-from-xano/628/7 "2023-01-03T20:26:04Z")

</div>

Aurelie gives a general example [here](https://community.weweb.io/t/loop-until-condition-is-met/1564/5) that uses the a new function that lets you execute workflows from javascript actions.  
You need to use `wwLib.executeWorkflow` instead of simply `executeWorkflow`.

---

<div class="post-metadata">

**Author:** ![Dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Dom](https://community.weweb.io/u/Dom)\
**Post date:** [January 3, 2023, 10:50pm UTC](https://community.weweb.io/t/real-time-changes-from-xano/628/8 "2023-01-03T22:50:50Z")

</div>

I tried this - you can sort of get it to work with 3 workflows A calls B, B calls C, and finally C calls B and so on. It doesn’t work with just two - you get the same recursion detection error. However, this isn’t really a solution as a its really messy and clearly WeWeb don’t want this to be done.

---

<div class="post-metadata">

**Author:** ![Dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Dom](https://community.weweb.io/u/Dom)\
**Post date:** [January 3, 2023, 10:56pm UTC](https://community.weweb.io/t/real-time-changes-from-xano/628/9 "2023-01-03T22:56:01Z")

</div>

@dorilama thanks Mariano, I’ll give it a go.
