Perform operations on spaces in Google Chat via the Workflow Automator
Orchestration apps let you automate repeatable tasks and actions that span across a diverse set of systems and applications using workflows. The list of actions supported for this app include:
Get Members from Space
Export File to Freshservice Ticket
Export File to Freshservice Ticket Note
Upload Ticket Attachments to Drive
To install and authenticate the app you need to provide the following input:
• Service Account Credentials
Before proceeding further, the user must have the bot configured in a google account. Complete the following steps to create a simple Google Chatbot.
Get Started with Google Chatbot
To run this quickstart, you need:
A Google account. (https://workspace.google.com/signup/)
Step 1: Create the script
Go to the Apps Script Getting Started page.
Click the Hangouts Chat Bot template. You might have to scroll down to see this template.
3. Click Untitled project at the top left, type Freshservice bot, and click Rename.
You now have a working bot code that you can try out (as described in the steps below) and then customize to meet your requirements.
Be sure you're signed in to the correct Google account when you open the Apps Script template. The current account can sometimes be switched to your default account without your noticing.
You need the Deployment ID for this Apps Script project so that you can use it in the next step. To get the Deployment ID, do the following:
- Click Publish > Deploy from manifest.
In the Deployments dialog box next to Latest Version (HEAD), click Get ID.
In the Deployment ID dialog box, copy the value listed for the Deployment ID.
Note: You can use the HEAD deployment for simple testing during development. But bots with HEAD deployments cannot be shared across a domain, and cannot be accessed by users unless they have read access to your script. Therefore for general testing and release, you must create a versioned deployment.
Step 2: Enable the Google Chat API (formerly Hangouts Chat API)
Set up a project for your bot in the Google API Console and enable the Google Chat API.
2. Save the downloaded JSON key. Your bot can use this key to authenticate messages asynchronously.
3. Open your project in the API Console. In the list of APIs, click Hangouts Chat API.
4. Select the Configuration tab and enter the information for the bot, as described below.
In the Bot name field, enter ‘Freshservice bot'.
In the Avatar URL field, enter 'https://goo.gl/yKKjbw'.
In the Description field, enter ‘Freshservice bot'.
Under Functionality, select Bot works in direct messages.
Under Connection settings, select Apps Script project and paste the Deployment ID into the field.
Under Permissions, select Specific people and groups in your domain, and enter your own email.
When you've finished configuring your bot, click Save.
Step 3: Run the sample
To run the sample, do the following:
Create a new direct message with the bot by clicking Find people, rooms, bots (https://chat.google.com/) and type ‘Freshservice Bot’
In the new direct message with the bot, type 'hello'.
The bot thanks you for adding it and echoes your message.