Email imports: configuration and diagnostics
Read recent task email-import log entries
/a/ImportTasksEmail_getLog
Read recent task email-import log entries
When to use this endpoint
Inspect recent tenant import diagnostics for a selected configuration ID. Use this to see worker outcomes rather than to check whether a configuration save succeeded.
Authentication and permissions
Authenticate with signed API-key fields or a logged-in CRM session. The handler calls Core_requireLogin(); it has no separate page, administrator, or role-permission check.
The account must have Import By Email enabled (employer|features bit 32768). The features_used marker is separate and does not grant access.
The query uses the authenticated tenant’s logs table. It does not look up the global filter or verify its owner or type; an arbitrary positive ID only filters logs already in this tenant.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer | Yes | Positive global import-filter ID, converted with PHP intval(). Obtain it when saving the configuration or opening it from the relevant email-import list. |
Example request
$result = FM_api('ImportTasksEmail_getLog', [
'id' => '1042',
]);
Example response
[]
Returns a bare array of raw log rows, or [] when none match. It does not return configuration details, an ok envelope, or a total count. Log payloads remain in their stored formats.
Populated raw rows contain id, Unix-seconds cdate, type_name, type_name2, description, user_id, encoded meta, and obj_id. Database numeric values can be strings; nullable columns are not normalized.
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
{"error":"missing or invalid parameter: id"} | Nonpositive integer-converted ID, checked before authentication. |
{"error":"Import By Email feature not enabled"} | The account feature bit is disabled. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Selects
*wheretype_name="import_email"andobj_idequals the supplied ID. It does not filtertype_name2. - Orders by
cdate DESC, limited to 1000 rows. Equal timestamps have no additional tie-breaker. There are no accepted offset, cursor, date-range, or page-size controls. - A missing or foreign filter is not an error; matching tenant-local log rows can still be returned. This endpoint is not a complete email delivery audit, and it does not include other log categories.
- This read has no writes, history effects, cache invalidation, or mailbox processing.
See it in Fieldmotion
CRM1
In Imports → Tasks by Email, use the row’s log action to download a CSV. Filter for ImportTasksEmail_getLog; it supplies the configuration ID.
CRM2
In Tasks by Email, use Download Log and filter for ImportTasksEmail_getLog. The page converts the returned JSON rows to a CSV download.
Related endpoints
- ImportTasksEmail_getDetails: inspect the routing configuration separately.
- ImportTasksEmail_save: configuration changes are not import outcomes.