{"id":18112024,"url":"https://github.com/philnash/ruby-whatsapp-bots","last_synced_at":"2025-06-12T12:02:59.968Z","repository":{"id":39924496,"uuid":"240989991","full_name":"philnash/ruby-whatsapp-bots","owner":"philnash","description":"A repo of WhatsApp bots built in Ruby","archived":false,"fork":false,"pushed_at":"2023-04-12T05:53:43.000Z","size":31,"stargazers_count":24,"open_issues_count":3,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T17:47:04.809Z","etag":null,"topics":["ruby","sinatra","twilio","twilio-api","twilio-whatsapp","whatsapp","whatsapp-bot"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/philnash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-17T00:35:07.000Z","updated_at":"2024-06-11T07:30:12.000Z","dependencies_parsed_at":"2023-02-10T19:31:20.213Z","dependency_job_id":null,"html_url":"https://github.com/philnash/ruby-whatsapp-bots","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philnash%2Fruby-whatsapp-bots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philnash%2Fruby-whatsapp-bots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philnash%2Fruby-whatsapp-bots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philnash%2Fruby-whatsapp-bots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philnash","download_url":"https://codeload.github.com/philnash/ruby-whatsapp-bots/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248819118,"owners_count":21166470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ruby","sinatra","twilio","twilio-api","twilio-whatsapp","whatsapp","whatsapp-bot"],"created_at":"2024-11-01T01:09:13.010Z","updated_at":"2025-04-14T03:43:40.637Z","avatar_url":"https://github.com/philnash.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WhatsApp Bots built in Ruby\n\nThis is a repo of WhatsApp bots built in Ruby using the [Twilio API for WhatsApp](https://www.twilio.com/docs/sms/whatsapp/api).\n\n## Available bots\n\nThere is one bot so far:\n\n* [Keyword bot](keywords/README.md): a Sinatra application that can return facts and pictures about dogs and cats based on the keywords you send to it\n\n## How to build a bot\n\nSee the blog post [Build a WhatsApp chatbot with Ruby, Sinatra and Twilio](https://www.twilio.com/blog/whatsapp-chatbot-ruby-sinatra-twilio) to see how to get started with building bots.\n\n## Running the bots\n\nYou will need the following to run the bots in this repo:\n\n* [Ruby](https://www.ruby-lang.org/en/downloads/) and [Bundler](https://bundler.io/) installed\n* [ngrok](https://ngrok.com/) so we can [expose our local webhook endpoints to the world in style](https://www.twilio.com/blog/2015/09/6-awesome-reasons-to-use-ngrok-when-testing-webhooks.html)\n* A [WhatsApp account](https://www.whatsapp.com/)\n* A Twilio account (if you don't have one, [sign up for a new Twilio account here and receive $10 credit when you upgrade](https://twil.io/philnash))\n\n### Configure the Twilio sandbox for WhatsApp\n\n* Head to the [_WhatsApp sandbox_ area of the Twilio console](https://www.twilio.com/console/sms/whatsapp/learn), or navigate from [the console](https://www.twilio.com/console/) to [_Programmable SMS_](https://www.twilio.com/console/sms) and then [WhatsApp](https://www.twilio.com/console/sms/whatsapp/learn)\n* The page will have the WhatsApp sandbox number on it. Open your WhatsApp application and start a new message to that number\n* The page also has the message you need to send, which is \"join\" plus two random words, like \"join flagrant-pigeon\". Send your message to the sandbox number\n\n### Running an application\n\n#### Download or clone the app\n\nClone the application to your machine with the following command:\n\n```bash\ngit clone https://github.com/philnash/ruby-whatsapp-bots.git\ncd ruby-whatsapp-bots\n```\n\n#### Install dependencies\n\nInstall the dependencies with bundler:\n\n```bash\nbundle install\n```\n\n#### Configure the environment\n\nCopy the config example file:\n\n```bash\ncp config/env.yml.example config/env.yml\n```\n\nGet your Twilio auth token from your [Twilio console](https://www.twilio.com/console/) and add it to `config/env.yml`.\n\nTo use the location bot, [sign up for a free Dark Sky API key](https://darksky.net/dev/register) and add that to `config/env.yml`.\n\n#### Run the app\n\nChange into the directory of the bot you want to run. Then run the application with:\n\n```bash\nbundle exec rackup\n```\n\n#### ngrok\n\nRun ngrok to tunnel through to localhost:9292:\n\n```bash\nngrok http 9292\n```\n\nTake your ngrok URL and the path to your bot, `https://YOUR_NGROK_SUBDOMAIN.ngrok.io/bot` and enter it in the [WhatsApp sandbox admin](https://www.twilio.com/console/sms/whatsapp/sandbox) in the input marked \"When a message comes in\" and save the configuration.\n\nNow _send your bot a message_ and wait for the response.\n\n## License\n\nThese bots are licensed under the [MIT license](./LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilnash%2Fruby-whatsapp-bots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilnash%2Fruby-whatsapp-bots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilnash%2Fruby-whatsapp-bots/lists"}