Skip to content
Floyd Diebel edited this page Feb 17, 2021 · 11 revisions

Email

Stir can integrate with any platform that can be emailed at unique addresses to execute tasks or receive data. The most common use for this integration would be post emails to a task manager to create work logs.

Addresses can look like ####@yourdomain.com or head-####@yourdomain.com with #### being a unique ID for your particular project. Generally this number is a project or task number within your project management platform.

  1. Edit global.conf (normally found in /etc/stir/) and set the correct values for POST_EMAIL_HEAD and POST_EMAIL_TAIL
  2. Edit your project's .stir.sh file and set the values for TASK, TASK_USER, and ADD_TIME (optional)
  3. Test your configuration with stir --test-email [project] at the shell prompt

Note: you can send email by running a local server, or by using an SMTP mail server. Set USE_SMTP=TRUE in /etc/stir/global.conf and make sure you have ssmtp properly configured.

Slack

Slack is an open, collaborative environment for team communication. Stir can post error and success notifications to any user or channel that you wish.

  1. Go to this link and follow the instructions to create webhook endpoints
  2. Edit the Slack section in global.conf and set values for POST_TO_SLACK, SLACK_URL, and SLACK_ERROR as needed; SLACK_URL will be the URL that you created in step 1
  3. Variables can be set in your project's .stir.sh as well, and will override the global settings (for that project)
  4. Run stir --test-slack [project] to test

PHP Server Monitor

PHP Server Monitor checks whether your websites and servers are up and running. It comes with a web based user interface where you can manage your services and websites, and you can manage users for each server with a mobile number and email address.

  1. Create a server in your PHP Server Monitor dashboard, and give access to the user that Stir will spoof
  2. Set values for MONITOR_URL, MONITOR_USER, MONITOR_PASS, and SERVER_ID in your project's .stir.sh
  3. Run stir --test-monitor [project] to check your configuration

Google Analytics

Google Analytics lets you measure advertising ROI as well as track your web sites and applications. Stir can make use this data when creating its statistic pages for your projects.

Note: This can be quite funky to set up the first time, check this link for a thorough tutorial on how to get your API credentials and authorization codes.

  1. Create a new project in Google's API console
  2. Open the project, enable API and turn on Analytics API
  3. Create a new Client ID for an Installed Application
  4. Go to APIs and auth > Credentials and copy the values given for Client ID, Client Secret, and Redirect URIS
  5. In global.conf, assign the correct values to CLIENT_ID, CLIENT_SECRET, REDIRECT_URI, AUTHORIZATION_CODE, ACCESS_TOKEN, and REFRESH_TOKEN
  6. Get your Profile ID for the Analytics profile you want to be able to access; when viewing an Analytics dashboard, it's the number in the URL after the letter p; for example, if the URL is https://analytics.google.com/analytics/web/#/report-home/a140234144w201132878p195209070 the profile ID would be 195209070
  7. Edit your project's .stir.sh and assign the correct value for PROFILE_ID
  8. Run stir --test-analytics [project] to check your configuration and diagnose any issues

Webhooks

If Stir doesn't talk natively to a platform you need, you may be able to use a Webhook.

  1. Configure end points in the platform you want to receive the webhook payload
  2. In your project's .stir.sh set POSTURL to the endpoint url
  3. Test by running stir --test-webhook [project]

Note: Use a site like this one to test your configuration.

Invoice Ninja

Invoice Ninja is the #1 open-source platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. Stir can create and send new invoices manually or on a schedule.

  1. Go to https://app.invoiceninja.com/settings/api_tokens (or your self-hosted URL) and create an API key
  2. In global.conf, assign values for IN_HOST, IN_TOKEN, and IN_OFFSET
  3. Edit your project's .stir.sh and assign values for IN_CLIENT_ID, IN_PRODUCT, IN_ITEM_COST, IN_ITEM_QTY, IN_NOTES, and IN_EMAIL as needed

Note: If your first invoice number in your Invoice Ninja was not 1, you will need to make sure and set IN_OFFSET to the first invoice's number. This is to work around the fact that Invoice Ninja's API uses the internal invoice number as opposed to the front-facing number.

Bugsnag

Bugsnag monitors application stability so you can make data-driven decisions on whether you should be building new features, or fixing bugs.

Note: This integration is working but not useful. It is in development, under review, and may not be fully implemented.

  1. Go to https://app.bugsnag.com/settings/YOURORGANIZATION/my-account/auth-tokens and generate a new token, and copy the value
  2. Edit your global.conf and set BUGSNAG_AUTH to the value of the token created above
  3. Run stir --test-bugsnag [project] in the shell to test
Clone this wiki locally