Forum Discussion

tdhoffman's avatar
tdhoffman
Registered
14 hours ago

Email each user their record

Hello! I'm new to Quickbase and have been using the API to speed up operations at my company. We have a report that is generated weekly whose records need to be sent to each user. Typically, this is done by manually clicking into each record, clicking the "Email" button, and sending the record to the related email address.

Is there a way to do this process in bulk? Ideally, I would like to do one of two things:

  1. Create a button in Quickbase that sends all users their records at once. I've found this guide and this guide, but neither seems to be the functionality I'm looking for. I'd like something that does exactly the same thing as the "Email" button described above, but for all users in the report.
  2. Use the API to send all these emails. I don't think the API offers email functionality, but I could take all the emails from the report and use Python to email the records. This would also require some way to carry over the formatting from a Quickbase email, which we rely on for readability.

Does anyone have experience with this or other solutions for sending many emails with user-specific data? Thanks!

4 Replies

  • When you  build a native Quickbase email notification, or a custom email, you do have the option to send to a non-user.

    when you set up a notification, the very first radio button lets you choose between a recipient type, which means they must be a user, or else Open, which means any email address.  There is similar functionality on the newer build your own custom emails. 

    The user will still receive a copy of the form even though they do not have access to the app. So that is the easiest way to maintain the formatting form, simply email the form in the notification. For example, in the legacy style notifications, there is an option to email a copy of the form, you just look at the markers at the bottom of the drop-down list and there is a marker for emailing a copy of the form.

    If this is the first time you have attempted to send notifications to non-users outside of your organization and you don't see an option to send an email to an email type field, then you may have to contact Support and have them enable your realm to be able to send emails outside of your company.  

  • Thanks for the detailed reply! I should clarify -- each record has an associated email address, which is where the record should be emailed. These are not users and do not have access to the database. I shouldn't have used the term "user" in my original post.

    With that in mind, it sounds like a pipeline would still solve the issue. I haven't used pipelines before, but I think the solution would look something like this:

    1. Search the table for the week's records, retrieving relevant fields (including email address).
    2. Loop for each record in the filtered search.
    3. Send email to the email field retrieved in the loop.
    4. Schedule a triggering event to send the emails weekly.

    Currently, we use formatting from the table to readably display the record in the emails. How can I preserve this formatting in a pipeline, i.e., how do I send the entire record to the email address?

    Again, thank you both for pointing me to pipelines -- I'll be using these religiously going forward!

  • Here are some thoughts. F for example your use cases that you're emailing each employee a list of their weekly tasks then you can probably do this without any kind of automated pipeline. So if the relationship is one employee has many tasks on the task can have a look up field for the user ID of the assigned employee, then you can simply make a report of My Tasks  filtered by where the assigned employee is the current user and then you can set up a subscription report to go to all employees once a week. You will find that each employee only gets a report of their own tasks. 

    If you really do want to  email each employee their own record each week than the next easiest thing to do is to set a date time field called Perhaps email notification trigger   and then set up a notification or a build you own custom email that triggers when that date time field is updated.

    Then you would set up a pipeline, and the first step of the pipeline would be to search the employee table for a list of qualifying employees. For example, maybe there's a flag on the employee record as to whether they are active or there may be some other conditions.

    Then the pipeline will suggest a for each loop next and inside that loop you will want to set the date time trigger field for the email to be the current date and time.

    One way to do that is to use the simple Jinja syntax of {{time.now}}

    If you want to stay away from Jinja, because the brace brackets are a little scary looking then you can create a native field record called the current date time with a formula of  now() and then use that field in the pipeline to populate that date time trigger field for the email notification.

    Once you have the pipeline set up, then you can click near the top right to schedule it to run once a week at a certain time. When we do that, the time is loaded in what's called UTC format, which is the time in London, England, so you will have to do the mental math on what time it is in your time zone. For example, if you were in the eastern time zone, then you would probably want to trigger email about 12 PM UTC so that arrives at 7 AM Eastern 

    Feel free to post back if you have any questions

     

     

  • Have you tried looking into Pipelines? There is an email functionality to set up different kind of triggers for e-mails.

    We use it in our company to notify our technicians when they are added to a job/removed/date changed etc. 

    You can set it up to trigger every, say, Friday, and match the records to the user. Assuming each record has a user field attached to it.