Skip to content

Commit 2c2970e

Browse files
Pigs 74 workflow examples (#4)
Added scripts for: employee_policy_onboarding and prepare_pdf_for_distribution Updated scripts for: pii_redaction, batch_process, bulk_password_protect, convert_cli, extract_data, redact_by_keyword Updated plataform_api and created sign_api
1 parent 12853d2 commit 2c2970e

34 files changed

+3506
-335
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,8 @@ __pycache__/
1616
.idea/
1717
*.swp
1818
*.swo
19+
20+
# Serena AI Assistant
21+
.serena/
22+
23+
.plataform-integrations/

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ The Nitro Platform API provides programmatic access to document processing capab
4141

4242
#### Using Postman
4343
1. Import the collection from `postman/Platform-API.postman_collection.json`
44-
2. Configure environment variables (see `postman/README.md`)
45-
3. Get a bearer token and run sample requests
44+
2. Configure collection variables (see `postman/README.md`)
45+
3. Get a bearer token
46+
4. Select test files for each request
47+
5. Run the sample requests
4648

4749
#### Using Power Automate
4850
1. Create a custom connector using instructions in `power-automate/`

postman/README.md

Lines changed: 81 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@ This folder contains the Postman collection for the Nitro Platform API with exam
1111
3. Select `Platform-API.postman_collection.json`
1212
4. The collection will appear in your workspace
1313

14-
### 2. Configure Environment Variables
15-
16-
Create a new environment in Postman with these variables:
17-
18-
| Postman Variable | Python .env Variable | Description | Example Value |
19-
|------------------|---------------------|-------------|---------------|
20-
| `baseUrl` | `PLATFORM_BASE_URL` | API base URL | `https://api.gonitro.dev` |
21-
| `clientID` | `PLATFORM_CLIENT_ID` | Your client ID | `your-client-id` |
22-
| `clientSecret` | `PLATFORM_CLIENT_SECRET` | Your client secret | `your-client-secret` |
14+
### 2. Configure Collection Variables
15+
16+
1. Click on the collection name in the sidebar
17+
2. Go to the **Variables** tab
18+
3. Set the **CURRENT VALUE** for these variables:
19+
20+
| Variable | Description | Example Value |
21+
|----------|-------------|---------------|
22+
| `baseUrl` | API base URL | `https://api.gonitro.dev` |
23+
| `clientID` | Your client ID | `your-client-id` |
24+
| `clientSecret` | Your client secret | `your-client-secret` |
25+
| `repoPath` | Absolute path to this repo | `/Users/you/github/nitro-platform-integrations` |
2326
| `token` | (auto-populated) | Bearer token | `eyJ0eXAiOiJKV1Q...` |
2427

2528
**Note**: If you're also using the Python samples, you can use the same credential values from your `.env` file - just use the Postman variable names shown above.
@@ -41,7 +44,16 @@ The collection is organized into folders:
4144
- **Transformations**: Modify PDFs (compress, merge, split, etc.)
4245
- **Jobs**: Check status and get results for async operations
4346

44-
## Example Workflow
47+
To run them:
48+
1. Select any request (e.g., **Word → PDF**)
49+
2. Go to **Body** tab → **form-data**
50+
3. **Manually select the file** using the file picker:
51+
- Click on the file field
52+
- Navigate to your `repoPath` folder
53+
- Select the appropriate file from the [File Reference Guide](#file-reference-guide) below
54+
4. Click **Send**
55+
56+
### Example Workflow
4557

4658
1. **Get Token**: Run "Get Bearer Token" request
4759
2. **Convert Document**: Use "Word → PDF" with a sample .docx file
@@ -78,3 +90,62 @@ To get your API credentials:
7890
2. Navigate to **Settings****API**
7991
3. Click **Create Application**
8092
4. Name your application and save the Client ID and Client Secret
93+
94+
## Test Files Reference
95+
96+
When testing endpoints in Postman, use these test files for each operation:
97+
98+
### Conversions
99+
100+
| Endpoint | Test File | Location |
101+
|----------|-----------|----------|
102+
| Word → PDF | Analysis.docx | `test_files/test-batch/Analysis.docx` |
103+
| Excel → PDF | Feedback.xlsx | `test_files/test-batch/Feedback.xlsx` |
104+
| PowerPoint → PDF | SamplePPTX.pptx | `test_files/SamplePPTX.pptx` |
105+
| Image → PDF | GoNitro.png | `test_files/GoNitro.png` |
106+
| PDF → Word | SampleResume.pdf | `test_files/test-pdfs/SampleResume.pdf` |
107+
| PDF → Excel | Sample Tables.pdf | `test_files/test-pdfs/Sample Tables.pdf` |
108+
| PDF → Image | SampleResume.pdf | `test_files/test-pdfs/SampleResume.pdf` |
109+
110+
### Extractions
111+
112+
| Endpoint | Test File | Location |
113+
|----------|-----------|----------|
114+
| Extract PDF Text | SampleResume.pdf | `test_files/test-pdfs/SampleResume.pdf` |
115+
| Extract PDF Form Data | BOB - Student-Loan-Application-Form.pdf | `test_files/test-pdfs/BOB - Student-Loan-Application-Form.pdf` |
116+
| Extract PDF Table Data | Sample Tables.pdf | `test_files/test-pdfs/Sample Tables.pdf` |
117+
| Extract and Autodetect Bounding Boxes for PII | SampleResume.pdf | `test_files/test-pdfs/SampleResume.pdf` |
118+
| Extract Bounding Boxes for Strings | SampleResume.pdf | `test_files/test-pdfs/SampleResume.pdf` |
119+
| Get PDF Properties | SampleResume.pdf | `test_files/test-pdfs/SampleResume.pdf` |
120+
| Set PDF Properties | SampleResume.pdf | `test_files/test-pdfs/SampleResume.pdf` |
121+
122+
### Transformations
123+
124+
| Endpoint | Test File | Location |
125+
|----------|-----------|----------|
126+
| Redact Bounding boxes (scrub PII) | SampleResume.pdf | `test_files/test-pdfs/SampleResume.pdf` |
127+
| Compress | BOB - Student-Loan-Application-Form.pdf | `test_files/test-pdfs/BOB - Student-Loan-Application-Form.pdf` |
128+
| Flatten | Sample Tables.pdf | `test_files/test-pdfs/Sample Tables.pdf` |
129+
| Rotate Pages | SampleResume.pdf | `test_files/test-pdfs/SampleResume.pdf` |
130+
| Delete Pages | SampleResume.pdf | `test_files/test-pdfs/SampleResume.pdf` |
131+
| Split | SampleResume.pdf | `test_files/test-pdfs/SampleResume.pdf` |
132+
| Merge | Sample Tables.pdf + SampleResume.pdf | `test_files/test-pdfs/` (multiple files) |
133+
| Password Protect | SampleResume.pdf | `test_files/test-pdfs/SampleResume.pdf` |
134+
| Password Remove | PDF-withpassword.pdf | `test_files/PDF-withpassword.pdf` |
135+
136+
### Available Test Files
137+
138+
All test files are located in the `test_files/` directory:
139+
```
140+
test_files/
141+
├── test-pdfs/
142+
│ ├── SampleResume.pdf # Resume with text and PII
143+
│ ├── Sample Tables.pdf # PDF with table data
144+
│ └── BOB - Student-Loan-Application-Form.pdf # PDF with form fields
145+
├── test-batch/
146+
│ ├── Analysis.docx # Word document
147+
│ └── Feedback.xlsx # Excel spreadsheet
148+
├── SamplePPTX.pptx # PowerPoint presentation
149+
├── GoNitro.png # Sample image
150+
└── PDF-withpassword.pdf # Password-protected PDF
151+
```

0 commit comments

Comments
 (0)