SebastianB
SebastianBβ€’9mo ago

Actions not triggered

Are actions currently working on the hosted Zitadel Version? I tested with a simple webhook by using the official example here: https://github.com/zitadel/actions/blob/main/examples/make_api_call.js I added as API_URL a webhook service, tested the service with curl and then added the trigger for the action through Zitadel Console. I used three combinations: - External Authentication & Post Authentication - Internal Authentication & Post Authentication - Complement Token & Pre access token creation And then I logged in again, but the webhook is not triggered.
GitHub
actions/examples/make_api_call.js at main Β· zitadel/actions
ZITADEL Actions - Easy extensibility with custom code. Think GitHub Actions in an Identity System. - zitadel/actions
9 Replies
Raccine
Raccineβ€’9mo ago
@SebastianB - Hi there! Actions are currently working on the hosted Zitadel version ☺️ This doc might give you some more insight into how to approach creating actions: https://zitadel.com/docs/guides/manage/customize/behavior
ZITADEL Docs
In this guide, you will create a ZITADEL action.
SebastianB
SebastianBOPβ€’9mo ago
Thanks @Raccine , I already checked that one out. Still it does not work for me even with the simplest fetch example. How can I check what went wrong?
Raccine
Raccineβ€’9mo ago
Can you do the following: - Provide us with a screenshot of the enabled action that you'd like to run - Check that the action name & the function of the action are the same - Provide us with information on the scopes you've used as well
SebastianB
SebastianBOPβ€’8mo ago
As stated above it's the make_api_call.js example and yes I matched the naming. So, hwo can I check what went wrong? @Raccine any news on how we can check the execution of the actions? @Raccine is there anything we can do to check the execution of actions? Is there a counter somewhere? Are there logs? Anything?
Rajat Singh
Rajat Singhβ€’8mo ago
Hi Sebastian, I'll look into it and get back to you hi @SebastianB what was your API_URL that you were setting as?
SebastianB
SebastianBOPβ€’8mo ago
hi @Rajat, I used a webhooks service URL so that I can track all fetches in real-time easily. Also, I tested the URL manually with cURL.
SebastianB
SebastianBOPβ€’8mo ago
Webhook.site - Test, transform and automate Web requests and emails
Instantly generate a free, unique URL and email address to test, inspect, and automate (with a visual workflow editor and scripts) incoming HTTP requests and emails
Rajat Singh
Rajat Singhβ€’8mo ago
thanks, let me check this and will get back to you πŸ™‚
Rajat Singh
Rajat Singhβ€’8mo ago
Hi @SebastianB aplogies for the delay but I tested the webhook service URL and it seems to be working fine for me and it seems to be working for me,I infact triggered two seprate actions just to verify and it seems to be working fine. Here's the script that I copy pasted from the example and modified it and named it make_api_call (my js is not the best but you'd get the idea)
let http = require('zitadel/http')
let logger = require("zitadel/log")

function make_api_call(ctx, api) {
var user = http.fetch('https://webhook.site/f6f6004b-1850-40e5-bdbf-80c94a42d35a', {
method: 'GET'
}).json();
logger.log(user.id);
}
let http = require('zitadel/http')
let logger = require("zitadel/log")

function make_api_call(ctx, api) {
var user = http.fetch('https://webhook.site/f6f6004b-1850-40e5-bdbf-80c94a42d35a', {
method: 'GET'
}).json();
logger.log(user.id);
}
May I see how are you setting the flow?, lmk if this helps πŸ™‚
No description
No description

Did you find this page helpful?