Button to send subscription

  • 1
  • 2
  • Question
  • Updated 9 months ago
  • Answered
Since Quick Base natively doesn't  allow to send subscriptions at a specified time period, I tried create a URL button that sends out notification only when it is clicked on. The code for the button is URLRoot() & "db/bnhq7nc5j" & "?a=SendSubscription&ID=XX"

However, I noticed that this works only when the subscription is activated. Well, if I keep the subscription active it will automatically trigger at a particular timeframe and I do not want that to happen. 

Are there any alternative solutions to this? I want to trigger a notification (which is basically a report) to multiple users at a particular time only. I do not mind doing this using the native functionality available or some coding logic. And also i do not want to plug this button at a record level, I want to create this button on the homepage

Feel free to propose any suggestions. Thanks ,
Photo of Angel

Angel

  • 784 Points 500 badge 2x thumb

Posted 10 months ago

  • 1
  • 2
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,806 Points 50k badge 2x thumb
Put a filter on the report where today is not Sunday. 

dayofweek(today())<>6

Then set up the subscription to be active and run every Sunday. it will be blank and hence will not be sent.
Photo of Angel

Angel

  • 784 Points 500 badge 2x thumb
the other issue I am facing with this is - firstly only the owner of the subscription can send those out. In addition only admins can be owners. Any suggestions?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,806 Points 50k badge 2x thumb
Can you tell me why you feel those statements are true?
Photo of Angel

Angel

  • 784 Points 500 badge 2x thumb
didnt think it would be so simple. Thanks.

To that point, do you know if there is a way we could have multiple recipients in the To and have CC as well instead of sending out individual emails?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,806 Points 50k badge 2x thumb
Each recipient will receive the subscription report email as a TO. There is not a way to indicate who else received the email.
Photo of Leanne

Leanne

  • 354 Points 250 badge 2x thumb
Do you happen to know know the best way to add in authentication to this call? When an Admin presses the button, it goes off, but when a user with limited permissions hits it it says " you can only send your own subscription" and does not fire. I've added in the app token, but I'm thinking it needs an additional API authentication - any suggestions? Thanks!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,806 Points 50k badge 2x thumb
Perhaps try adding in a user token?
Photo of Leanne

Leanne

  • 354 Points 250 badge 2x thumb
Sadly, no. Does this call (SendSubscription) work in Webhooks? I have a timestamp action I can use to trigger the webhook if so....
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,806 Points 50k badge 2x thumb
I do not see an API for SendSubscription, so I doubt that will work, but I did not test it.
Photo of Leanne

Leanne

  • 354 Points 250 badge 2x thumb
Guys, this all works so perfectly! Thank you both!