Deleting users
You can use the REST API to delete users from your project using the DELETE
call or with your make.com (formerly Integromat) account.
Deleting users using DELETE
DELETE
To delete users from your project using the REST API, you need to use the DELETE
call with the uid
s of the visitor you want to delete.
Deleting one user
To delete one user, enter the user ID value. User IDs are provided by Smartlook and you can find them in any session.
// To delete one visitor
DELETE https://api.eu.smartlook.cloud/api/v1/visitors/visitor-uid
Deleting multiple users
To delete multiple users, enter the UID
s of the users you want to delete. UID
s are assigned to your users using the Identify API.
// To delete multiple visitors
DELETE https://api.eu.smartlook.cloud/api/v1/visitors/visitors?uids=visitor-uid1,visitor-uid2
For more information, see Delete visitor or Delete visitors in the API reference.
Deleting users using make.com
You can also delete users from your project using make.com (formerly Integromat).
To delete users with make.com, you need to have:
- your make.com account
- a Google Sheet with the user UIDs you want to delete in the first column
When you have these ready, you can delete users using make.com's Blueprint feature, or by creating a scenario.
Using Blueprint on make.com
In your make.com account, you can use the Blueprint feature and the JSON file we prepared.
- Go to your make.com account and click Import Blueprint.
- Enter the JSON in the code sample below and then click Run once.
{ "name": "Integration Google Sheets", "flow": [ { "id": 1, "module": "google-sheets:filterRows", "version": 2, "parameters": { "__IMTCONN__": 505432 }, "mapper": { "from": "drive", "valueRenderOption": "FORMATTED_VALUE", "dateTimeRenderOption": "FORMATTED_STRING", "limit": "300", "spreadsheetId": "", "sheetId": "Sheet1", "includesHeaders": false, "tableFirstRow": "A1:Z1", "filter": [ [ { "a": "A", "o": "exist" } ] ], "sortOrder": "asc" }, "metadata": { "designer": { "x": 0, "y": 0 }, "restore": { "parameters": { "__IMTCONN__": { "label": "My Google connection", "data": { "scoped": "true", "connection": "google" } } }, "expect": { "from": { "label": "Select from My Drive" }, "valueRenderOption": { "mode": "chose", "label": "Formatted value" }, "dateTimeRenderOption": { "mode": "chose", "label": "Formatted string" }, "spreadsheetId": { "mode": "chose", "label": "Delete Visitors" }, "sheetId": { "mode": "chose", "label": "Sheet1" }, "includesHeaders": { "mode": "chose", "label": "No" }, "tableFirstRow": { "label": "A-Z" }, "sortOrder": { "mode": "chose", "label": "Ascending" }, "orderBy": { "mode": "chose" } } }, "parameters": [ { "name": "__IMTCONN__", "type": "account:google", "label": "Connection", "required": true } ], "expect": [ { "name": "from", "type": "select", "label": "Enter a Spreadsheet ID and Sheet Name", "required": true, "validate": { "enum": [ "drive", "share" ] } }, { "name": "valueRenderOption", "type": "select", "label": "Value render option", "validate": { "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" ] } }, { "name": "dateTimeRenderOption", "type": "select", "label": "Date and time render option", "validate": { "enum": [ "SERIAL_NUMBER", "FORMATTED_STRING" ] } }, { "name": "limit", "type": "number", "label": "Maximum number of returned rows" }, { "name": "spreadsheetId", "type": "select", "label": "Spreadsheet", "required": true }, { "name": "sheetId", "type": "select", "label": "Sheet Name", "required": true }, { "name": "includesHeaders", "type": "select", "label": "Table contains headers", "required": true, "validate": { "enum": [ true, false ] } }, { "name": "tableFirstRow", "type": "select", "label": "Column range", "required": true, "validate": { "enum": [ "A1:Z1", "A1:BZ1", "A1:CZ1", "A1:DZ1", "A1:MZ1", "A1:ZZ1", "A1:AZZ1", "A1:BZZ1", "A1:CZZ1", "A1:DZZ1", "A1:MZZ1", "A1:ZZZ1" ] } }, { "name": "filter", "type": "filter", "label": "Filter", "options": "rpc://google-sheets/2/rpcGetFilterKeys?includesHeaders=false" }, { "name": "sortOrder", "type": "select", "label": "Sort order", "validate": { "enum": [ "asc", "desc" ] } }, { "name": "orderBy", "type": "select", "label": "Order by" } ], "interface": [ { "name": "__IMTLENGTH__", "label": "Total number of bundles", "type": "uinteger" }, { "name": "__IMTINDEX__", "label": "Bundle order position", "type": "uinteger" }, { "name": "__ROW_NUMBER__", "label": "Row number", "type": "number" }, { "name": "__SPREADSHEET_ID__", "label": "Spreadsheet ID", "type": "text" }, { "name": "__SHEET__", "label": "Sheet", "type": "text" }, { "name": "0", "label": "A", "type": "text" }, { "name": "1", "label": "B", "type": "text" }, { "name": "2", "label": "C", "type": "text" }, { "name": "3", "label": "D", "type": "text" }, { "name": "4", "label": "E", "type": "text" }, { "name": "5", "label": "F", "type": "text" }, { "name": "6", "label": "G", "type": "text" }, { "name": "7", "label": "H", "type": "text" }, { "name": "8", "label": "I", "type": "text" }, { "name": "9", "label": "J", "type": "text" }, { "name": "10", "label": "K", "type": "text" }, { "name": "11", "label": "L", "type": "text" }, { "name": "12", "label": "M", "type": "text" }, { "name": "13", "label": "N", "type": "text" }, { "name": "14", "label": "O", "type": "text" }, { "name": "15", "label": "P", "type": "text" }, { "name": "16", "label": "Q", "type": "text" }, { "name": "17", "label": "R", "type": "text" }, { "name": "18", "label": "S", "type": "text" }, { "name": "19", "label": "T", "type": "text" }, { "name": "20", "label": "U", "type": "text" }, { "name": "21", "label": "V", "type": "text" }, { "name": "22", "label": "W", "type": "text" }, { "name": "23", "label": "X", "type": "text" }, { "name": "24", "label": "Y", "type": "text" }, { "name": "25", "label": "Z", "type": "text" } ] } }, { "id": 2, "module": "builtin:BasicAggregator", "version": 1, "parameters": { "feeder": 1 }, "mapper": { "0": "{{1.`0`}}" }, "metadata": { "designer": { "x": 300, "y": 0 }, "restore": { "extra": { "feeder": { "label": "Google Sheets - Search Rows [1]" }, "target": { "label": "Custom" } } } } }, { "id": 3, "module": "smartlook:deleteVisitors", "version": 1, "parameters": { "__IMTCONN__": 1103343 }, "mapper": { "uids": "{{map(2.array; 0; )}}" }, "metadata": { "designer": { "x": 600, "y": 0 }, "restore": { "parameters": { "__IMTCONN__": { "label": "", "data": { "scoped": "true", "connection": "smartlook2" } } }, "expect": { "uids": { "mode": "edit" } } }, "parameters": [ { "name": "__IMTCONN__", "type": "account:smartlook2", "label": "Connection", "required": true } ], "expect": [ { "name": "uids", "type": "array", "label": "Uids", "required": true, "spec": { "type": "text", "label": "uid", "name": "value" } }, { "name": "uids", "type": "array", "label": "Uids", "required": true, "spec": { "type": "text", "label": "uid", "name": "value" } } ] } } ], "metadata": { "instant": false, "version": 1, "scenario": { "roundtrips": 1, "maxErrors": 3, "autoCommit": true, "autoCommitTriggerLast": true, "sequential": false, "confidential": false, "dataloss": false, "dlq": false, "freshVariables": false }, "designer": { "orphans": [] }, "zone": "eu1.make.com" } }
- Click Run once.
Creating a scenario
To delete users from your account using a scenario:
- Create a new scenario.
- Click Add a module, then Google Sheets, and then Search Rows.
- Connect your Google Sheet and set Filter to first column.
- Click Run once and check to be sure your UIDs are shown in the response.
- If everything is good, click Add another module, then Flow control, and then Array Aggregator.
- Under Aggregated fields, choose A, where your UIDs are located. Then click OK.
- Click Run once again. The response should contain an array that contains your UIDs.
- Click Add another module, then Smartlook, and then Delete Visitors.
- Add your REST API connection.
- Enable the Map switch and enter
map(
, and then chooseArray[]
. Complete the formula by adding;0;)
.
- Click Run once. The response will show the number of deleted visitors.
Updated over 1 year ago