---
title: "Trigger a file import block in a flow"
method: POST
path: "/flows/{flowId}/file-import/{blockId}"
tags: ["Flows"]
---

# Trigger a file import block in a flow

`POST /flows/{flowId}/file-import/{blockId}`

## Request

- Base URL: `https://api.loopify.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.loopify.com/flows/{flowId}/file-import/{blockId}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://auth.loopify.com/connect/authorize`, token URL `https://auth.loopify.com/token`, scopes: `User`, `ManageCampaign`, `AccountAPIKey`)

#### Auth policies: User,ManageCampaign,AccountAPIKey

## Path parameters

- `flowId` string, required
- `blockId` string, required

## Response `200`

Success

- AccountFlowTemplate
  - `accountId` integer
  - `_id` string, nullable
  - `tagGroups` TagGroup[], nullable
    - `_id` string, nullable
    - `locked` boolean
    - `managed` boolean, nullable
    - `appDomain` string, nullable
    - `deleted` Deleted: Object is not deleted if field is null or { deletedStamp: null}
      - `deletedStamp` string, date-time, nullable: null means not deleted
      - `userId` integer
      - `purging` string, date-time, nullable
    - `name` string, nullable
    - `externalTagGroupId` string, nullable
    - `inputType` 'taglist' | 'multiple-select' | 'single-select': Allowed values: taglist,multiple-select,single-select
    - `type` 'segment' | 'account-collection': Allowed values: segment,account-collection
    - `tags` string[], nullable
    - `allowUsersToAdd` boolean
    - `createdByUserId` integer
  - `name` string, nullable
  - `type` string, nullable
  - `created` string, date-time
  - `changed` string, date-time
  - `published` boolean: Decides if the template is published as a usable template in the users account.
  - `rootTemplate` boolean: A root template is a template that cannot be edited (overwritten) it can only be duplicated and saved with a new name
  - `screenshot` string, nullable: This is a root template only property, and is automatically generated in the upload process
  - `blocks` FlowBlock[], nullable
    - `uuid` string, nullable
    - `type` 'flow-activated' | 'contacts' | 'new-entry' | 'page' | 'sms-in' | 'api-entry' | 'file-import' | 'wait' | 'split' | 'email' | 'sms' | 'print' | 'check-email-status' | 'check-sms-status' | 'check-page-status' | 'contact-match' | 'update-contact' | 'add-to-campaign' | 'send-alert' | 'send-report' | 'flow-test-activated' | 'flow-stopped' | 'external-form' | 'webhook' | 'incoming-events' | 'coupon' | 'switch-contact' | 'popup' | 'remove-from-campaign' | 'data-collections' | 'send-data' | 'delete-contact' | 'export' | 'campaign-activity' | 'flow-guard': Allowed values: flow-activated,contacts,new-entry,page,sms-in,api-entry,file-import,wait,split,email,sms,print,check-email-status,check-sms-status,check-page-status,contact-match,update-contact,add-to-campaign,send-alert,send-report,flow-test-activated,flow-stopped,external-form,webhook,incoming-events,coupon,switch-contact,popup,remove-from-campaign,data-collections,send-data,delete-contact,export,campaign-activity,flow-guard
    - `group` string, nullable
    - `name` string, nullable
    - `description` string, nullable
    - `position` FlowBlockPosition
      - `x` integer
      - `y` integer
    - `data` object, nullable: Dynamic object
    - `oldData` object, nullable: Dynamic object
    - `errors` object[], nullable
  - `connections` FlowConnection[], nullable
    - `source` string, nullable
    - `target` string, nullable
    - `label` string, nullable
    - `type` string, nullable
    - `event` string, nullable
  - `filters` InlineSegment[], nullable: List of document-only filters (smart segments). Should be empty for a template in most cases
    - `_id` string, nullable
    - `name` string, nullable
    - `filterGroups` FilterGroup[], nullable
      - `index` integer
      - `type` 'contact' | 'event' | 'custom-event' | 'event-booking' | 'job-data' | 'event-booking-v2' | 'data-collection': Allowed values: contact,event,custom-event,event-booking,job-data,event-booking-v2,data-collection
      - `conjunction` 'AND' | 'OR': Allowed values: AND,OR
      - `joinType` 'some' | 'all': Allowed values: some,all
      - `filters` Filter[], nullable
        - `index` integer
        - `source` string, nullable
        - `sourceType` 'number' | 'string' | 'date' | 'array' | 'object' | 'transaction' | 'boolean' | 'nullable boolean' | 'sum' | 'count' | 'event booking session' | 'date age' | 'datetime': Allowed values: number,string,date,array,object,transaction,boolean,nullable boolean,sum,count,event booking session,date age,datetime
        - `comperator` 'contains' | 'does not contain' | 'is equal to' | 'is not equal to' | 'begins with' | 'ends with' | 'is greater than' | 'is less than' | 'is greater than or equal to' | 'is less than or equal to' | 'is empty' | 'is not empty' | 'matches' | 'is before' | 'is after' | 'occurred in the last' | 'occurred before the last' | 'occurs within the next' | 'recurs yearly today' | 'is set' | 'is not set' | 'contains specific' | 'does not contain specific' | 'has changed in' | 'has not changed in' | 'was updated after' | 'has opened' | 'has not opened' | 'has clicked' | 'has not clicked' | 'has filed form' | 'has not filed form' | 'has received' | 'has not received' | 'recurs yearly in' | 'occurs in' | 'is true' | 'is false' | 'is not true' | 'has unsubscribed' | 'has bounced' | 'has hardbounced' | 'has softbounced' | 'is not false' | 'has occurred' | 'has not occurred' | 'occurs today' | 'occurred' | 'is guest' | 'has been' | 'campaign member' | 'up to turning' | 'from turning' | 'turning' | 'in time range' | 'has flow block executed' | 'has flow block executed true' | 'has flow block executed false' | 'has flow block executed error' | 'has flow job created' | 'has flow job queued' | 'is one of' | 'is none of': Allowed values: contains,does not contain,is equal to,is not equal to,begins with,ends with,is greater than,is less than,is greater than or equal to,is less than or equal to,is empty,is not empty,matches,is before,is after,occurred in the last,occurred before the last,occurs within the next,recurs yearly today,is set,is not set,contains specific,does not contain specific,has changed in,has not changed in,was updated after,has opened,has not opened,has clicked,has not clicked,has filed form,has not filed form,has received,has not received,recurs yearly in,occurs in,is true,is false,is not true,has unsubscribed,has bounced,has hardbounced,has softbounced,is not false,has occurred,has not occurred,occurs today,occurred,is guest,has been,campaign member,up to turning,from turning,turning,in time range,has flow block executed,has flow block executed true,has flow block executed false,has flow block executed error,has flow job created,has flow job queued,is one of,is none of
        - `patternType` 'date' | 'date offset' | 'number' | 'string' | 'regex' | 'path': Allowed values: date,date offset,number,string,regex,path
        - `pattern` string, nullable: Scalar filter text, or JSON-encoded string array for V2 set comparators.
      - `showAll` boolean
      - `excludeEventResult` boolean: Only used if type is event or custom-event
  - `deleted` Deleted: Object is not deleted if field is null or { deletedStamp: null}
    - `deletedStamp` string, date-time, nullable: null means not deleted
    - `userId` integer
    - `purging` string, date-time, nullable
  - `commitHash` string, nullable
  - `branched` BranchedDocument
    - `available` boolean
    - `publishDate` string, date-time, nullable
    - `stopDate` string, date-time, nullable
  - `folderId` string, nullable

## Other responses

- `400`: 0: License issue
- `401`: Unauthorized
- `403`: Forbidden

---

[API](https://skmtc.dev/loopify/apis/web-api-loopify.md) · [All operations](https://skmtc.dev/loopify/apis/web-api-loopify/llms.txt) · [OpenAPI document](https://skmtc.dev/loopify/apis/web-api-loopify/revisions/68c51b11a24b?raw)
