Read and write files in the user’s Google Drive or OneDrive, and build reports as Sheets and Docs.
Google Drive: full CRUD over the files Hermoso created in th…
save_to_drive#
Save file(s) to Google Drive
Save a Hermoso render — or ANY file — into the user’s connected Google Drive. Pass a Hermoso render URL as url (or urls[] for several); for a local/external file, call upload_file first and pass the url it returns. Optional folder (created if new) + name. Returns the Drive file(s) with a webViewLink. Needs Google Drive connected (Settings ▸ Connectors ▸ Google Drive — one connection covers Drive, Sheets and Docs). NOTE: Hermoso uses the drive.file scope, so it reaches ONLY the files it created plus any the user explicitly handed over with the Google file picker in the app — never their whole Drive.
| Parameter | Type | Description |
|---|
url | string | a single Hermoso render URL to save |
urls | string[] | several render URLs (up to 20) to save in one call |
folder | string | Drive folder name to save into (created if new) |
name | string | file name (single save) |
list_drive_files#
List Google Drive files read-only
List the Google Drive files & folders Hermoso can reach — the ones it created, plus any the user handed over with the Google file picker in the app (the drive.file scope exposes nothing else, never their entire Drive). This is how you find the id of a file the user picked. Filter by query (name contains …), folderId (contents of a folder), or onlyFolders:true. Paginate with pageToken. Read-only.
| Parameter | Type | Description |
|---|
query | string | only files whose name contains this |
folderId | string | list the contents of this folder id |
onlyFolders | boolean | list folders only |
pageSize | number | rows per page (1–200, default 50) |
pageToken | string | cursor from a previous call |
includeTrashed | boolean | include trashed files (default false) |
get_drive_file#
Get a Drive file’s details read-only
Fetch one Drive file’s metadata — name, type, size, modified time, a webViewLink to open it and a webContentLink to download it. Pass fileId (from list_drive_files). Read-only.
| Parameter | Type | Description |
|---|
fileIdrequired | string | the Drive file id (from list_drive_files) |
update_drive_file#
Rename / move / trash a Drive file
Update a Drive file: rename (name), move it into a folder (moveToFolderId, optionally removeFromFolderId to move OUT of the old one), or trash / untrash it (trash:true|false). Pass fileId (from list_drive_files). To delete permanently, use delete_drive_file.
| Parameter | Type | Description |
|---|
fileIdrequired | string | the Drive file id |
name | string | new name |
moveToFolderId | string | folder id to move the file into (from create_drive_folder / list_drive_files) |
removeFromFolderId | string | the old parent folder id to remove (when moving) |
trash | boolean | true → move to Trash; false → restore from Trash |
delete_drive_file#
Delete a Drive file destructive
Delete a Drive file. By default it goes to Trash (recoverable); pass permanent:true to delete it forever. Pass fileId (from list_drive_files) + confirm:true. Irreversible when permanent — confirm with the user first.
| Parameter | Type | Description |
|---|
fileIdrequired | string | the Drive file id |
permanent | boolean | true = delete forever; default trashes (recoverable) |
confirm | boolean | REQUIRED true |
create_drive_folder#
Create a Drive folder
Create a folder in the user’s Google Drive (optionally nested under parentId) to organize saved files. Returns the folder id + webViewLink. Use that ID as update_drive_file’s moveToFolderId or as parentId for a nested folder. NOTE: save_to_drive’s `folder` is a NAME, not this id — it find-or-creates a folder by that name, so pass the folder NAME there (or omit and just save, then move with update_drive_file).
| Parameter | Type | Description |
|---|
namerequired | string | folder name |
parentId | string | parent folder id for a nested folder (default: Drive root) |
Google Sheets: export structured data to a spreadsheet the a…
create_sheet#
Create a Google Sheet
Create a new Google Spreadsheet in the user’s Drive and optionally fill it with rows — e.g. export a swipefile, ad list, or performance report. Pass rows as an array of row arrays (first row = headers). Returns the spreadsheet id + URL. Needs Google Drive connected (Settings ▸ Connectors ▸ Google Drive — one connection covers Drive, Sheets and Docs).
| Parameter | Type | Description |
|---|
title | string | spreadsheet title |
rows | string | number | boolean[][] | rows to write — array of row arrays; first row = headers |
append_to_sheet#
Append rows to a Google Sheet
Append rows to a Google Sheet Hermoso can reach — one it created (pass the spreadsheetId from create_sheet) or one the user handed over with the Google file picker in the app (find its id with list_drive_files). rows = array of row arrays.
| Parameter | Type | Description |
|---|
spreadsheetIdrequired | string | the spreadsheet id from create_sheet |
rowsrequired | string | number | boolean[][] | rows to append — array of row arrays |
range | string | range to append at (default A1 / first sheet) |
read_sheet#
Read a Google Sheet range read-only
Read cells from a Google Sheet Hermoso can reach — one it created, or one the user handed over with the Google file picker in the app (that is how an EXISTING spreadsheet becomes readable; find its id with list_drive_files). Pass the spreadsheetId (from create_sheet) OR paste a Google Sheets URL as sheetUrl. If Google answers that the file was not found, the user has not picked it yet — ask them to pick it in the app rather than retrying. Returns a 2-D array of values.
| Parameter | Type | Description |
|---|
spreadsheetId | string | the spreadsheet id (from create_sheet) |
sheetUrl | string | a Google Sheets URL to read — the spreadsheet id is extracted from it |
range | string | A1 range, e.g. "A1:D50" (default A1:Z1000) |
Google Docs: export copy / brief / report as a doc the app c…
create_doc#
Create a Google Doc
Create a new Google Doc in the user’s Drive with a title + optional body text — e.g. export ad copy, a creative brief, or a report. Returns the document id + URL. Needs Google Drive connected (Settings ▸ Connectors ▸ Google Drive — one connection covers Drive, Sheets and Docs).
| Parameter | Type | Description |
|---|
title | string | document title |
text | string | body text to insert |
append_to_doc#
Append text to a Google Doc
Append text to the end of a Google Doc Hermoso can reach — one it created (pass the documentId from create_doc) or one the user handed over with the Google file picker in the app (find its id with list_drive_files).
| Parameter | Type | Description |
|---|
documentIdrequired | string | the document id from create_doc |
textrequired | string | text to append at the end of the doc |
read_doc#
Read a Google Doc read-only
Read the text of a Google Doc Hermoso can reach — one it created, or one the user handed over with the Google file picker in the app (that is how an EXISTING doc becomes readable; find its id with list_drive_files). Pass documentId (from create_doc) OR paste a Google Docs URL as docUrl. Under the drive.file scope it reaches nothing else in the user’s Drive; if Google answers that the file was not found, the user has not picked it yet — ask them to pick it in the app rather than retrying. Returns the plain text. Read-only, free.
| Parameter | Type | Description |
|---|
documentId | string | the document id (from create_doc) |
docUrl | string | a Google Docs URL to read — the document id is extracted from it |
Microsoft OneDrive: full CRUD over the user's OneDrive
save_to_onedrive#
Save file(s) to OneDrive
Save a Hermoso render — or ANY file — into the user’s connected Microsoft OneDrive. Pass a Hermoso render URL as url (or urls[] for several); for a local/external file, call upload_file first and pass the url it returns. Optional folder (created if new) + name. Returns the OneDrive file(s) with a webViewLink. Needs OneDrive connected (Settings ▸ Connectors ▸ OneDrive).
| Parameter | Type | Description |
|---|
url | string | a single Hermoso render URL to save |
urls | string[] | several render URLs (up to 20) to save in one call |
folder | string | OneDrive folder name to save into (created if new) |
name | string | file name (single save) |
list_onedrive_files#
List OneDrive files read-only
List files & folders in the user’s OneDrive — the root by default, a folder’s contents (folderId), or a name search (query). onlyFolders:true lists folders only. Paginate with pageToken (the cursor from a previous call). Read-only.
| Parameter | Type | Description |
|---|
query | string | search — only items whose name matches this |
folderId | string | list the contents of this folder id |
onlyFolders | boolean | list folders only |
pageSize | number | rows per page (1–200, default 50) |
pageToken | string | cursor from a previous call |
get_onedrive_file#
Get a OneDrive file’s details read-only
Fetch one OneDrive item’s metadata — name, type, size, modified time, a webViewLink to open it and a webContentLink to download it. Pass fileId (from list_onedrive_files). Read-only.
| Parameter | Type | Description |
|---|
fileIdrequired | string | the OneDrive item id (from list_onedrive_files) |
update_onedrive_file#
Rename / move a OneDrive file
Update a OneDrive item: rename (name) and/or move it into a folder (moveToFolderId). Pass fileId (from list_onedrive_files). To remove an item, use delete_onedrive_file.
| Parameter | Type | Description |
|---|
fileIdrequired | string | the OneDrive item id |
name | string | new name |
moveToFolderId | string | folder id to move the item into (from create_onedrive_folder / list_onedrive_files) |
delete_onedrive_file#
Delete a OneDrive file destructive
Delete a OneDrive item — it moves to the OneDrive recycle bin (recoverable there). Pass fileId (from list_onedrive_files) + confirm:true. Confirm the exact file with the user first.
| Parameter | Type | Description |
|---|
fileIdrequired | string | the OneDrive item id |
confirm | boolean | REQUIRED true |
convert_onedrive_file#
Convert a OneDrive file to PDF or JPG read-only
Turn a file already in the user’s OneDrive into a PDF or a JPG — Microsoft does the conversion on its own servers, so nothing is re-encoded here and nothing is lost in a screenshot. It reads about 130 source formats, which is the point: PowerPoint and Word decks, Excel, Photoshop PSD, Illustrator AI, Sketch, 3D (fbx/glb/obj), video (mp4/mov/webm), HEIC from an iPhone, and the raw camera formats (CR2, NEF, ARW, DNG) that nothing else in this product can open. Use it to turn a client’s deck into images you can actually put in an ad, to get a usable JPG out of a designer’s PSD or a photographer’s raw file, or to hand someone a PDF of a spreadsheet. CONVERTING TO JPG REQUIRES BOTH width AND height — Microsoft refuses the call without them. The result is stored at a durable Hermoso URL you can pass straight to a render or a post; Microsoft’s own conversion link expires within minutes, so do not hand that one to anyone. Needs OneDrive connected — no new permission.
| Parameter | Type | Description |
|---|
fileIdrequired | string | the OneDrive item id, from list_onedrive_files |
format | "pdf" | "jpg" | default pdf |
width | number | REQUIRED for jpg — output width in pixels |
height | number | REQUIRED for jpg — output height in pixels |
create_onedrive_folder#
Create a OneDrive folder
Create a folder in the user’s OneDrive (optionally nested under parentId) to organize saved files. Returns the folder id + webViewLink. Use that id as update_onedrive_file’s moveToFolderId or as parentId for a nested folder. NOTE: save_to_onedrive’s `folder` is a NAME (find-or-created), not this id.
| Parameter | Type | Description |
|---|
namerequired | string | folder name |
parentId | string | parent folder id for a nested folder (default: OneDrive root) |