{"_id":"59ce79c8913baf002484e04c","project":"5746675a5aa03c0e00fce9bc","version":{"_id":"5746675a5aa03c0e00fce9bf","__v":8,"project":"5746675a5aa03c0e00fce9bc","createdAt":"2016-05-26T03:02:50.849Z","releaseDate":"2016-05-26T03:02:50.849Z","categories":["5746675a5aa03c0e00fce9c0","574899e7e8c6a420000b7314","57489c11d929e919006ed4ae","57489c82d929e919006ed4b1","57489ce91b345d0e004e5231","5748a82e1b345d0e004e5256","59ce5c88e8c105001a4bedd7","59f96cd129b4d600246c2899"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"59ce5c88e8c105001a4bedd7","project":"5746675a5aa03c0e00fce9bc","version":"5746675a5aa03c0e00fce9bf","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-09-29T14:45:28.177Z","from_sync":false,"order":1,"slug":"blockspring-scripts","title":"Blockspring Scripts"},"user":"545988354f86a50800f9cce4","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-09-29T16:50:16.637Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","examples":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"Blockspring Scripts makes it easy to build add-ons for your favorite apps.\n\nUsing the onsite Python scripts editor, you can build:\n\n- [Buttons that trigger automations](https://blockspring-help.readme.io/docs/tutorial-buttons),\n- [UI components like sidebars](https://blockspring-help.readme.io/docs/tutorial-sidebars-ui),\n- [Workflows / \"if x then y\" pipelines](https://blockspring-help.readme.io/docs/quickstart-1),\n- [Integrations and import/export data syncing](https://blockspring-help.readme.io/docs/tutorial-app-connectors),\n- [Custom reports](https://blockspring-help.readme.io/docs/tutorial-app-modules), and\n- [Alerts](https://blockspring-help.readme.io/docs/tutorial-alerts)\n\nLet's go through a few tutorials to give you a feel for how to build add-ons using scripts.\n[block:api-header]\n{\n  \"title\": \"Install Blockspring Scripts\"\n}\n[/block]\n[Follow these installation](https://blockspring-help.readme.io/docs/installing-scripts) instructions to install Blockspring Scripts for Chrome.\n[block:api-header]\n{\n  \"title\": \"Write Your First Script\"\n}\n[/block]\nOnce you have the editor open, you can write your first script. Each script is made up of Python 3 functions. You can print() data, and also return it.\n\nLet's write the following from the editor:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"import trello_app\\n\\ndef board_name():\\n\\t\\tboard = trello_app.get_current_board()\\n\\t  print(board.get_name())\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\nTo see this script run, do the following:\n1) Click **Save Script** or Command + S.\n2) Choose board_name in the function dropdown.\n3) Click **Run** to run the function.\n4) Check out the results in the logs below. Not too bad!\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0a83e98-running.gif\",\n        \"running.gif\",\n        796,\n        600,\n        \"#1076b1\"\n      ],\n      \"border\": true\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"I'm Ready to Rock... Show Me Examples\",\n  \"body\": \"A quick way to learn some advanced features is with templates. Learn how to [import templates here](https://blockspring-help.readme.io/docs/importing-a-template).\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Tutorial: App Buttons\"\n}\n[/block]\n[This first tutorial](https://blockspring-help.readme.io/docs/tutorial-buttons) teaches how run scripts using App Buttons.\n[block:api-header]\n{\n  \"title\": \"Tutorial: Add a Sidebar\"\n}\n[/block]\n[The second tutorial](https://blockspring-help.readme.io/docs/tutorial-sidebars-ui) shows how to add UI elements, like a sidebar, to apps.\n[block:api-header]\n{\n  \"title\": \"Tutorial: Workflows, Get Data, Set Data\"\n}\n[/block]\n[Follow this tutorial](https://blockspring-help.readme.io/docs/quickstart-1) to learn how to set up workflows. We'll learn to use event triggers and get/set data from objects (eg like cards and boards)\n[block:api-header]\n{\n  \"title\": \"Tutorial: Sync Data with Other Apps\"\n}\n[/block]\n[This tutorial](https://blockspring-help.readme.io/docs/tutorial-app-connectors) teaches you to integrate with a 3rd party app using connectors. You'll see how Scripts handles OAuth for you with a practical example of syncing Trello and Google Sheets.\n[block:api-header]\n{\n  \"title\": \"Tutorial: Custom Reports and Modules\"\n}\n[/block]\n[This tutorial](https://blockspring-help.readme.io/docs/tutorial-app-modules) shows how to generate a custom report, and import Python modules for more advanced functionality.\n[block:api-header]\n{\n  \"title\": \"Tutorial: Alerts\"\n}\n[/block]\n[This last tutorial](https://blockspring-help.readme.io/docs/tutorial-alerts) shows how to send alerts when events happen in your app.\n[block:api-header]\n{\n  \"title\": \"Need Help?\"\n}\n[/block]\nIf you run into any issues, or what to chat with others, [connect to the Blockspring community](https://blockspring-help.readme.io/docs/getting-help) right from the Scripts editor.","excerpt":"","slug":"quickstart","type":"basic","title":"Quickstart"}
Blockspring Scripts makes it easy to build add-ons for your favorite apps. Using the onsite Python scripts editor, you can build: - [Buttons that trigger automations](https://blockspring-help.readme.io/docs/tutorial-buttons), - [UI components like sidebars](https://blockspring-help.readme.io/docs/tutorial-sidebars-ui), - [Workflows / "if x then y" pipelines](https://blockspring-help.readme.io/docs/quickstart-1), - [Integrations and import/export data syncing](https://blockspring-help.readme.io/docs/tutorial-app-connectors), - [Custom reports](https://blockspring-help.readme.io/docs/tutorial-app-modules), and - [Alerts](https://blockspring-help.readme.io/docs/tutorial-alerts) Let's go through a few tutorials to give you a feel for how to build add-ons using scripts. [block:api-header] { "title": "Install Blockspring Scripts" } [/block] [Follow these installation](https://blockspring-help.readme.io/docs/installing-scripts) instructions to install Blockspring Scripts for Chrome. [block:api-header] { "title": "Write Your First Script" } [/block] Once you have the editor open, you can write your first script. Each script is made up of Python 3 functions. You can print() data, and also return it. Let's write the following from the editor: [block:code] { "codes": [ { "code": "import trello_app\n\ndef board_name():\n\t\tboard = trello_app.get_current_board()\n\t print(board.get_name())", "language": "python" } ] } [/block] To see this script run, do the following: 1) Click **Save Script** or Command + S. 2) Choose board_name in the function dropdown. 3) Click **Run** to run the function. 4) Check out the results in the logs below. Not too bad! [block:image] { "images": [ { "image": [ "https://files.readme.io/0a83e98-running.gif", "running.gif", 796, 600, "#1076b1" ], "border": true } ] } [/block] [block:callout] { "type": "info", "title": "I'm Ready to Rock... Show Me Examples", "body": "A quick way to learn some advanced features is with templates. Learn how to [import templates here](https://blockspring-help.readme.io/docs/importing-a-template)." } [/block] [block:api-header] { "title": "Tutorial: App Buttons" } [/block] [This first tutorial](https://blockspring-help.readme.io/docs/tutorial-buttons) teaches how run scripts using App Buttons. [block:api-header] { "title": "Tutorial: Add a Sidebar" } [/block] [The second tutorial](https://blockspring-help.readme.io/docs/tutorial-sidebars-ui) shows how to add UI elements, like a sidebar, to apps. [block:api-header] { "title": "Tutorial: Workflows, Get Data, Set Data" } [/block] [Follow this tutorial](https://blockspring-help.readme.io/docs/quickstart-1) to learn how to set up workflows. We'll learn to use event triggers and get/set data from objects (eg like cards and boards) [block:api-header] { "title": "Tutorial: Sync Data with Other Apps" } [/block] [This tutorial](https://blockspring-help.readme.io/docs/tutorial-app-connectors) teaches you to integrate with a 3rd party app using connectors. You'll see how Scripts handles OAuth for you with a practical example of syncing Trello and Google Sheets. [block:api-header] { "title": "Tutorial: Custom Reports and Modules" } [/block] [This tutorial](https://blockspring-help.readme.io/docs/tutorial-app-modules) shows how to generate a custom report, and import Python modules for more advanced functionality. [block:api-header] { "title": "Tutorial: Alerts" } [/block] [This last tutorial](https://blockspring-help.readme.io/docs/tutorial-alerts) shows how to send alerts when events happen in your app. [block:api-header] { "title": "Need Help?" } [/block] If you run into any issues, or what to chat with others, [connect to the Blockspring community](https://blockspring-help.readme.io/docs/getting-help) right from the Scripts editor.