Skip to main content

Webhooks: Send assignment completions to a spreadsheet

Add a row to a Google Sheet each time someone completes an assignment, using a PlusPlus webhook and an automation tool such as Zapier or Make.

Written by Michael Wallace

Scenario

You track completions in a Google Sheet. You want a row added as soon as someone completes an assignment, instead of exporting and pasting data.

Solution

A spreadsheet can't receive webhook events by itself. PlusPlus sends each assignment.completed event to an automation tool you choose, and the tool adds the row. Zapier and Make are common choices. They are third-party tools, not PlusPlus integrations.

  1. Create the receiving workflow. In your automation tool, create a workflow that starts with a step that receives a webhook. Copy the HTTPS URL the tool gives you.

  2. Register the webhook in PlusPlus. Use one of these paths:

    • Register it yourself (no token needed). Follow the steps in Webhooks: Register and manage webhooks. Name the webhook for its purpose, for example Assignment tracker – Sheets, and paste in the URL from step 1. Select only Assignment completed. Selecting the whole Assignment group sends all 8 assignment events.

    • Let your tool register it. Create an API token with Custom access and only Webhooks: Read & write selected, then add the token to your tool. See How to manage API tokens. If the tool asks for the event name, enter assignment.completed exactly. It's singular, and the API rejects unknown names.

  3. Send a test event. Open the webhook's context menu (button with three dots) and select Send test event, then confirm that your tool received the ping. To get a real sample for mapping fields, complete a test assignment.

  4. Map fields to columns. See the field list below these steps.

  5. Prevent duplicate rows. Events can arrive more than once. Before adding a row, have your workflow check whether the event ID already exists in the sheet.

  6. Turn on the workflow.

Useful fields for step 4:

Column

Field

Event ID

id

Learner

data.object.user.name

Email

data.object.user.email

Content

data.object.content_item.name

Content type

data.object.content_item.content_type

Completed

data.object.completed_datetime

Due date

data.object.due_date

Score

data.object.score

Go deeper

Verifying that events come from PlusPlus

Verification needs the request headers and the webhook's signing secret. If your tool can't read headers or run verification code, treat the endpoint URL as a secret, because anyone who has it could add rows. Google Apps Script web apps fall into this group: their request object doesn't include headers, so they can't verify signatures.

Why the token only needs Webhooks access

The event already includes the learner's name and email and the content item's name. Your tool doesn't call the PlusPlus API to look anything up. If you later want more data, such as a learner's groups, the token needs the matching read access.

Undone completions

If a completion is undone, PlusPlus sends assignment.completion_undone, not a second completion event. To keep the sheet accurate, subscribe to that event too and have your workflow remove or mark the matching row.

If rows stop appearing

  • Check the webhook's Status. Disabled means deliveries have stopped, often because the endpoint failed repeatedly. Fix the endpoint, then re-enable the webhook through the API (see Webhooks: Register and manage webhooks).

  • Confirm that your workflow is turned on and responds within 5 seconds.

Revoking the token doesn't stop deliveries. To stop the webhook, delete it.

See also

Did this answer your question?