Giter Site home page Giter Site logo

deg16-lunchmenu-teams's Introduction

This script fetches the lunch menu from deg16.no and publish it to a channel in Teams.

This script has now moved to AWS Lambda.

Installation instructions

git clone https://github.com/rejlersembriq/deg16-lunchmenu-teams.git
cd deg16-lunchmenu-teams

# Permissions are needed for AWS to be able to read and execute our modules
chmod -R 777 node_modules
chmod 777 index.js

zip -r function.zip .

Setup AWS Lambda function

  1. Create a new AWS Lambda function
  2. Set runtime to be > nodejs8
  3. In the "Code entry type", choose "Upload a .zip file"
  4. Upload function.zip you created earlier
  5. Hit "Save"
  6. Make sure Handler is index.handler
  7. Under "Environmental Variables" enter "TEAMS_URL" for name and then the URL to your Incomming Webhook

Setup trigger via CloudWatch

  1. Go to CloudWatch/Rules and "Create rule"
  2. Event Source must be "Scehduled"
  3. Choose "Cron expression" with this expression 0 10 ? * MON-FRI *
  4. Click "Add Target" and choose "Lambda function"
  5. Select your AWS Lambda function
  6. Click "Configure Details"

Updating AWS Lambda function

For updating an already existing function you just have to zip your files again and upload using "Upload a .zip file".

deg16-lunchmenu-teams's People

Contributors

moiaune avatar

Watchers

 avatar James Cloos avatar Lars Wefald avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.