I am uploading data types (articles) from my Wordpress blog with automations with make.com.
But I have several users which also upload the same data type on my bubble app from their accounts. Since I want to filter by user, which includes the articles uploaded by API, I’d like to know how.
I added a field to my uploads (yes/no), but I have several RG elements, like the one below, where I can’t see a solution with a boolean.
Hi @floripaolo Please clarify what you are having trouble with.
Do you want to know how to include api uploaded article in the filter by user?
Do you want to show yourself as the creator of API uploaded article, I am assuming for your image example, result does not include you?
The image is only an example.
Whenever I’m uploading anything (in this case an article) it will upload as (App Admin). But I have many users which also upload articles.
How do I find my article when filtering?
Or how do I create a database for those uploaded articles? Is there a way to create a user for the App Admin so I can store data in order to create a dashboard with the admins data?
First: In Option sets, if you already have an option set with roles assigned for users (you should have this anyway to secure your app)
example:
User Roles: (Admin, Other User Type)
You can use this to mark the articles you uploaded by creating a field in the article data type as follows:
Field Name: Uploader
Field Type: Roles (Option set)
If you don’t already have roles or something similar, just add a new field to the article data type as above.
Then you will need to mark all the articles you have uploaded to your database as follows:
uploader= Admin
I am assuming you already have a lot of articles so you will need to run an api flow to change this field for all articles by batch. (Search how to make batch changes to database in bubble if you’re not sure how to do this).
Once you have assigned the uploader field, you can then use RG data source as
RG all list of articles filtered:
list filter
uploader=admin
This should pull up only articles you uploaded. It worked for me. See screenshot
But.
There is a dashboard (I started from a template) where each user can check his articles, likes, stats etc. How can I as the admin login into that dashboard?
this is one of the RG in the dashboard as an example.
Yes this is true. Thanks for simplifying. The OS is definitely not a must was just saying since its already on my app so I used it instead of text. I figure option sets are easier to select on front end workflows and conditions. At least for me.
Create a new entry for user in your database using your email. Then log in with that email to the dashboard. You will need to reset password on initial log in. See example. Not sure if this is what you mean.
If your articles do not show up when you log in, then you will need to use role assignment option set in my previous answer to connect the two.
Simply using a text field for article assignment may not work here since you will have to go back to your dashboard RG conditional logic and show articles based on the text field you created in the article. This should be too much work.
Other thing to do is
Create user new entry with your email
re-upload all your articles using the user you created from the frontend
This way it doesn’t assign creator as admin but as your email.
OK, but I am uploading with an automation from Wordpress with make.
I cannot login as a specific user in make. All created post show up as (App admin).