I’m going round in circles trying to solve this issue.
My app is a job board with 2 main types “jobs” and “users”. Jobs have a field called “Company ID” which contains the user’s “Unique ID”. This allows me to create a control panel for each user so that they can see only their jobs where “Company ID” of jobs = current user’s “Unique ID”.
I have also created an Admin dashboard that only I can see where I have included a button which runs a search for expired jobs and changes their “Status”(text field) from Live to Expired. My issue is that I then want to send the users who posted these jobs an email to let them know that their job has expired. So far, I can’t get this to work.
I’ve tried doing this at the page level but have been advised that this will only send an email to 1 user, whereas I need to be able to send to multiple users at once. So then I’ve tried doing it via an API workflow but have been unsure how to pass the job/user data to the API workflow in order for the workflow to know which user to send the email to?
Hope that makes sense. If anybody has any experience of this or has any pointers, I would really appreciate it.
If you’re using SendGrid, the Send emails with SendGrid plugin supports multi-recipient dispatching. You can also CC and BCC multiple parties per email as well.
In addition to the other video already posted here, this one uses email as the example so it might help put things into context: https://www.youtube.com/watch?v=gsflyQxAXlk
Essentially, you’ll want to schedule an API workflow on a list of jobs, where the list is the expired jobs. The API endpoint should have a parameter for Job, so that in the Schedule action, you pass “This job” as the parameter value.
Now, the API Endpoint can Send Email. Recipient = Search for Users :first item’s email. Constraint on search is unique ID = Job (parameter)'s Company ID
You can also reference “Job” in the body of the email.
Another approach would be to do the user search within the Schedule action. So, you’d need another parameter for User. And you’d pass the Search for User from the Schedule action so that in the Email action within the API Endpoint, recipient would simply be “User’s email”
Having said ALL that, I think you’ll find it a lot easier if your “Company ID” field is not a text type, but instead, a User type. So that a Job’s Company = a User. That way you don’t have to do the lookup every time. For example, the email recipient could then go through the Job to find the user (Job’s Company’s Email) rather than having to search the database (Search for Users [constraint] :first item’s email).
Hope that makes sense!
Gaby at Coaching No Code Apps (formerly Coaching Bubble)
Courses & Products, Tutorials, Private Coaching, and High-level Development
Start Learning Today
Thanks so much for all the advice!
@romanmg I’ve gone with your first suggestion and have included some screenshots below of what I think you’re saying. I’ve not got this working yet though so I’m missing something.
I had initially set the app up with the “Company ID” field as type user as suggested. But I ran into problems when importing jobs via csv as I couldn’t set the user via a CSV upload(I don’t think Bubble allows this by what I was told after a lot of research??). So the “Company ID” thing was really just a workaround.
This topic was automatically closed after 70 days. New replies are no longer allowed.