Integration Jira Service Management - > Opsgenie -> twitter
Asked by Tor Magne Svendsen:

Hi.

I wondered if this scenario is possible:

Official governmental departments use twitter to send tweets about roadwork, accidents in traffic etc. We are a responsible for public transpont in an area, and would log incidents that might affect public transport. These logs are the basis of messages on ticket apps, statuspages and other correlation information regarding the "health" of the ongoing public transport (Bus/Tram/Boats).

If we would like to forward tweets from a certain provider/account directly into Opsgenie as alerts where a dispatch on duty would monitor and escalate if it affects "our business" to incidents that would futher create statuses on statuspages and messages to different media, including our own twitter and e.g. facebook, would such a scenario be possible? Is there anyone who have made such an endavour or similar?


Answers:
author: Nick H
body: Hi [@Tor Magne Svendsen](/t5/user/viewprofilepage/user-id/3235919) ,

Some customers have connected Twitter to Opsgenie through 3rd party apps such as [IFTTT](https://ifttt.com/home) and [Zapier](https://zapier.com/app/dashboard). Both follow an IF \>\> THEN conditional statement format. For example; IF XYZ account tweets, THEN POST to a webhook, send an email, etc.

IFTTT offers a few different ways to integrate with Twitter including a webhook and email option. This short video might provide more insight into how to use a webhook: <https://www.youtube.com/watch?v=Q3WhvkefOR0>

with the webhook endpoint being <http://api.opsgenie.com/v2/alerts?apiKey=XXXXX>

\^ and the API key in the URL is from an [API Integration](https://docs.opsgenie.com/docs/api-integration).

They also offer the option to send the tweet through an email. The email address used for this could be from an [Email Integration](https://docs.opsgenie.com/docs/creating-alerts-via-email). Any time the Twitter account tweets \>\> trigger the Email Integration which then creates an alert in Opsgenie.

Opsgenie has a [prebuilt integration with Zapier](https://docs.opsgenie.com/docs/zapier-integration) that allows you to connect your Opsgenie account with Zapier. "Zaps" can then be created which are essentially their conditional statements; when an account tweets, create an alert in Opsgenie.

![comm zapier.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/119180i35B07800D820A208/image-size/large?v=v2&px=999 "comm zapier.jpg")

I'm sure there are other apps and methods that can be used, but hope this helps! Let us know if you have additional questions.

comments: author: Tor Magne Svendsen
body: Sorry about the late answer. The solution worked perfectly (IFTTT), and we were able to receive alerts into opsgenie via the webhook and a twitter account which subscribed to different traffic services (police and road services).

However - We had to backtrack as opsgenie is currently handling major incidents - and is not as integrated to Jira Service Management as we had hoped. tweet messages - makes alerts which create normal issues. Not all tweets is an issue - and not all issues are major incidents.


author: Nick H
body: Hi [@Tor Magne Svendsen](/t5/user/viewprofilepage/user-id/3235919) ,

Glad IFTTT helped with the workflow!

It sounds like you need some tweets/alerts to automate the creation of an incident. This can be done through [Incident Rules](https://docs.opsgenie.com/docs/automate-incident-creation-1).

Incidents are created automatically when incident rules are matched - based on the types of alerts that should trigger this automation.

If a specific tweet creates an Opsgenie alert, Opsgenie can automate that into the creation of an incident. The rule might look something like this - based on the "health" of the ongoing public transport (Bus/Tram/Boats):

![inc rule comm 1.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/126909iA401E4F5AB8DD0AF/image-size/large?v=v2&px=999 "inc rule comm 1.jpg")

\^ If an alert contained either of those messages, then the incident rule would match and automate creating an incident.

Hope this helps! Let us know if this is not what you were looking for, if you have additional questions, etc.


Tags: jira-service-management

twitter