-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgoogle-drive-parserdata.json
More file actions
141 lines (141 loc) · 3.7 KB
/
google-drive-parserdata.json
File metadata and controls
141 lines (141 loc) · 3.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
{
"name": "Google Drive → ParserData Extraction → JSON",
"flow": [
{
"id": 1,
"module": "google-drive",
"action": "watchFiles",
"config": {
"folderId": "YOUR_INPUT_FOLDER_ID",
"triggers": ["FILE_CREATED"],
"pollingInterval": 900
},
"notes": "Watch for new files in the input folder. Polling interval: 15 minutes (900 seconds)."
},
{
"id": 2,
"module": "google-drive",
"action": "downloadFile",
"config": {
"fileId": "{{1.data[].id}}"
},
"notes": "Download the detected file as binary data."
},
{
"id": 3,
"module": "http",
"action": "makeRequest",
"config": {
"method": "POST",
"url": "https://api.parserdata.com/v1/extract",
"headers": [
{
"name": "X-API-Key",
"value": "{{env.PARSERDATA_API_KEY}}"
}
],
"body": {
"type": "multipart/form-data",
"fields": [
{
"name": "prompt",
"value": "Extract invoice number, invoice date, supplier name, total amount, and line items (description, quantity, unit price, net amount).",
"type": "text"
},
{
"name": "options",
"value": "{\"return_schema\":false,\"return_selected_fields\":false}",
"type": "text"
},
{
"name": "file",
"value": "{{2.data}}",
"type": "file"
}
]
},
"timeout": 300000,
"retryPolicy": {
"maxRetries": 3,
"retryOn": [429, 500, 502, 503, 504],
"exponentialBackoff": true
}
},
"notes": "Send file to ParserData API for extraction. Includes 3 retries with exponential backoff for rate limits and server errors."
},
{
"id": 4,
"module": "json",
"action": "parse",
"config": {
"data": "{{3.data}}"
},
"notes": "Parse the API response JSON."
},
{
"id": 5,
"module": "tools",
"action": "setVariables",
"config": {
"variables": [
{
"name": "extractedData",
"value": "{{4.result}}"
},
{
"name": "fileName",
"value": "{{4.file_name}}"
},
{
"name": "outputFileName",
"value": "{{replace(fileName, '/\\.[^.]+$/', '')}}_extracted.json"
}
]
},
"notes": "Extract relevant fields and generate output filename."
},
{
"id": 6,
"module": "json",
"action": "createJSON",
"config": {
"data": {
"fileName": "{{5.fileName}}",
"extractedData": "{{5.extractedData}}",
"processedAt": "{{now}}"
}
},
"notes": "Create clean JSON output with extracted data."
},
{
"id": 7,
"module": "google-drive",
"action": "uploadFile",
"config": {
"folderId": "YOUR_OUTPUT_FOLDER_ID",
"fileName": "{{5.outputFileName}}",
"content": "{{6.data}}",
"mimeType": "application/json"
},
"notes": "Upload extracted JSON to output folder."
}
],
"triggers": {
"schedule": {
"type": "polling",
"interval": 900
}
},
"errorHandling": {
"onError": "logAndContinue",
"maxErrorsBeforeStop": 5,
"notificationEnabled": true
},
"metadata": {
"version": "1.0.0",
"description": "ParserData Google Drive Document Extraction Workflow",
"tags": ["parserdata", "google-drive", "document-extraction", "automation"],
"createdAt": "2026-02-23",
"lastModified": "2026-02-23"
}
}