I'm using a query block in a workflow like this:
This seems to work for the next hours after I connect with OAuth in the resource. But after a while it gives me the following error and I'm forced to disconnect and reconnect again to refresh the access token:
I created a workflow in Teams that will expose a webhook and post a message in chat with the info received. This works in Postman. However when I try to run it in Retool I get a timeout error. The request is exactly the same.
Hi @Juan_Guerrero Thanks for writing in and including screenshots - super helpful!
I believe the reason for the original error related to the tokens expiring after a few hours is that it appears from your very first screenshot that you removed the offline_access scope which is prepopulated when you create a Microsoft Teams resource. Microsoft describes this scope as
The offline_access scope gives your app access to resources on behalf of the user for an extended time. On the consent page, this scope appears as the Maintain access to data you have given it access to permission.
Accordingly, it seems that since you removed the offline_access scope, we received only a short-lived access token and no refresh tokens, explaining why you were only able to use the connection for a few hours.
I recommend creating a new Microsoft Teams resource and including the offline_access scope.
I saw your follow up about a Teams webhook working from Postman but not Retool too. I'd suggest trying to get the built-in Microsoft Teams Resource working first.