/ rails

Send notification to flowdock-group from rails application

If you want to send any notification message from your rails application, its easy to send it with following steps:

  1. To send notification to your flowdock group, you will need email-address of flowdock grouYou can get it from flow-settings of your group.

example: "xxxx@xxxx.flowdock.com"

  1. In your application, define mailer class and send email-message to above email.
class UserMailer < ActionMailer::Base
  default from: "xxxx@example.com"

  def flowdock_notification(post)
    flow_email = "xxxx@xxxx.flowdock.com"
    body = post.user.name + " posted a new article: \n#{post.subject}"
    mail(to: flow_email, subject: "New Post") do |format|
      format.text { render text: body }
    end
  end
end

Thanks.

Swati Jadhav

I am a Rubyist, ROR developer, passionate about change and trying new things, both professionally and in general with life. Currently, working on Ember.js applications and fasci...

Read More