{"_id":"@codeverse-gp/scaffolder-backend-module-sendgrid","_rev":"2-cb4425249966a229759515994c254688","name":"@codeverse-gp/scaffolder-backend-module-sendgrid","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@codeverse-gp/scaffolder-backend-module-sendgrid","version":"1.0.0","keywords":["backstage","plugin","scaffolder","sendgrid"],"author":{"name":"CodeVerse-GP"},"license":"MIT","_id":"@codeverse-gp/scaffolder-backend-module-sendgrid@1.0.0","maintainers":[{"name":"grvpandey11","email":"grvpandey11@gmail.com"}],"dist":{"shasum":"762523cfb968cb3fbe7963869ccb540bd02cf5f2","tarball":"https://registry.npmjs.org/@codeverse-gp/scaffolder-backend-module-sendgrid/-/scaffolder-backend-module-sendgrid-1.0.0.tgz","fileCount":16,"integrity":"sha512-8t0vu7lRIzi8KXeHV1Xu0XlEQmNfP1yJya31hifJlfXrWVEqDuzukYJ7W4o6AT4TRI470TlFY+rYU7cG9kzCMg==","signatures":[{"sig":"MEUCIQDsmng/9l0UmMneHboTEwlZkjzfssNXPI9aow7MWc0CwAIgQrYBxf9mhtmbRFQzQxB2crivjFfSe/cWUd09Bza57KQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16737},"main":"src/index.ts","types":"src/index.ts","scripts":{"lint":"backstage-cli package lint","test":"backstage-cli package test","build":"backstage-cli package build","clean":"backstage-cli package clean","start":"backstage-cli package start","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack"},"_npmUser":{"name":"grvpandey11","email":"grvpandey11@gmail.com"},"backstage":{"role":"backend-plugin-module","pluginId":"scaffolder","pluginPackage":"@backstage/plugin-scaffolder-backend"},"repository":{"url":"https://github.com/CodeVerse-GP/scaffolder-backend-module-sendgrid.git","type":"git","directory":"."},"description":"The sendgrid module for @backstage/plugin-scaffolder-backend","directories":{},"dependencies":{"yaml":"^2.7.1","@sendgrid/mail":"^8.1.5","@backstage/config":"^1.3.2","@backstage/backend-plugin-api":"^1.2.1","@backstage/plugin-scaffolder-node":"^0.8.0"},"publishConfig":{"main":"dist/index.cjs.js","types":"dist/index.d.ts","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@backstage/cli":"^0.31.0","@backstage/plugin-scaffolder-node-test-utils":"^0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/scaffolder-backend-module-sendgrid_1.0.0_1744924925409_0.21241524888782637","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@codeverse-gp/scaffolder-backend-module-sendgrid","version":"1.0.1","license":"MIT","description":"The sendgrid module for @backstage/plugin-scaffolder-backend","main":"src/index.ts","types":"src/index.ts","keywords":["backstage","plugin","scaffolder","sendgrid"],"author":{"name":"CodeVerse-GP"},"publishConfig":{"access":"public","main":"dist/index.cjs.js","types":"dist/index.d.ts"},"repository":{"type":"git","url":"https://github.com/CodeVerse-GP/scaffolder-backend-module-sendgrid.git","directory":"."},"backstage":{"role":"backend-plugin-module","pluginId":"scaffolder","pluginPackage":"@backstage/plugin-scaffolder-backend"},"scripts":{"start":"backstage-cli package start","build":"backstage-cli package build","lint":"backstage-cli package lint","test":"backstage-cli package test","clean":"backstage-cli package clean","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack"},"dependencies":{"@backstage/backend-plugin-api":"^1.2.1","@backstage/config":"^1.3.2","@backstage/plugin-scaffolder-node":"^0.8.0","@sendgrid/mail":"^8.1.5","yaml":"^2.7.1"},"devDependencies":{"@backstage/cli":"^0.31.0","@backstage/plugin-scaffolder-node-test-utils":"^0.2.0"},"licenseText":"MIT License\n\nCopyright (c) 2025 CodeVerse-GP\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@codeverse-gp/scaffolder-backend-module-sendgrid@1.0.1","dist":{"shasum":"e2eaa2641b428f2513d9386d83f853368fa8c7c1","integrity":"sha512-SrzW5+Ay/WzomW8/nUgpea7rKEzQlsWYyADjk3QPEdMP+GkoK44KaP21fI0gWGsdXL/C7M8/53GwskJPc179Vg==","tarball":"https://registry.npmjs.org/@codeverse-gp/scaffolder-backend-module-sendgrid/-/scaffolder-backend-module-sendgrid-1.0.1.tgz","fileCount":17,"unpackedSize":19507,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBQz3mSOiuAaO0qGST7++UZtzrMMYEarFLBVgQoT9fSiAiEA7vbLrMZ8AqdYJNfSdYuYoAu/kClGuRC9K3QI+TeksEc="}]},"_npmUser":{"name":"grvpandey11","email":"grvpandey11@gmail.com"},"directories":{},"maintainers":[{"name":"grvpandey11","email":"grvpandey11@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/scaffolder-backend-module-sendgrid_1.0.1_1744975975793_0.13362413577865673"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-17T21:22:05.330Z","modified":"2025-04-18T11:32:56.190Z","1.0.0":"2025-04-17T21:22:05.622Z","1.0.1":"2025-04-18T11:32:55.988Z"},"author":{"name":"CodeVerse-GP"},"license":"MIT","keywords":["backstage","plugin","scaffolder","sendgrid"],"repository":{"type":"git","url":"https://github.com/CodeVerse-GP/scaffolder-backend-module-sendgrid.git","directory":"."},"description":"The sendgrid module for @backstage/plugin-scaffolder-backend","maintainers":[{"name":"grvpandey11","email":"grvpandey11@gmail.com"}],"readme":"# scaffolder-backend-module-sendgrid\n\nWelcome to the `sendgrid:email:send` action for the `scaffolder-backend`.\n\n### Getting started\n\nYou need to configure the action in your backend.\n\n## Installation\n\n1. Install the plugin\n```bash\n# From your Backstage root directory\nyarn --cwd packages/backend add @codeverse-gp/scaffolder-backend-module-sendgrid\n```\n\n2. Ensure sendgrid module is added to your backend.\n\n```typescript\n// In packages/backend/src/index.ts\nconst backend = createBackend();\n// ...\nbackend.add(import('@backstage/plugin-scaffolder-backend'));\nbackend.add(import('@codeverse-gp/scaffolder-backend-module-sendgrid'));\n```\n\n---\n\n## Using the Action in Templates\n\n### **Option 1: Pass All Inputs via Template YAML**\n\nAdd values to your `app-config.yaml`.\n\n```yaml\nsendgrid:\n  apiKey: API_KEY\n```\nIn this approach, you pass all the required inputs (`to`, `from`, `subject`, `body`) directly in the template YAML file. This does not rely on any default values in the `app-config.yaml`.\n\n```yaml\napiVersion: scaffolder.backstage.io/v1beta3\nkind: Template\nmetadata:\n  name: sendgrid-email-test\n  title: Test SendGrid Email Action\n  description: Template to test the custom SendGrid email scaffolder action\nspec:\n  owner: abc\n  type: service\n\n  parameters:\n    - title: Basic Info\n      required:\n        - name\n        - to\n        - from\n        - subject\n        - body\n      properties:\n        name:\n          title: Your Name\n          type: string\n          description: This will be included in the email.\n        to:\n          title: Email To\n          type: string\n          description: Recipient email address\n        from:\n          title: Email From\n          type: string\n          description: Sender email address (must be a verified sender in SendGrid)\n        subject:\n          title: Subject\n          type: string\n          default: \"🎉 Hello from Backstage!\"\n        body:\n          title: Email Body\n          type: string\n          default: \"<p>This is a test email sent from Backstage using SendGrid.</p>\"\n\n  steps:\n    - id: send-email\n      name: Send Email\n      action: sendgrid:email:send\n      input:\n        to: ${{ parameters.to }}\n        from: ${{ parameters.from }}\n        subject: ${{ parameters.subject }}\n        body: |\n          <h2>Hello ${{ parameters.name }}!</h2>\n          ${{ parameters.body }}\n\n  output:\n    text:\n      - title: ✅ Email Action Triggered\n        content: |\n          An email was sent to **${{ parameters.to }}** with the subject: _${{ parameters.subject }}_.\n```\n\n---\n\n### **Option 2: Use Defaults from `app-config.yaml`**\n\nAdd values to your `app-config.yaml`.\n\n```yaml\nsendgrid:\n  apiKey: API_KEY\n  defaults:\n    from: noreply@example.com\n    subject: Default Subject\n    body: \"<p>This is the default email body.</p>\"\n```\n\nIn this approach, you configure the default values (`from`, `subject`, `body`) in the `app-config.yaml` file and only pass the `to` parameter in the template YAML file.\n\n```yaml\napiVersion: scaffolder.backstage.io/v1beta3\nkind: Template\nmetadata:\n  name: sendgrid-email-test\n  title: Test SendGrid Email Action\n  description: Template to test the custom SendGrid email scaffolder action\nspec:\n  owner: abc\n  type: service\n\n  parameters:\n    - title: Basic Info\n      required:\n        - name\n        - to\n      properties:\n        name:\n          title: Your Name\n          type: string\n          description: This will be included in the email.\n        to:\n          title: Email To\n          type: string\n          description: Recipient email address\n\n  steps:\n    - id: send-email\n      name: Send Email\n      action: sendgrid:email:send\n      input:\n        to: ${{ parameters.to }}\n\n  output:\n    text:\n      - title: ✅ Email Action Triggered\n        content: |\n          An email was sent to **${{ parameters.to }}** with the default subject and body.\n```\n\n---\n\n### Summary\n\n- **Option 1**: Use when you want to pass all inputs (`to`, `from`, `subject`, `body`) dynamically in the template YAML file.\n- **Option 2**: Use when you want to rely on default values (`from`, `subject`, `body`) configured in `app-config.yaml` and only pass the `to` parameter in the template YAML file.\n\nYou can also visit the `/create/actions` route in your Backstage application to find out more about the parameters this action accepts and configure it as needed.\n\n\n","readmeFilename":"README.md"}