Skip to content

Conversation

@EstebanCanela
Copy link
Contributor

@EstebanCanela EstebanCanela commented Dec 11, 2025

Summary

  • I added SQS integration for Standard and FIFO queues

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

https://www.loom.com/share/35559cfd4ae64e0ba194f6abcebccd43

@vercel
Copy link

vercel bot commented Dec 11, 2025

@EstebanCanela is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 11, 2025

Greptile Overview

Greptile Summary

This PR adds Amazon SQS integration for sending messages to both Standard and FIFO queues.

Key Changes

  • Implemented sqs_send tool with AWS SDK client for sending messages to SQS queues
  • Added comprehensive block configuration with support for Standard and FIFO queue parameters (messageGroupId, messageDeduplicationId)
  • Created API route with Zod validation and proper error handling
  • Added SQS icon components and updated registries in both sim and docs apps
  • Provided complete documentation with usage instructions

Implementation Details

  • Uses user-only visibility for AWS credentials (region, accessKeyId, secretAccessKey, queueUrl) following custom rule 2851870a
  • Properly handles JSON parsing for the data field in the block configuration
  • Implements client cleanup with client.destroy() in a finally block
  • Follows established patterns from other AWS integrations (DynamoDB, S3)

Issues Found

  • Debug console.log statement left in apps/sim/app/api/tools/sqs/utils.ts:25-29

Confidence Score: 4/5

  • This PR is safe to merge after removing the debug console.log statement
  • The implementation follows established patterns, has proper error handling, validation, and documentation. The only issue is a debug console.log that should be removed before merging. All other aspects are well-implemented.
  • Remove the debug console.log from apps/sim/app/api/tools/sqs/utils.ts before merging

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/app/api/tools/sqs/utils.ts 3/5 Implements SQS client creation and message sending with debug console.log that should be removed
apps/sim/app/api/tools/sqs/send/route.ts 5/5 API route for sending SQS messages with proper validation and error handling
apps/sim/tools/sqs/send.ts 5/5 Tool configuration for SQS send operation with proper visibility settings
apps/sim/blocks/blocks/sqs.ts 5/5 Block configuration for SQS integration with proper UI fields and parameter handling

Sequence Diagram

sequenceDiagram
    participant User
    participant Block as SQS Block
    participant Tool as sqs_send Tool
    participant API as /api/tools/sqs/send
    participant Utils as SQS Utils
    participant AWS as AWS SQS

    User->>Block: Configure SQS operation
    Block->>Block: Parse JSON data field
    Block->>Block: Build tool params
    Block->>Tool: Execute sqs_send
    Tool->>API: POST request
    API->>API: Validate with Zod schema
    API->>Utils: createSqsClient(config)
    Utils->>Utils: Initialize SQSClient
    API->>Utils: sendMessage(client, params)
    Utils->>AWS: SendMessageCommand
    AWS-->>Utils: SendMessageCommandOutput
    Utils-->>API: {id: MessageId}
    API->>Utils: client.destroy()
    API-->>Tool: {message, id}
    Tool-->>Block: Transform response
    Block-->>User: Display result
Loading

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.

Additional Comments (1)

  1. apps/sim/app/api/tools/sqs/utils.ts, line 25-29 (link)

    syntax: debug console.log left in production code

14 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@EstebanCanela
Copy link
Contributor Author

Hey guys, I hope you're well.

I added the Amazon SQS integration to support sending messages to both Standard and FIFO queues.
I'd like to ask you if you could take a look and let me know if there's anything I should improve or add to the PR.

Thanks in advance 🚀

cc @waleedlatif1 @emir-karabeg

@waleedlatif1
Copy link
Collaborator

@EstebanCanela looks good to me, can you include a video of you using the block as a sanity check? thanks for the contribution!

@EstebanCanela
Copy link
Contributor Author

EstebanCanela commented Dec 11, 2025

@waleedlatif1 thanks for checking the PR.

I recorded a Loom Video and uploaded it as mp4.

btw, I fixed the linter issues 😄

sqs.mp4

@vercel
Copy link

vercel bot commented Dec 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Dec 11, 2025 11:01pm

@waleedlatif1 waleedlatif1 merged commit 8d4f2e0 into simstudioai:staging Dec 11, 2025
9 checks passed
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