Skooh.io Logo
Back to blog
IntegrationDeveloper TutorialApril 23, 20256 min

jira-automation-webhooks-skooh

Trigger internal workflows from Jira automation rules using Skooh.

Use Case

Jira Automation can trigger webhooks on issue events. Use Skooh to forward these to internal workflow handlers:

  • Auto-provision resources when specific issues are created
  • Sync issue status with internal systems
  • Trigger deployments from issue transitions
  • Send notifications to internal chat

Setup

1. Create Skooh Endpoint

Create "Jira Automation" in Skooh.

2. Run the Skooh Proxy

Using the Desktop App:

  1. Download the Skooh Desktop App
  2. Enter your API key and hook token
  3. Set forwarding URL (e.g., `http://localhost:3000/jira\`)
  4. Click Connect

Using Docker:

docker run -d \\
  --name skooh-jira \\
  -e SKOOH_TOKEN=jira-automation \\
  -e SKOOH_API_KEY=your_api_key \\
  -e FORWARD_URL=http://workflow-handler:3000/jira \\
  --restart unless-stopped \\
  skooh/proxy

3. Create Jira Automation Rule

Note: See Jira Automation documentation for current instructions.

In Jira:

  1. Go to Project Settings → Automation
  2. Create new rule
  3. Choose trigger (e.g., "Issue created", "Issue transitioned")
  4. Add action: Send web request
  5. URL: Your Skooh URL
  6. Method: POST
  7. Body: Custom JSON (see below)

Customizing the Payload

Use Jira smart values to build useful payloads:

{
  "event": "issue_created",
  "issue": {
    "key": "{{issue.key}}",
    "summary": "{{issue.summary}}",
    "type": "{{issue.issueType.name}}",
    "priority": "{{issue.priority.name}}",
    "status": "{{issue.status.name}}",
    "reporter": "{{issue.reporter.displayName}}",
    "assignee": "{{issue.assignee.displayName}}",
    "created": "{{issue.created}}",
    "labels": {{issue.labels.asJsonStringArray}},
    "components": {{issue.components.name.asJsonStringArray}}
  },
  "project": {
    "key": "{{issue.project.key}}",
    "name": "{{issue.project.name}}"
  }
}

Handling Jira Events

app.post('/jira', express.json(), async (req, res) => {
  const { event, issue, project } = req.body;
  
  switch (event) {
    case 'issue_created':
      await handleIssueCreated(issue, project);
      break;
      
    case 'issue_transitioned':
      await handleIssueTransitioned(issue, req.body.transition);
      break;
      
    case 'issue_assigned':
      await handleIssueAssigned(issue);
      break;
  }
  
  res.status(200).send('OK');
});

async function handleIssueCreated(issue, project) {
  // Auto-provision based on issue type
  if (issue.type === 'Infrastructure Request') {
    await provisioningService.createRequest({
      jiraKey: issue.key,
      summary: issue.summary,
      requester: issue.reporter
    });
  }
  
  // Notify internal chat
  await chatService.postMessage(\`New issue: \${issue.key} - \${issue.summary}\`);
}

Transition-Based Workflows

Trigger actions on status changes:

async function handleIssueTransitioned(issue, transition) {
  // Deploy on "Ready for Release"
  if (transition.to === 'Ready for Release') {
    await deploymentService.queueRelease({
      jiraKey: issue.key,
      components: issue.components
    });
  }
  
  // Close related tickets on "Done"
  if (transition.to === 'Done') {
    await closeRelatedIssues(issue.key);
  }
}

Authentication

Add a secret header in Jira Automation:

app.post('/jira', express.json(), (req, res) => {
  const secret = req.headers['x-jira-secret'];
  if (secret !== process.env.JIRA_WEBHOOK_SECRET) {
    return res.status(401).send('Unauthorized');
  }
  // Process...
});

In Jira Automation, add custom header:

  • Header name: `x-jira-secret`
  • Header value: Your secret

Testing with Replay

  1. Trigger your automation rule in Jira
  2. Find the webhook in Skooh
  3. Replay to test your handler
  4. No need to create/transition issues repeatedly

Set up Jira automation →

Written by Skooh Team

Share:

Ready to try Skooh?

Start receiving webhooks in your local environment in under 5 minutes.

Skooh | jira-automation-webhooks-skooh