Friday, May 12, 2017

Introducing Timers - Automate the Web and Social Media

Bot Libre now supports timers. Timers let your bot perform automated tasks on a scheduled basis. You can use timers to have your bot followup with users on Facebook and social media on a daily or scheduled basis, create mailing lists, generate daily reports, and automate web scraping or other tasks.

To access your bot's timers go to its Timers page in its Admin Console. The timers page lets you enter a list of command messages that will be sent to your bot on a scheduled basis. You can enter the duration in hours to how frequently you want your background tasks to be run. To run more frequently than 1 per hour, you can enter -1 in the Timer Interval field.

A timer is a command message sent to your bot. Each timer message you enter will be sent to your bot each timer interval. A timer is normally implemented as a Self script.

In your timer script you need a state that has a pattern that matches your command, and a function that performs your desired function. You can browse the Bot Libre script library for timer examples and templates.

Self is Bot Libre's JavaScript dialect that is integrated with your bot's database, and has several built in classes for accessing social media, and web services. The Facebook, Twitter, Telegram, Twilio, and Email classes can be used to send messages on social media, and the Http class can be used to access web services and scrape HTML web pages.

Timers commands are always sent from the bot's #self user. This allows your script to check the input's

Example Timer Script

This example timer script checks for new blog posts and sends them to a mailing list.

The possibilities of what you can implement with timers is endless, but it does require scripting. If you would like a bot that automates any task and need help with the implementation, please contact sales@botlibre.com and let us develop your automation solution for you.

No comments:

Post a Comment