Skip to content

Conversation

@icecrasher321
Copy link
Collaborator

Description

Remove await before executing webhooks -- so acks are sent immediately back.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Screen.Recording.2025-07-21.at.8.16.32.PM.mov

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally and in CI (bun run test)
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have updated version numbers as needed (if needed)
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Security Considerations:

  • My changes do not introduce any new security vulnerabilities
  • I have considered the security implications of my changes

@vercel
Copy link

vercel bot commented Jul 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sim ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2025 3:36am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Skipped (Inspect) Jul 22, 2025 3:36am

@icecrasher321 icecrasher321 changed the base branch from main to staging July 22, 2025 03:17
@icecrasher321 icecrasher321 changed the title fix(webhook): immediate acks from webhooks for teams fix(webhook): immediate acks from webhooks Jul 22, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR modifies the webhook processing logic in apps/sim/lib/webhooks/utils.ts to make webhook acknowledgments immediate rather than waiting for workflow execution to complete. The key change is removing the await statement before executeWorkflowFromPayload, allowing the system to respond to webhook requests immediately while processing workflows asynchronously in the background.

This change was specifically implemented to address timeout issues with Microsoft Teams webhooks, which require quick responses. The modification includes proper error handling for asynchronous execution failures through a .catch() block that logs any errors that occur after the initial response has been sent.

Confidence score: 4/5

  1. This PR is safe to merge as it improves webhook reliability without breaking existing functionality
  2. The high confidence score is due to the straightforward nature of the change and the addition of proper error handling
  3. Particular attention should be paid to apps/sim/lib/webhooks/utils.ts to ensure no webhook processing logic is broken by this change

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

@delve-auditor
Copy link

delve-auditor bot commented Jul 22, 2025

No security or compliance issues detected. Reviewed everything up to 45da9dc.

Security Overview
  • 🔎 Scanned files: 1 changed file(s)
Detected Code Changes
Change Type Relevant files
Enhancement ► blocks/webhook_trigger.mdx
    Add new webhook trigger block documentation
► webhooks/utils.ts
    Update webhook processing to run asynchronously
Refactor ► docs folder structure
    Reorganize triggers and blocks documentation
► icons.tsx
    Update Typeform icon implementation
Other ► Various documentation files
    Replace video content with static images
    Update documentation content and structure

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

@vercel vercel bot temporarily deployed to Preview – docs July 22, 2025 03:32 Inactive
@icecrasher321 icecrasher321 merged commit 2ae9cbc into staging Jul 22, 2025
3 of 5 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/webhook-acks branch July 22, 2025 19:58
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
* fix(webhook): immediate acks from webhooks for teams

* change default message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants