Overview
This node interacts with the "Mes-Démarches" API of French Polynesia to manage and retrieve information about administrative files ("dossiers") related to specific procedures ("démarches"). The "Lister Les Dossiers" operation specifically fetches a list of dossiers for a given démarche, supporting intelligent synchronization modes to efficiently update data.
Common scenarios where this node is beneficial include:
- Automating the retrieval and synchronization of dossier data from the Mes-Démarches platform into other systems or databases.
- Filtering dossiers by their state (e.g., accepted, refused) and sorting them by date.
- Including detailed dossier information such as form fields, annotations, treatment history, instructors, opinions, corrections, and geographic data.
- Incremental synchronization based on last successful sync or a specified date to optimize performance.
Practical example:
- A local government office wants to keep an up-to-date list of all dossiers submitted for a particular administrative procedure. Using this node, they can automatically fetch new or updated dossiers since the last sync, filter by dossier state, and include relevant metadata for further processing or reporting.
Properties
| Name | Meaning |
|---|---|
| Format Des Attributs | Choose how attribute labels are formatted in the output: • Libellés Originaux (recommended for Baserow): uses original field labels as entered. • Format Technique (Snake_case): converts labels to snake_case format. |
| Numéro De Démarche | The number identifying the démarche (procedure) whose dossiers you want to list. This is required. |
| Mode De Synchronisation | Synchronization mode for fetching dossiers: • Auto: automatically resumes from the last successful sync (recommended). • Date Spécifique: specify a manual start date. • Tous Les Dossiers: fetch all dossiers (may impact performance). |
| État Des Dossiers | Filter dossiers by their state: • Accepté • Classé Sans Suite • En Construction • En Instruction • Refusé • Tous Les États (no filtering) |
| Tri Des Résultats | Sort order of dossiers: • Plus Récent en Premier (descending) • Plus Ancien en Premier (ascending) |
| Inclure Les Champs | Whether to include form field values in each dossier. |
| Inclure Les Annotations | Whether to include private annotations associated with dossiers. |
| Inclure Les Traitements | Whether to include the treatment history of dossiers. |
| Inclure Les Instructeurs | Whether to include the list of instructors involved with dossiers. |
| Inclure Les Avis | Whether to include opinions related to dossiers. |
| Inclure Les Corrections | Whether to include pending corrections for dossiers. |
| Inclure La Géométrie | Whether to include geographic data related to dossiers. |
| Date De Début | When using manual sync mode, specify the start date to fetch dossiers modified since this date. |
Output
The output JSON contains:
demarche: Basic info about the démarche including its ID, number, title, and current state.dossiers: An array of dossier objects, each containing:- Core dossier data.
- Form fields (
champs) mapped either with original labels or snake_case keys depending on the selected attribute format. - Annotations similarly mapped.
- Additional included details depending on input properties (treatments, instructors, opinions, corrections, geometry).
pagination: Information about whether more dossiers are available (hasMore) and the cursor for the next page (endCursor).metadata: Contains total number of dossiers returned, synchronization mode used, the date since which dossiers were fetched (if applicable), attribute format, and timestamp of processing.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the Mes-Démarches API.
- The node makes GraphQL POST requests to the configured Mes-Démarches server endpoint.
- Proper configuration of the API token and server URL in the node credentials is necessary.
Troubleshooting
Error: "Démarche X non trouvée ou non accessible"
Means the specified démarche number does not exist or the API token lacks access rights. Verify the démarche number and ensure the API key has sufficient permissions.Performance issues when using "Tous Les Dossiers" sync mode
Fetching all dossiers without filters can be slow and resource-intensive. Prefer using "Auto" or "Date Spécifique" modes to limit data volume.GraphQL errors reported in response
These indicate issues with the query or parameters sent to the API. Check that all required parameters are correctly set and valid.Empty results despite existing dossiers
Confirm that filters like dossier state or date range are not excluding all data unintentionally.
Links and References
- Mes-Démarches API Documentation (French) (Replace with actual URL if available)
- n8n Documentation on Creating Custom Nodes
- GraphQL Basics