Push

This service was deprecated on 14th December 2016. You can still use it, but we strongly recommend you use the new broadcast service instead, which is simpler and more powerful.

The push service lets you send messages out to anyone who has subscribed. It provides a trigger to listen for a new update (New Push), an action to push a new update (Send a Push) and actions to subscribe or unsubscribe a user.

Introduction

Because the push service provides only the core functions, and you use other triggers/tasks along with it to create the behaviour you need, there's a lot of flexibility and possibilities.

However, there is one use case that stands out. It enables you to send an email to a unique (secret) email address, containing the content for your update. The email then triggers messages to go out to all your subscribed bot users to distribute the content to them.

To achieve this, you need a few separate flows:

  • A flow to send new content to subscribers. This starts with a trigger (New Push) which will fire every time there's a new push, for every individual subscriber. The trigger will include the content of the push, and in this case, it will cause a Bot > Send a Message action.
  • A flow to trigger a new push. In this case, the trigger will be Email > Receive an Email, with the email containing the details for the push. This will lead on to an action (Send a Push) which will cause a new push to happen. 
  • A flow for subscribing to updates. This will normally be a Bot > New Message trigger listening for a keyword such as 'updates' and lead on to a Subscribe action.

You'll see from those 3 flows you get everything you need to keep your bot users updated simply by sending an email.

You can actually swap the email trigger with any other. For example, you could send an update every time you create a new Google Calendar event. Or send an update via a webhook.

Getting Started

We'll walk through setting up the behaviour described above. You should always set up the New Push trigger first, then you can link the other actions to it.

If you don't want to follow this step by step, you can set up an almost identical set of flows almost instantly using the Push Updates template.

  1. Create a new flow (call it "New Push"), then add a trigger. Select the Push service, then choose New Push.

  2. Skip the filters step. It's important to give your trigger a descriptive name, because this is what you'll see in the select box later when you subscribe a user to it. In this case, call it something like "New update by email". Save the trigger.

  3. Now add an action. This time choose Bot > Send a Message.

  4. Each time this trigger is fired, you'll get a Response Path in the output, along with the content of the update. In the Response Path field, select the Response Path output from the trigger.

  5. For the message itself, we'll keep this simple here, and use the Content output from the trigger:

  6. Finally, save the action and switch on the flow. You now have a flow that will distribute push updates to your subscribers. Next, we need to set up a flow that will allow us to trigger an update.

  7. Create another flow (name it "Send a Push"), add an Email > Receive an Email trigger. Follow the steps and note down the email address you are assigned.

  8. Now create a Push > Send a Push action. We'll send the content for our update in the body of the email, so click the Flow XO icon inside the Content input, and select the Email body plain output from the trigger:

  9. Save the action and switch on the flow. The final step is to create a flow that allows a user to subscribe.

  10. Create another new flow (call it "Subscribe"), and add a trigger. This time, select Bot > New Message.

  11. You'll probably already know how to set up a new message trigger, but if not you can read our guide. Leave all the settings as default and just type "updates" as the word that the flow should trigger on:

  12. Next, add a Push > Subscribe action. We want to subscribe the Response Path where we receive the "updates" message, to the push we set up earlier, like so:

  13. Finally, let's send a message back to the user to give them some feedback. So add a Bot > Send a Message action:

  14. When you've saved the last action, switch on the flow.

  15. Test everything by sending the message "updates" to your bot. You should see the confirmation message. Now send an email to the address you noted down earlier, in the body of the email type the update you want to send. A few moments later, your update will show up where you subscribed to updates!

Advanced Usage

Unsubscribe

This is a basic push setup. When you use this for real, you'll want to at least give your users a chance to unsubscribe. You can either do this with a separate flow, or by having a single flow and using Ask a Question to present the user with some choices ("subscribe" or "unsubscribe").

The Unsubscribe action is similar to Subscribe, except of course it removes the subscription rather than creating it.

Offering a Choice of Updates

To offer users a choice of push updates to subscribe to, you have a couple of options:

  • Use a separate flow for each type of update.
  • Ask the user what feed they want to subscribe too and then add several Subscribe actions into your flow, filtering on the user's response.

Using Other Triggers

You aren't limited to using an email to trigger an update. Try using other triggers such as new calendar items, new Twitter messages, new spreadsheet rows, or new items in your CRM.

Simply switch the email trigger for any other, and feed the content for the update into Send a Push.

Automatically Subscribing Users

By creating a flow that is triggered on Bot > New Conversation, then subscribes the Response Path to a push, you can automatically subscribe users to updates as soon as they connect with your bot.

Be responsible with this, don't send too many updates, and always give your users a chance to unsubscribe.

Send a Card or Image

You might want to consider sending a card or an image instead of a simple text update.

FAQ's

What happens if the same user is subscribed more than once?

Nothing, a repeat request to subscribe a user after they've already subscribed doesn't fail, but doesn't change anything either.Unsubscribe works in a similar way.

Is there any limit to the number of subscribers?

There's no hard limit, this can handle hundreds of thousands of subscribers. If you are expecting a very large number, please let us know.

More Help

We're always happy to help with suggestions on how you can get the most out of this and other features in Flow XO. Find out how to get support.

Let us know how we can improve Flow XO on our feedback site.

Still need help? Contact Us Contact Us