Giter Site home page Giter Site logo

walkingpendulum / asana-studies Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 41 KB

Getting to know Asana webhooks API and building simple bot that listens for Asana comments and publishes them to RabbitMQ

Python 100.00%
asana-api asana python aiohttp aiohttp-server aio-pika rabbitmq

asana-studies's Introduction

asana-studies

webhooks studies

  1. Install grok tool. brew install ngrok for MacOS users. Follow instructions on https://dashboard.ngrok.com/get-started/your-authtoken to configure it.
  2. Run ngrok http 8090. This will block, so do this in a separate terminal window.
  3. Copy the subdomain, e.g. e91dadc7
  4. Create a new PAT - we're going to use ngrok on prod Asana, and don't want to give it long-term middleman access. Follow instructions on https://app.asana.com/-/developer_console.
  5. Add this PAT to the local config
    echo 'pat: "your_private_access_token_here"' >> config.yaml 
  6. Add the Asana workspace to the local config (this is required for webhooks.get_all). You could get workspace id from url in admin console of Asana UI.
    echo 'workspace: your_workspace_id_here' >> config.yaml 
  7. Run ./webhook_server.py. This will block, so do this in a separate terminal window.
  8. Request Asana to create webhook
    ./asana-cli.py webhooks create --target 'https://SUBDOMAIN_HERE.ngrok.io/receive-webhook?project=PROJECT_ID' --resource PROJECT_ID
  9. Make changes in Asana and see the logs from the returned webhooks.
  10. Don't forget to deauthorize your temp PAT when you're done.

asana2rabbitmq

This is an extension of the asana studies that were described above. Please familiarize yourself with them before continue.

  1. Acquire running RabbitMQ instance.
  2. Add amqp_url: amqps://login:passwod@host:port entry to config.json.
  3. Run ./asana2rabbitmq.py
  4. Register webhook via asana-cli.py
  5. Run ./listen.py --queue task_changes and ./listen.py --queue comments. This will block, so do this in a separate terminal windows.

asana-studies's People

Contributors

walkingpendulum avatar

Watchers

 avatar  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.