Hello everyone and thank you in advance for your help, I have browsed the forum but I cannot find an answer to my problem.
I want to integrate an API into my app.
The goal is to create a new user in my app when a user is created in another app (example name: FLOWER)
With API Connector, I connected an API that allows me to list the user emails of the FLOWER app in my console. It works well.
Here is the workflow & script used:
Step 1: Call API FLOWER Get User
Step 2: Run JavaScript
let resultapi = Step 1 (FLOWER Get User)’raw body text;
let JSONlength = Object.keys(resultapi).length;
for (let i = 0; i < JSONlength; i++){
if (resultapi[i].adresse !== null && resultapi[i].adresse !== undefined) {
console.log(resultapi[i].adresse.email);
} else {
console.log('No address for the user at index', i);
}
}
When I run the workflow, all the email addresses of the FLOWER app users appear in my console.
Now I would like to compare this email list with the list of emails in my “User” table to identify the missing users in my Bubble app.
I have tested several scripts but it seems that
let myusers = Do a search for Users
blocks my entire comparison script.
How do I get the data from my table in JS format?
I anticipate another problem with a question:
Am I going about it the right way or am I going to find myself blocked to create new users in my app afterwards?
I am listening if you have already had this type of need with an API connection that you have managed to develop.
Thanks a lot !