Module: Slack::Web::Api::Endpoints::Workflows

Included in:
Slack::Web::Api::Endpoints
Defined in:
lib/slack/web/api/endpoints/workflows.rb

Instance Method Summary collapse

Instance Method Details

#workflows_stepCompleted(options = {}) ⇒ Object

Indicate that an app’s step in a workflow completed execution.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :workflow_step_execute_id (string)

    Context identifier that maps to the correct workflow step execution.

  • :outputs (object)

    Key-value object of outputs from your step. Keys of this object reflect the configured key properties of your outputs array from your workflow_step object.

See Also:



18
19
20
21
# File 'lib/slack/web/api/endpoints/workflows.rb', line 18

def workflows_stepCompleted(options = {})
  throw ArgumentError.new('Required arguments :workflow_step_execute_id missing') if options[:workflow_step_execute_id].nil?
  post('workflows.stepCompleted', options)
end

#workflows_stepFailed(options = {}) ⇒ Object

Indicate that an app’s step in a workflow failed to execute.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :error (object)

    A JSON-based object with a message property that should contain a human readable error message.

  • :workflow_step_execute_id (string)

    Context identifier that maps to the correct workflow step execution.

See Also:



32
33
34
35
36
# File 'lib/slack/web/api/endpoints/workflows.rb', line 32

def workflows_stepFailed(options = {})
  throw ArgumentError.new('Required arguments :error missing') if options[:error].nil?
  throw ArgumentError.new('Required arguments :workflow_step_execute_id missing') if options[:workflow_step_execute_id].nil?
  post('workflows.stepFailed', options)
end

#workflows_updateStep(options = {}) ⇒ Object

Update the configuration for a workflow step.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :workflow_step_edit_id (string)

    A context identifier provided with view_submission payloads used to call back to workflows.updateStep.

  • :inputs (object)

    A JSON key-value map of inputs required from a user during configuration. This is the data your app expects to receive when the workflow step starts. Please note: the embedded variable format is set and replaced by the workflow system. You cannot create custom variables that will be replaced at runtime. Read more about variables in workflow steps here.

  • :outputs (array)

    An JSON array of output objects used during step execution. This is the data your app agrees to provide when your workflow step was executed.

  • :step_image_url (string)

    An optional field that can be used to override app image that is shown in the Workflow Builder.

  • :step_name (string)

    An optional field that can be used to override the step name that is shown in the Workflow Builder.

See Also:



53
54
55
56
# File 'lib/slack/web/api/endpoints/workflows.rb', line 53

def workflows_updateStep(options = {})
  throw ArgumentError.new('Required arguments :workflow_step_edit_id missing') if options[:workflow_step_edit_id].nil?
  post('workflows.updateStep', options)
end