> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuroncx.in/llms.txt
> Use this file to discover all available pages before exploring further.

# WF Trigger with Sheet Supplied Initial Variable (Type 19)

> Trigger a workflow for each row in a Google Sheet, using a date and user mobile number as the input variables.

## Overview

This import triggers a workflow once per row in your Google Sheet, using the date and mobile number in each row as the starting input. It's designed for scenarios where a workflow needs to run for a specific user on a specific date — for example, triggering a call assessment for a patient on the date their appointment occurred.

For each row, NeuronCx looks up the user by their mobile number, finds their latest transaction, and fires the selected workflow with the date from the sheet passed in as the starting variable.

> [!NOTE]
>
> You need to select the workflow you want to trigger before running the import. The import won't fire any workflow on its own — the workflow selection is part of the run setup.

***

## Prerequisites

* Your Google Sheet must be shared with edit access so NeuronCx can read from it.
* The sheet must contain the two required columns — `date` and the user mobile number column.
* The workflow you want to trigger must already exist and be configured for your institution.
* The mobile numbers in your sheet must match users who already exist in NeuronCx. Rows where the number doesn't match an existing user will be skipped.

***

## Preparing Your Sheet

Your sheet must include the following two columns. NeuronCx reads one row at a time and uses these values to find the right user and fire the workflow.

| Column | Required | Notes |
| - | - | - |
| `date` | ✅ Yes | The date to pass into the workflow. Format: `YYYY-MM-DD` |
| User mobile number | ✅ Yes | The mobile number of the user the workflow should run for. Must match an existing user in NeuronCx |

![Screenshot 2026 08 29 143940](https://mintcdn.com/neuroncx/HdYTHESpflEAbZiI/images/Screenshot-2026-08-29-143940.png?fit=max\&auto=format\&n=HdYTHESpflEAbZiI\&q=85\&s=5e59d79f8acd06c79a32eac4b556f5e6)

> [!TIP]
>
> Make sure the date column header in your sheet exactly matches what's configured in the import mapping. The column name is case-sensitive.

> [!TIP]
>
> Mobile numbers should be entered without country code prefix formatting inconsistencies — use the same format as stored in NeuronCx to ensure the user lookup succeeds.

***

## Running the Import

### Setting up a new import

**1. Open Imports**

Navigate to **Home > Ontology > Attribute Settings & Bulk Edit**, then click the **Imports** tab.

**2. Click + Import**

Click the **+ Import** button in the top right to open the New Import modal.

**3. Give it a label**

Enter a name that describes this import — for example, "Call Assessment Date Trigger."

![Label 10](https://mintcdn.com/neuroncx/o3kwwiRRl43oHlUr/images/label-10.png?fit=max\&auto=format\&n=o3kwwiRRl43oHlUr\&q=85\&s=8b6a0063312891f422f170eceed5c9a9)

**4. Add the Google Sheet ID**

Paste the sheet ID or the full Google Sheets URL — NeuronCx will extract the ID automatically.

![Sheet Id 4](https://mintcdn.com/neuroncx/o3kwwiRRl43oHlUr/images/sheet_id-4.png?fit=max\&auto=format\&n=o3kwwiRRl43oHlUr\&q=85\&s=c0e854e18d5ae98536fcf22a1b9c8a63)

**5. Verify**

Click **Verify**. NeuronCx confirms it can read the sheet and shows you the row and column count — use this to catch an empty or wrong sheet before continuing.

![Verify 12](https://mintcdn.com/neuroncx/o3kwwiRRl43oHlUr/images/verify-12.png?fit=max\&auto=format\&n=o3kwwiRRl43oHlUr\&q=85\&s=b037b6ae3ff0e061b16a2571c8bb02af)

**6. Select the import type**

In the Import type panel on the left, select **Workflow Triggers**. Then choose **WF trigger with sheet supplied initial\_variable** (`#19`) from the list on the right.

![Import Type 6](https://mintcdn.com/neuroncx/o3kwwiRRl43oHlUr/images/import-type-6.png?fit=max\&auto=format\&n=o3kwwiRRl43oHlUr\&q=85\&s=9ca4cd91af2b7d7abd8203ed7dfea586)

**7. Create the import**

Click **Create import**. The import now appears in your list under Workflow Triggers, ready to run.

![Create Import 2](https://mintcdn.com/neuroncx/o3kwwiRRl43oHlUr/images/create-import-2.png?fit=max\&auto=format\&n=o3kwwiRRl43oHlUr\&q=85\&s=bc3f3ade560ee02524ddfcc48a0c4edc)

### Running the import

**1. Find the import**

From the Data Import list, locate the import you just created. You can filter by **Workflow Triggers** to narrow the list.

**2. Open the import**

Click the arrow icon on the import row to open it.

**3. Select the workflow**

Before running, select the workflow you want to trigger from the workflow dropdown. Only workflows configured for your institution will appear.

The workflow must be selected before clicking Import — the trigger won't fire without it.

**4. Click Import**

Click **Import** to run it. NeuronCx reads each row, looks up the user by mobile number, and fires the selected workflow with the date from that row.

***

## What Happens When the Import Runs

For each row in your sheet, NeuronCx does the following:

1. Reads the mobile number and date from the row.
2. Looks up the user in NeuronCx by their mobile number.
3. Fetches the user's latest transaction and the relevant workflow block.
4. Fires the selected workflow with the date from the sheet passed in as the starting variable.

Rows where the mobile number doesn't match an existing user are skipped — they won't appear as errors in the run log.

***

## Checking the Result

Once the run completes, the history table shows how many rows were read and how many workflow triggers were fired. Click a run's **Status** to open a detailed breakdown showing which rows succeeded and which were skipped.

> [!TIP]
>
> If fewer workflows were triggered than you expected, check that all mobile numbers in your sheet match users who exist in NeuronCx, and that the date column is formatted correctly as YYYY-MM-DD.

***

## Limits to Keep in Mind

* A workflow must be selected before running the import — the import alone does not trigger anything.
* The `date` column must follow the `YYYY-MM-DD` format. Incorrect date formats may cause that row to be skipped.
* Mobile numbers must match existing users in NeuronCx. Rows with unrecognised numbers are skipped silently.
* Each row triggers one workflow instance. If a user has multiple rows in the sheet, the workflow is triggered once per row.
* Only one import runs at a time. If another import is already running, this one will queue and wait its turn.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.