Configuring Autodoc as a Source
In the Sources tab, click on the “Add source” button located on the top right of your screen. Then, select the Autodoc option from the list of connectors. Click Next and you’ll be prompted to add your access.1. Add account access
The following configurations are required:- API User: The username of the API user of your GD4 account. An administrator can create it in the GD4 interface, under Autodoc > Usuário API. Module permissions for the API user are configured per construtora under Autodoc > Construtora — streams the user has no permission for are skipped with a warning.
- API Password: The password of that API user.
2. Select streams
Choose which data streams you want to sync. For faster extractions, select only the streams that are relevant to your analysis. You can select entire groups of streams or pick specific ones.Tip: The stream can be found more easily by typing its name.
The per-worker document streams (
colaboradores_historico and the four colaboradores_documentos_* streams) and per-supplier document streams (fornecedores_documentos*) make one API call per worker/supplier, so syncs get slower as your workforce grows. Select only the ones you need.3. Configure data streams
Customize how you want your data to appear in your catalog. Select the desired layer where the data will be placed, a folder to organize it inside the layer, a name for each table (which will effectively contain the fetched data) and the type of sync.- Layer: choose between the existing layers on your catalog. This is where you will find your new extracted tables as the extraction runs successfully.
- Folder: a folder can be created inside the selected layer to group all tables being created from this new data source.
- Table name: we suggest a name, but feel free to customize it. You have the option to add a prefix to all tables at once and make this process faster!
- Sync Type: the Autodoc API does not expose update timestamps, so all streams are extracted as FULL_TABLE — every run fetches the current state of the data.
4. Configure data source
Describe your data source for easy identification within your organization, not exceeding 140 characters. To define your Trigger, consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times). Once you are ready, click Next to finalize the setup.5. Check your new source
You can view your new source on the Sources page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.Streams and Fields
Below you’ll find all available data streams from Autodoc and their corresponding fields.Some detailed document payloads are not fully documented by the Autodoc API, so they are delivered as JSON strings (columns
historico, documentos and fornecedor on the per-worker/per-supplier streams). You can parse them with SQL JSON functions in your Queries.Colaboradores
Colaboradores
Workers registered in GD4, with their documentation status. Full table.Key Fields:
id- Unique identifier of the worker in GD4nome- Full name of the workercpf- CPF (Brazilian individual taxpayer ID) of the workerdata_nascimento- Birth date of the workerdata_admissao- Date the worker was hireddata_cadastro- Date the worker was registered in GD4funcao- Job function (role) of the workercargos_servicos- Positions/services assigned to the workerresponsavel- Name of the supplier (employer) responsible for the workerrelationships- Details of the responsible supplier (JSON object)obras- Construction sites the worker is linked toanalise_documento- Document analysis status for the workerstatus_colaborador- Current documentation status of the workerestado_residencia/cidade_residencia- Where the worker livesfacial_cadastrada- Whether facial recognition is enrolled for turnstile access
Colaboradores - Histórico
Colaboradores - Histórico
Individual history entries of each worker (admissions, transfers, events). Full table. One API call per worker.Key Fields:
colaborador_id- Identifier of the worker this history entry belongs tohistorico- History entry of the worker as returned by GD4 (JSON object)
Colaboradores - Documentos Único / Mensal / Encerramento / Transferência
Colaboradores - Documentos Único / Mensal / Encerramento / Transferência
Documents required from each worker, split by requirement type: one-time (único), monthly (mensal), termination (encerramento) and transfer (transferência). Full table. One API call per worker per stream.Key Fields:
colaborador_id- Identifier of the worker the documents belong todocumentos- Document entry with status, due dates and occurrences (JSON object)
Fornecedores
Fornecedores
Suppliers (contractors) monitored in GD4, with documentation status. Full table.Key Fields:
id- Unique identifier of the supplier in GD4nome_fantasia- Trade name of the supplierrazao_social- Legal name of the suppliercnpj- CNPJ (Brazilian company taxpayer ID) of the suppliercategoria- Category of the suppliercolaboradores- Number of workers linked to the supplierstatus_fornecedor- Current documentation status of the supplierdata_uploads- Date of the last document upload by the supplierdata_analise- Date of the last document analysis for the supplier
Fornecedores - Documentos
Fornecedores - Documentos
Documents and documentation summary of each supplier, plus the per-type listings (único, mensal, encerramento). Full table. One API call per supplier per stream.Key Fields:
fornecedor_id- Identifier of the supplierfornecedor- Documentation summary and document list of the supplier (JSON object, summary stream)documentos- Document entry with status, due dates and occurrences (JSON object, per-type streams)
Fornecedores - Administrativo
Fornecedores - Administrativo
Administrative supplier registry with contacts, hiring relation and hierarchy. Full table.Key Fields:
id- Unique identifier of the supplier in GD4cnpj- CNPJ of the supplierrazao_social/nome_fantasia- Legal and trade names of the supplierdata_vinculo- Date the supplier was linked to the buildercodigo_fornecedor- Internal code of the suppliercolaboradores_vinculados- Number of workers linked to the suppliercontato/telefone/email- Contact information of the supplierrelacao_contratacao- Hiring relation of the supplierfornecedor_pai- Parent supplier when subcontracted
Obras
Obras
Construction sites managed in GD4. Full table.Key Fields:
id- Unique identifier of the construction sitenome- Name of the construction siteendereco- Address of the construction sitecei- CEI/CNO registration number of the construction sitedescricao- Description of the construction sitebloqueado- Whether the construction site is blockedcatracas- Turnstiles installed at the site (JSON array of objects)
Usuários
Usuários
GD4 platform users of the builder account. Full table.Key Fields:
id- Unique identifier of the userusuario- Username (login) of the userbloqueado- Whether the user is blockedusuario_colaborador- Worker linked to the user account, when applicableperfil- Permission profile assigned to the user
Funções
Funções
Job functions (roles) configured in GD4. Full table.Key Fields:
id- Unique identifier of the job functionnome- Name of the job functioncodigo- Numeric code of the job functionuuid- UUID of the job functiondocumentos_vinculados- Documents required for the job function (JSON array of objects)funcao_vinculada- Linked job function, when applicable
Cargos/Serviços
Cargos/Serviços
Positions/services configured in GD4. Full table.Key Fields:
id- Unique identifier of the position/servicenome- Name of the position/servicebloqueado- Whether the position/service is blockedfuncao- Job functions linked to the position/service (JSON array of objects)data_cadastro- Date the position/service was registeredusuario- User who registered the position/service (JSON object)
Documentos de Colaborador / Fornecedor
Documentos de Colaborador / Fornecedor
Document type definitions (requirement rules) configured in GD4 for workers and suppliers. Full table.Key Fields:
id- Unique identifier of the document typenome- Name of the document typevencimento- Expiration rule of the document typetipo_exigencia- Requirement type of the document (e.g. mensal, único)peso- Weight of the document in the supplier score (supplier documents)criterio_exigencia- Requirement criterion (supplier documents)obras- Construction sites the requirement applies to (supplier documents)
Perfis de Permissões / Perfis de Análise
Perfis de Permissões / Perfis de Análise
Permission profiles and document analysis profiles configured in GD4. Full table.Key Fields:
id- Unique identifier of the profilenome- Name of the profile