{"id":18783943,"url":"https://github.com/sparkpost/sendgrid-sparkpost-templates","last_synced_at":"2025-08-10T08:47:58.074Z","repository":{"id":138516415,"uuid":"88762463","full_name":"SparkPost/sendgrid-sparkpost-templates","owner":"SparkPost","description":"SendGrid to SparkPost Template Migration Tool","archived":false,"fork":false,"pushed_at":"2018-01-09T09:19:58.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-21T08:48:50.084Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SparkPost.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-19T15:44:08.000Z","updated_at":"2017-05-03T23:19:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0c99a49-b6a2-4594-9fad-35c1d87b0596","html_url":"https://github.com/SparkPost/sendgrid-sparkpost-templates","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SparkPost/sendgrid-sparkpost-templates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Fsendgrid-sparkpost-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Fsendgrid-sparkpost-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Fsendgrid-sparkpost-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Fsendgrid-sparkpost-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SparkPost","download_url":"https://codeload.github.com/SparkPost/sendgrid-sparkpost-templates/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Fsendgrid-sparkpost-templates/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269699205,"owners_count":24461209,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T20:41:14.025Z","updated_at":"2025-08-10T08:47:58.047Z","avatar_url":"https://github.com/SparkPost.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Slack Status](http://slack.sparkpost.com/badge.svg)](http://slack.sparkpost.com)\n\nThis is a SendGrid to SparkPost email template migration tool.\n\nThe tool presents a simple web UI for migrating templates directly from your SendGrid account to SparkPost as well as translating SendGrid template text directly into its SparkPost equivalent.\n\nIf you want to automate your migration, the tool also has an API.\n\nSee below for details on [deployment on Heroku](#heroku-deployment), [manual deployment](#manual-deployment) and [API use](#the-api).\n\n## Transactional Templates\n\n| Supported \t                        | Unsupported \t                      |\n|:------------------------------------|:----------------------------- \t    |\n| `\u003c%subject%\u003e`              \t        | `\u003c%asm_group_unsubscribe_url%\u003e`\n| `\u003c%body%\u003e` \t                        | `\u003c%asm_preferences_url%\u003e`\n| `\u003c%asm_global_unsubscribe_url%\u003e`*   | Sections |\n| Custom delimited variables**   | |\n\n\n## Marketing Campaigns\n\n| Supported \t                        | Unsupported \t                      |\n|:------------------------------------|:----------------------------- \t    |\n|Sender Fields \u003cbr/\u003e `[Sender_Name], [Sender_Address], [Sender_City], [Sender_State],[Sender_Zip]` | `[Unsubscribe_Preferences]`\n|`[Unsubscribe]*`                      | |\n|`[Weblink]`                          | |\n|`[%email%]`                          | |\n|\u003ccode\u003e[%custom_field%]`, `[%custom_field \u0026#124; default value%]\u003c/code\u003e | |\n\n\\* You need to replace placeholder (`?`) after translation.\n\n\\** You need specify the custom delimiters during translation. Only one type of delimiter is supported.\n\n\n## Heroku Deployment\n\nYou can deploy it directly to Heroku: [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n\n### Optional: SparkPost Add-On\n\nIf you run this app on Heroku but do not yet have a SparkPost account, you could choose the [SparkPost Heroku add-on](https://elements.heroku.com/addons/sparkpost).\nFollow the usual steps through your Heroku dashboard or using the `heroku` command line tool to install the add-on on your Heroku app.\n\n## Manual Deployment\n\nIf you prefer you can deploy it into your own environment using the instructions below.\n\n### Prerequisites\n\n - node 6.0+\n - npm 3.0+\n\n```bash\ngit clone https://github.com/SparkPost/sendgrid-sparkpost-templates.git\ncd sendgrid-sparkpost-templates\nnpm install\nnpm run start\n```\n\nYou now have a server running on port 3000.\n\n## Usage\n\n### The UI\n\nOnce deployed, you can migrate templates between services or translate template text directly through the web UI.\n\n### The API\n\nIf you prefer direct API access or you want to automate your template migration, here's how the API endpoints work.\n\n### /api/translate: Template Translation\n\nAccept a SendGrid template and convert it SparkPost format.\n\nRequest:\n\n```\nPOST /api/translate HTTP/1.1\nContent-Type: application/json\n\nsendgridTemplate: \"SendGrid template content\",\noptions: {\n  isCampaign: false,\n  startingDelimiter: \"%\",\n  endingDelimiter: \"%\"\n}\n\n```\n\nSuccessful response:\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n  \"sparkPostTemplate\": \"Translated template content\",\n  \"warnings\": [\n    \"\u003c%asm_group_unsubscribe_url%\u003e is unsupported. Treating a normal substitution variable.\"\n  ]\n}\n```\n\n### /api/migrate: Migration From SendGrid To SparkPost\n\nExtract a template from sendgrid, translate it and import it into SparkPost.\n\nNote: your SparkPost API key must include Templates Read/Write privileges for use with the `migrate` endpoint and the migration UI.\n\nRequest:\n\n```\nPOST /api/migrate HTTP/1.1\nContent-Type: application/json\n\n{\n  sendgridAPIKey: \"your-sendgrid-api-key\",\n  sendgridTemplateId: \"your-sendgrid-template-or-campaign-id\",\n  sparkPostAPIKey: \"your-sparkpost-api-key\",\n  options: {\n    useHerokuSPAPIKey: false,\n    isSendgridCampaign: true,\n    useSandboxDomain: true,\n    startingDelimiter: \"%\"\n    endingDelimiter: \"%\"\n  }\n}\n\n```\n\nSuccessful response:\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n  \"result\": true,\n  \"warnings\": [\n    \"\u003c%asm_group_unsubscribe_url%\u003e is unsupported. Treating a normal substitution variable.\"\n  ]\n}\n```\n\n### API Errors\n\nOn error, the API endpoints will return a non-200 status code and a JSON error object containing a list of errors:\n\n```json\n{\n  \"errors\": [\n    {\"message\": \"Description of a thing that did not work.\"},\n    {\"message\": \"...\"}\n  ]\n}\n```\n\n### Contributing\n\nWe *welcome* your contributions.  Check out our [contributor notes](CONTRIBUTING.md) for details on how to help out.\n\n### ChangeLog\n\n[See ChangeLog here](CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkpost%2Fsendgrid-sparkpost-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsparkpost%2Fsendgrid-sparkpost-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkpost%2Fsendgrid-sparkpost-templates/lists"}