Skip to content

Commit 80c40cf

Browse files
authored
Update README.md
1 parent 3eebf23 commit 80c40cf

File tree

1 file changed

+46
-6
lines changed

1 file changed

+46
-6
lines changed

README.md

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,17 @@ $syncStatus = N8nClient::sourceControl()->pull([
216216
**Example:**
217217

218218
```php
219-
$tag = N8nClient::tags()->create(['name' => 'Marketing']);
220-
$updated = N8nClient::tags()->update($tag['id'], ['name' => 'Sales']);
221-
$all = N8nClient::tags()->list();
219+
// List all tags
220+
$tags = N8nClient::tags()->list();
221+
222+
// Create a tag
223+
$newTag = N8nClient::tags()->create(['name' => 'marketing']);
224+
225+
// Update a tag
226+
N8nClient::tags()->update($newTag['id'], ['name' => 'marketing-2025']);
227+
228+
// Delete a tag
229+
N8nClient::tags()->delete($newTag['id']);
222230
```
223231

224232
### 🙍 Users
@@ -234,13 +242,19 @@ $all = N8nClient::tags()->list();
234242
**Example:**
235243

236244
```php
245+
//list users
246+
N8nClient::users()->list();
247+
237248
// Invite users
238249
N8nClient::users()->create([
239250
['email' => '[email protected]', 'role' => 'member']
240251
]);
241252

242253
// Promote to admin
243254
N8nClient::users()->changeRole('[email protected]', 'admin');
255+
256+
// delete a user
257+
N8nClient::users()->delete('[email protected]');
244258
```
245259

246260
### 🔠 Variables
@@ -255,6 +269,9 @@ N8nClient::users()->changeRole('[email protected]', 'admin');
255269
**Example:**
256270

257271
```php
272+
// list all variable
273+
N8nClient::variables()->list()
274+
258275
// Create a new variable
259276
N8nClient::variables()->create(['key' => 'ENV_MODE', 'value' => 'production']);
260277

@@ -283,9 +300,32 @@ N8nClient::variables()->delete('ENV_MODE');
283300
**Example:**
284301

285302
```php
286-
// Create and activate a workflow
287-
$wf = N8nClient::workflows()->create([...]);
288-
N8nClient::workflows()->activate($wf['id']);
303+
// Create and a workflow
304+
$workflow = N8nClient::workflows()->create([
305+
'name' => 'Daily Report',
306+
'nodes' => [...], // full JSON definition
307+
'connections' => [...],
308+
]);
309+
310+
//Activate the workflow
311+
N8nClient::workflows()->activate($workflow['id']);
312+
313+
//Deactivate the workflow
314+
N8nClient::workflows()->deactivate($workflow['id']);
315+
316+
//update the workflow.
317+
N8nClient::workflows()->update($workflow['id'],[...]);
318+
319+
//Move a workflow to a different project.
320+
N8nClient::workflows()->transfer($workflow['id'],$destinationProjectId);
321+
322+
//Get all tags associated with the workflow.
323+
N8nClient::workflows()->tags($workflow['id']);
324+
325+
// update workflow tags.
326+
N8nClient::workflows()->updateTags($workflow['id']);
327+
328+
//Delete the workflow.
289329

290330
```
291331

0 commit comments

Comments
 (0)