{"id":16700705,"url":"https://github.com/bolajiayodeji/cl-sendgrid-webhooks","last_synced_at":"2026-03-18T21:32:40.195Z","repository":{"id":112519615,"uuid":"543525431","full_name":"BolajiAyodeji/cl-sendgrid-webhooks","owner":"BolajiAyodeji","description":"Sample code and templates for sending emails to customers using Commerce Layer Webhooks, Zapier Code Runner, Nodejs, and SendGrid API. ","archived":false,"fork":false,"pushed_at":"2024-03-18T11:34:43.000Z","size":59,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-21T00:36:36.696Z","etag":null,"topics":["commercelayer","ecommerce","sendgrid","sendgrid-mail","zapier"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BolajiAyodeji.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-09-30T09:30:41.000Z","updated_at":"2023-08-25T11:59:59.000Z","dependencies_parsed_at":"2024-03-18T12:43:23.691Z","dependency_job_id":"5c1dd838-8526-492d-a0af-23baaacda22b","html_url":"https://github.com/BolajiAyodeji/cl-sendgrid-webhooks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BolajiAyodeji%2Fcl-sendgrid-webhooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BolajiAyodeji%2Fcl-sendgrid-webhooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BolajiAyodeji%2Fcl-sendgrid-webhooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BolajiAyodeji%2Fcl-sendgrid-webhooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BolajiAyodeji","download_url":"https://codeload.github.com/BolajiAyodeji/cl-sendgrid-webhooks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243532532,"owners_count":20306152,"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","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":["commercelayer","ecommerce","sendgrid","sendgrid-mail","zapier"],"created_at":"2024-10-12T18:11:44.810Z","updated_at":"2026-01-02T02:27:20.471Z","avatar_url":"https://github.com/BolajiAyodeji.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cl-sendgrid-webhooks\n\nSample code and templates for sending emails to customers using Commerce Layer Webhooks, Zapier Code Runner, Nodejs, and SendGrid API. To get started, kindly read [this comprehensive tutorial](https://commercelayer.io/blog/how-to-send-templated-emails-with-commerce-layer-and-sendgrid) on Commerce Layer's blog.\n\n---\n\n1. Add your credentials in `.env`:\n\n```text\nSENDGRID_API_KEY=\"\"\nSENDGRID_TEMPLATE_ID=\"\"\nCL_SHARED_SECRET=\"\"\n```\n\n2. Start the local server:\n\n```bash\nnode server.js\n```\n\n3. Start a ngrok HTTP tunnel listening for HTTP/HTTPS traffic on port 9000:\n\n```bash\nngrok http 9000\n```\n\n4. Create a new `orders.place` webhook using the CLI:\n\n```bash\ncl webhooks:create \\\n   -n \"Order Confirmation Emails\" \\\n   -t \"orders.place\" \\\n   -u \"https://98ec-104-28-230-121.eu.ngrok.io/callback\" \\\n   -i \"customer,line_items,shipping_address,billing_address,shipments.shipping_method,payment_method,payment_source,market\"\n```\n\n5. Place a new order using Commerce Layer [Demo Stores](https://github.com/commercelayer/demo-store), [Hosted Microstore](https://github.com/commercelayer/commercelayer-microstore), or the [CLI Checkout Plugin](https://github.com/commercelayer/commercelayer-cli-plugin-checkout).\n\n```bash\ncl plugins:install checkout\n```\n\n```bash\ncommercelayer checkout -O \u003corder-id\u003e\n\nor\n\ncl checkout -S \u003csku-code-1\u003e -S \u003csku-code-2\u003e -m \u003cmarket-id\u003e -e \u003cemail-address\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolajiayodeji%2Fcl-sendgrid-webhooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbolajiayodeji%2Fcl-sendgrid-webhooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolajiayodeji%2Fcl-sendgrid-webhooks/lists"}